Skip to content

Commit

Permalink
Revert "Fix button typeface and remove :link selectors"
Browse files Browse the repository at this point in the history
This reverts commit bda73ad.
  • Loading branch information
ahosgood committed Jul 25, 2024
1 parent bda73ad commit f427944
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 5 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated
### Removed

- Removed styling for links with the `:link` pseudo class - all `<a>` elements should posess an `href` attribute by default

### Fixed

- Further fixed gallery component layout when CSS loads but JS fails
- Buttons using the `<button>` element now have the correct typeface (they were using the browser default)

### Security

Expand Down
2 changes: 2 additions & 0 deletions src/nationalarchives/components/breadcrumbs/breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
display: inline-block;

&,
&:link,
&:visited {
@include colour.colour-font("font-base");
}
Expand Down Expand Up @@ -93,6 +94,7 @@
@include colour.on-high-contrast {
&__link {
&,
&:link,
&:visited {
@include colour.colour-font("link");
}
Expand Down
6 changes: 5 additions & 1 deletion src/nationalarchives/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $button-border-width: 4px !default;
cursor: pointer;

@include typography.font-size(18);
@include typography.main-font(true);
@include typography.main-font-weight-bold;

@include colour.colour-background("button-background");

Expand All @@ -33,6 +33,7 @@ $button-border-width: 4px !default;
print-color-adjust: exact;

&,
&:link,
&:visited {
@include colour.colour-font("button-text");
}
Expand Down Expand Up @@ -68,6 +69,7 @@ $button-border-width: 4px !default;
border-color: transparent;

&,
&:link,
&:visited {
@include colour.colour-font("link");
}
Expand All @@ -88,6 +90,7 @@ $button-border-width: 4px !default;
@include colour.colour-border("button-accented-background");

&,
&:link,
&:visited {
@include colour.colour-font("button-accented-text");
}
Expand Down Expand Up @@ -189,6 +192,7 @@ $button-border-width: 4px !default;
@include colour.colour-border("button-background");

&,
&:link,
&:visited {
@include colour.colour-font("button-text");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
@include typography.main-font-weight-bold;

&,
&:link,
&:visited {
@include colour.colour-font("form-error-text");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

&--link {
&,
&:link,
&:visited {
@include colour.colour-font("font-base");
}
Expand Down Expand Up @@ -184,6 +185,7 @@
@include colour.colour-border("keyline", 0.5px, solid, bottom);

&,
&:link,
&:visited {
@include colour.colour-font("font-base");
}
Expand Down Expand Up @@ -215,6 +217,7 @@
text-decoration: none;

&,
&:link,
&:visited {
@include colour.colour-font("font-light");
}
Expand Down
6 changes: 6 additions & 0 deletions src/nationalarchives/components/header/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
@include typography.font-size(16);

&,
&:link,
&:visited {
@include colour.colour-font("font-base");
}
Expand Down Expand Up @@ -73,6 +74,7 @@

&--link {
&,
&:link,
&:visited {
color: inherit;
}
Expand Down Expand Up @@ -218,13 +220,15 @@
text-decoration: none;

&,
&:link,
&:visited {
@include colour.colour-font("font-light");
}

&:hover,
&--selected {
&,
&:link,
&:visited {
@include colour.colour-font("font-base");
@include typography.interacted-text-decoration;
Expand Down Expand Up @@ -278,6 +282,7 @@
}

&,
&:link,
&:visited {
color: inherit;
}
Expand Down Expand Up @@ -357,6 +362,7 @@

&__top-navigation-item-link {
&,
&:link,
&:visited {
@include colour.colour-font("font-light");
}
Expand Down
1 change: 1 addition & 0 deletions src/nationalarchives/components/index-grid/index-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@

.tna-index-grid__item:hover & {
&,
&:link,
&:visited {
@include typography.interacted-text-decoration;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
@include colour.colour-border("keyline", 1px);

&,
&:link,
&:visited {
@include colour.colour-font("font-base");
}
Expand All @@ -57,6 +58,7 @@

&__item--selected &__link {
&,
&:link,
&:visited,
&:hover {
@include colour.accent;
Expand Down
1 change: 1 addition & 0 deletions src/nationalarchives/components/skip-link/skip-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
clip-path: inset(50%) !important;

&,
&:link,
&:visited {
@include colour.colour-font("button-text", $important: true);
}
Expand Down
1 change: 1 addition & 0 deletions src/nationalarchives/components/tabs/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
@include typography.heading-font;

&,
&:link,
&:visited {
@include colour.colour-font("font-dark");
}
Expand Down
2 changes: 2 additions & 0 deletions src/nationalarchives/global-header-package.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ hr {

.tna-button {
&,
&:link,
&:visited {
text-decoration: none;
}
Expand All @@ -181,6 +182,7 @@ hr {

&-link {
&,
&:link,
&:visited {
display: block;
}
Expand Down

0 comments on commit f427944

Please sign in to comment.