Skip to content

Commit

Permalink
feat(Anchor): remove horizontal padding (#2365)
Browse files Browse the repository at this point in the history
* feat(Anchor): remove horizontal padding

* update Anchor (UI) snapshots

* update all other anchor related snapshots
  • Loading branch information
tujoworker authored May 23, 2023
1 parent 64a3c6f commit 05d75a6
Show file tree
Hide file tree
Showing 56 changed files with 11 additions and 7 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// make sure we have always `display: inline;` as inline-block is breaking the border-bottom
display: inline;

padding: 0.05575em 0.125em; // the total body height will then be 24px if font-size is 18px
padding: 0.05575em 0; // the total body height will then be 24px if font-size is 18px

font-size: var(--font-size-basis);
text-decoration: underline;
Expand Down Expand Up @@ -107,6 +107,11 @@
border-radius: 0.25em;
}

@mixin anchorBackground($color) {
box-shadow: inset 100vw 100vw 0 0 $color, -0.125rem 0 0 0 $color,
0.125rem 0 0 0 $color;
}

// other styles
@mixin useAnchorContrastStyle($contrastColor: var(--color-emerald-green)) {
color: var(--color-white);
Expand Down Expand Up @@ -197,8 +202,7 @@
}
}

transition: background-color 200ms ease-in-out,
border-radius 200ms ease-in-out;
transition: box-shadow 200ms ease-in-out, border-radius 200ms ease-in-out;

[data-visual-test-wrapper] & {
transition: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
&:hover,
&:active {
color: var(--color-sea-green);
background-color: var(--color-mint-green-50);
@include anchor-mixins.anchorBackground(var(--color-mint-green-50));
}

&:active {
color: var(--color-mint-green);
background-color: var(--color-emerald-green);
@include anchor-mixins.anchorBackground(var(--color-emerald-green));
}

&:focus {
Expand All @@ -23,12 +23,12 @@

.dnb-anchor--hover {
color: var(--color-sea-green);
background-color: var(--color-mint-green-50);
@include anchor-mixins.anchorBackground(var(--color-mint-green-50));
}

.dnb-anchor--active {
color: var(--color-mint-green);
background-color: var(--color-emerald-green);
@include anchor-mixins.anchorBackground(var(--color-emerald-green));
}

.dnb-anchor--focus {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 05d75a6

Please sign in to comment.