Skip to content

Commit

Permalink
fix(Anchor:) fixes anchor modifier .dnb-anchor--no-hover
Browse files Browse the repository at this point in the history
  • Loading branch information
langz committed Jul 28, 2023
1 parent 215e52c commit feda4c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To force a specific state of style, use the following classes to do so:

### Anchor with icons

Icons can be adde with the `icon` and `iconPosition` props. Normally by sending in the name if an icon, but it is also possible to send in html/react code (normally for custom svg).
Icons can be added with the `icon` and `iconPosition` props. Normally by sending in the name if an icon, but it is also possible to send in html/react code (normally for custom svg).

<AnchorExampleIcons />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@

@mixin resetAnchorHoverStyle() {
&:hover {
color: inherit;

// in case we don't want to change the color to the body color
background-color: transparent;
}
Expand Down Expand Up @@ -187,7 +185,9 @@

&:hover,
&:active {
@include anchorHoverStyle();
:not(.dnb-anchor--no-hover) {
@include anchorHoverStyle();
}
}

&:active {
Expand All @@ -207,7 +207,6 @@
[data-visual-test-wrapper] & {
transition: none;
}

// other stuff, not related to the Anchor directly
.dnb-icon {
display: inline-block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

&:hover,
&:active {
color: var(--color-sea-green);
@include anchor-mixins.anchorBackground(var(--color-mint-green-50));
:not(.dnb-anchor--no-hover) {
color: var(--color-sea-green);
@include anchor-mixins.anchorBackground(var(--color-mint-green-50));
}
}

&:active {
Expand Down

0 comments on commit feda4c2

Please sign in to comment.