Skip to content

Commit c5cfb64

Browse files
create separate global close button styles with background image url for svg
1 parent 406ac0e commit c5cfb64

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<!-- breaking news banner (for demo purposes) -->
22
<div class="breaking-news-organism" id="primary-content">
33
<div class="breaking-news-macro">
4-
<h3 class="h4">
5-
<span class="breaking-title">BREAKING NEWS: </span>
6-
<a href="https://alpha.montrealgazette.com/site-services/Newsletters/montreal-sports-newsletter/article54991.html"> Cricket is treated as the celebration in India </a>
7-
</h3>
8-
<div class="close-breaking-news">
9-
<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>
4+
<div>
5+
<h3 class="h4">
6+
<span class="breaking-title">BREAKING NEWS: </span>
7+
<a href="https://alpha.montrealgazette.com/site-services/Newsletters/montreal-sports-newsletter/article54991.html"> Cricket is treated as the celebration in India </a>
8+
</h3>
9+
</div>
10+
<div class="close-breaking-news button-close">
1011
</div>
1112
</div>
1213
</div>

static/css/atoms.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,16 @@ hr {
277277
display: block;
278278
}
279279

280+
.button-close {
281+
align-self: center;
282+
background-color: var(--text-color);
283+
-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>');
284+
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;
288+
}
289+
280290
/**
281291
* Color schemes
282292
*/

static/css/cards/zones.css

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
#zone-el-2.sticky-leaderboard {
102102
position: fixed;
103103
z-index: 98;
104-
width: 100vw;
104+
width: 100%;
105105
height: 106px;
106106
overflow: hidden;
107107
}
@@ -118,12 +118,9 @@
118118
}
119119

120120
#sticky_ad_close {
121-
position: fixed;
122-
right: 0;
121+
position: absolute;
122+
top: 10px;
123+
right: 10px;
123124
z-index: 99;
124-
width: 20px;
125-
padding-left: 10px;
126-
background-color: var(--media-background-color);
127-
cursor: pointer;
128-
--fill-color: var(--black);
125+
padding: 0;
129126
}

0 commit comments

Comments
 (0)