Skip to content

Commit

Permalink
Fix button typeface and remove :link selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Jul 25, 2024
1 parent 62deee7 commit bda73ad
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 24 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ 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: 0 additions & 2 deletions src/nationalarchives/components/breadcrumbs/breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
display: inline-block;

&,
&:link,
&:visited {
@include colour.colour-font("font-base");
}
Expand Down Expand Up @@ -94,7 +93,6 @@
@include colour.on-high-contrast {
&__link {
&,
&:link,
&:visited {
@include colour.colour-font("link");
}
Expand Down
6 changes: 1 addition & 5 deletions 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-weight-bold;
@include typography.main-font(true);

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

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

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

&,
&:link,
&:visited {
@include colour.colour-font("link");
}
Expand All @@ -90,7 +88,6 @@ $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 @@ -192,7 +189,6 @@ $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,7 +30,6 @@
@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,7 +46,6 @@

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

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

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

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

&--link {
&,
&:link,
&:visited {
color: inherit;
}
Expand Down Expand Up @@ -220,15 +218,13 @@
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 @@ -282,7 +278,6 @@
}

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

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

.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,7 +46,6 @@
@include colour.colour-border("keyline", 1px);

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

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

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

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

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

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

0 comments on commit bda73ad

Please sign in to comment.