WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 911d78e

Browse files
Merge pull request #26 from IATI/piped-list
Fixes to header global nav
2 parents d502139 + de0ff4b commit 911d78e

File tree

5 files changed

+19
-21
lines changed

5 files changed

+19
-21
lines changed

src/scss/components/header/_header.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
&:not(:has(.iati-header__nav[hidden])) {
3434
padding-block-end: 0;
3535
}
36-
@media (min-width: $screen-sm) {
36+
@media (min-width: $mobile_nav_breakpoint) {
3737
padding-block: 2rem;
3838
}
3939
}
@@ -50,7 +50,7 @@
5050
> :last-child {
5151
margin-inline-start: auto;
5252
}
53-
@media (min-width: $screen-sm) {
53+
@media (min-width: $mobile_nav_breakpoint) {
5454
border-block-end: none;
5555
padding-block-end: 0;
5656
margin-block-end: 0;

src/scss/components/header/header.stories.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const Header: Story = {
6060
<div class="iati-header__container iati-brand-background__content">
6161
<div class="iati-header__actions">
6262
${CountrySwitcher.render?.call({ ...args })}
63-
<button class="iati-button iati-button--light hide display--sm">
63+
<button class="iati-button iati-button--light hide--mobile-nav">
6464
<span>Help Docs</span>
6565
<img class="iati-button__icon" src="${iconInfoUrl}" alt="" />
6666
</button>
@@ -77,6 +77,5 @@ export const Header: Story = {
7777
</div>
7878
</div>
7979
</header>
80-
<script src="js/header.js"></script>
8180
`,
8281
};
Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
@use "../../tokens/color" as *;
22
@use "../../tokens/font" as *;
3+
@use "../../base/mixins";
34

45
.iati-piped-list {
6+
@include mixins.unstyled-list();
57
display: flex;
68
flex-wrap: wrap;
7-
gap: 0.5em;
8-
list-style-type: none;
9-
padding: 0;
10-
margin: 0;
119
& > * {
1210
line-height: 1;
13-
position: relative;
11+
padding: 0.2em;
12+
&:not(:first-child) {
13+
padding-left: 1em;
14+
}
1415
&:not(:last-child) {
15-
&:after {
16-
content: "";
17-
position: absolute;
18-
right: 1rem;
19-
height: 120%;
20-
width: 1px;
21-
display: block;
22-
background-color: currentColor;
23-
top: -10%;
24-
}
25-
padding-inline-end: 2rem;
16+
border-right: 1px solid black;
17+
padding-right: 1em;
2618
}
2719
}
2820
}

src/scss/tokens/_screens.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ $screen-lg: 1024px;
44
$screen-xl: 1280px;
55
$screen-2xl: 1536px;
66

7-
$mobile_nav_breakpoint: $screen-sm;
7+
$mobile_nav_breakpoint: $screen-md;

src/scss/utilities/_display.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
display: none;
99
}
1010

11+
.hide--mobile-nav {
12+
display: none;
13+
@media (min-width: $mobile_nav_breakpoint) {
14+
display: var(--display);
15+
}
16+
}
17+
1118
.display--sm {
1219
@media (min-width: $screen-sm) {
1320
display: var(--display);

0 commit comments

Comments
 (0)