Skip to content

Commit 6ea4c52

Browse files
authored
Merge pull request #55 from IATI/ml/other-link-styling
Update link styling options
2 parents c205b96 + 2852310 commit 6ea4c52

File tree

9 files changed

+62
-3
lines changed

9 files changed

+62
-3
lines changed

src/scss/components/breadcrumb/_breadcrumb.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131

3232
.iati-breadcrumb-link {
3333
text-decoration: none;
34+
35+
&[aria-current]:active,
36+
&[aria-current]:focus,
37+
&[aria-current]:hover {
38+
text-decoration: none;
39+
}
3440
}
3541

3642
@media (min-width: $screen-sm) {

src/scss/components/button/_button.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
transition: all 0.2s ease-in-out;
2020
text-decoration: none;
2121

22+
&:active,
23+
&:focus,
2224
&:hover {
2325
background-color: $color-teal-80;
26+
text-decoration: none;
2427
}
2528

2629
&__icon,

src/scss/components/figures/_figures.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,11 @@
4444
text-decoration: none;
4545
line-height: 1;
4646
color: $color-grey-90;
47+
48+
&:active,
49+
&:focus,
50+
&:hover {
51+
text-decoration: none;
52+
}
4753
}
4854
}

src/scss/components/footer/_footer.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
.iati-footer__legal-nav {
8888
font-size: 1.0625rem;
8989
a {
90-
text-decoration: none;
9190
line-height: 1.1;
9291
&:visited {
9392
color: $color-blue-30;

src/scss/components/header/tool-nav/_tool-nav.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@
1919
line-height: 1.1;
2020
transition: all 0.2s ease-in-out;
2121
display: inline-block;
22+
23+
&:active,
24+
&:focus,
2225
&:hover {
2326
background-color: $color-blue-30;
2427
color: $color-teal-90;
28+
text-decoration: none;
2529
}
2630
}

src/scss/components/jump-menu/_jump-menu.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,11 @@
8989
font-size: 0.75rem;
9090
font-weight: 800;
9191
line-height: 1.5;
92+
93+
&:active,
94+
&:focus,
95+
&:hover {
96+
text-decoration: none;
97+
}
9298
}
9399
}

src/scss/components/mobile-nav/_mobile-nav.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@
8383
padding-block: 0.75em;
8484
display: block;
8585
transition: all 0.2s ease-in-out;
86+
87+
&:active,
88+
&:focus,
8689
&:hover {
8790
color: $color-blue-30;
91+
text-decoration: none;
8892
}
8993
}

src/scss/typography/_body.scss

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ body {
88
color: $color-grey-90;
99
}
1010

11+
.iati-dark-background {
12+
color: $color-grey-10;
13+
background-color: $color-teal-90;
14+
}
15+
1116
p,
1217
a,
1318
li {
@@ -28,14 +33,14 @@ li p {
2833

2934
a {
3035
color: $color-teal-80;
31-
text-decoration: underline;
36+
text-decoration: none;
3237
text-decoration-color: $color-teal-30;
3338
text-underline-position: under;
3439

3540
&:active,
3641
&:hover,
3742
&:focus {
38-
text-decoration: none;
43+
text-decoration: underline;
3944
}
4045

4146
&:has(i),
@@ -45,6 +50,21 @@ a {
4550
}
4651
}
4752

53+
p a {
54+
text-decoration: underline;
55+
56+
&:active,
57+
&:hover,
58+
&:focus {
59+
text-decoration: none;
60+
}
61+
}
62+
63+
a.light {
64+
color: $color-teal-30;
65+
text-decoration-color: $color-teal-70;
66+
}
67+
4868
table:not([class]) {
4969
border-collapse: collapse;
5070
display: inline-block;

src/scss/typography/typography.stories.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,24 @@ export const Body: Story = {
4444
id facilisis sem dapibus. Quisque at diam aliquet, convallis tellus a,
4545
bibendum justo. Proin in est feugiat, rhoncus sapien eu, suscipit ante.
4646
</p>
47+
<p class="iati-dark-background">
48+
This paragraph shows an example of <strong>strong text</strong> and
49+
<em>emphasised text</em> against a dark background.
50+
</p>
4751
`,
4852
};
4953

5054
export const Links: Story = {
5155
render: () => html`
5256
<a href="#">This is a link.</a>
5357
<p>This is a <a href="#">link</a> within a paragraph.</p>
58+
<div class="iati-dark-background">
59+
<a class="light" href="#">This is a link on a dark background.</a>
60+
<p>
61+
This is a <a class="light" href="#">link on a dark background</a> within
62+
a paragraph.
63+
</p>
64+
</div>
5465
`,
5566
};
5667

0 commit comments

Comments
 (0)