Skip to content

Commit f8ab8a0

Browse files
add background color with padding by utilizing pseudo element
1 parent c5cfb64 commit f8ab8a0

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

layouts/partials/breaking-news-banner.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ <h3 class="h4">
77
<a href="https://alpha.montrealgazette.com/site-services/Newsletters/montreal-sports-newsletter/article54991.html"> Cricket is treated as the celebration in India </a>
88
</h3>
99
</div>
10-
<div class="close-breaking-news button-close">
11-
</div>
10+
<div class="close-breaking-news"><svg xmlns="http://www.w3.org/2000/svg" height="13.19px" viewBox="5.41 5.41 13.18 13.18" width="13.19px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/></svg></div>
1211
</div>
1312
</div>

static/css/atoms.css

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,20 @@ hr {
278278
}
279279

280280
.button-close {
281-
align-self: center;
281+
background-color: var(--media-background-color);
282+
padding: 10px;
283+
}
284+
285+
.button-close::before {
286+
content: "";
287+
display: block;
288+
width: 15px;
289+
height: 15px;
290+
cursor: pointer;
282291
background-color: var(--text-color);
283292
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="13.19px" height="13.19px" viewBox="0 0 13.18 13.18"><path d="M12.89 0.3c-.39-.39-1.02-.39-1.41 0L6.59 5.18 1.7 0.29c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L5.18 6.59 0.29 11.48c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L6.59 8l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L8 6.59l4.89-4.89c.38-.38.38-1.02 0-1.4z"/></svg>');
284293
mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="13.19px" height="13.19px" viewBox="0 0 13.18 13.18"><path d="M12.89 0.3c-.39-.39-1.02-.39-1.41 0L6.59 5.18 1.7 0.29c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L5.18 6.59 0.29 11.48c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L6.59 8l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L8 6.59l4.89-4.89c.38-.38.38-1.02 0-1.4z"/></svg>');
285-
width: 13.19px;
286-
height: 13.19px;
287-
cursor: pointer;
294+
mask-size: cover;
288295
}
289296

290297
/**

static/css/cards/zones.css

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
overflow: hidden;
107107
}
108108

109-
#zone-el-2.sticky-leaderboard > * {
109+
#zone-el-2.sticky-leaderboard > div {
110110
padding: 8px 0;
111111
}
112112

@@ -119,8 +119,6 @@
119119

120120
#sticky_ad_close {
121121
position: absolute;
122-
top: 10px;
123-
right: 10px;
124-
z-index: 99;
125-
padding: 0;
122+
top: 0;
123+
right: 0;
126124
}

0 commit comments

Comments
 (0)