UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

352 lines (342 loc) 17.2 kB
/* * Anchor * */ /* * Anchor mixins * */ /* * Utilities */ .eufemia-scope--10_104_0 button.dnb-anchor { cursor: pointer; line-height: calc(var(--line-height-basis) + 0.125rem); border: none; background: none; -webkit-appearance: none; appearance: none; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor { --anchor-underline-thickness: 0.0938rem; --anchor-icon-gutter: 0.25em; --anchor-icon-separator: '\2060'; --anchor-icon-position: translateY(-0.175em); display: inline; padding: 0.05575em 0; font-size: var(--font-size-basis); -webkit-text-decoration: underline; text-decoration: underline; text-decoration-color: currentcolor; text-decoration-thickness: var(--anchor-underline-thickness); text-underline-offset: 0.25em; border-radius: 0; } .eufemia-scope--10_104_0 sup :where(:not(.dnb-anchor--no-style)).dnb-anchor, .eufemia-scope--10_104_0 sub :where(:not(.dnb-anchor--no-style)).dnb-anchor { padding: 0 0.025em; } .eufemia-scope--10_104_0 .dnb-p :where(:not(.dnb-anchor--no-style)).dnb-anchor, .eufemia-scope--10_104_0 .dnb-lead :where(:not(.dnb-anchor--no-style)).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--xx-large :where(:not(.dnb-anchor--no-style)).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--x-large :where(:not(.dnb-anchor--no-style)).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--large :where(:not(.dnb-anchor--no-style)).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--medium :where(:not(.dnb-anchor--no-style)).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--basis :where(:not(.dnb-anchor--no-style)).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--small :where(:not(.dnb-anchor--no-style)).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--x-small :where(:not(.dnb-anchor--no-style)).dnb-anchor { font-size: inherit; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor:focus-visible { background-color: transparent; transition: none; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor:focus-visible, .eufemia-scope--10_104_0 .dnb-section :where(:not(.dnb-anchor--no-style)).dnb-anchor:focus-visible.dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor:focus-visible { outline: none; --border-color: var(--focus-ring-color); --border-width: var(--focus-ring-width); box-shadow: 0 0 0 var(--border-width) var(--border-color); border-color: transparent; border-radius: 0.25em; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor:hover:where(:not(.dnb-anchor--no-hover)) { border-radius: 0.25em; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor:hover:where(:not(.dnb-anchor--no-hover)), .eufemia-scope--10_104_0 .dnb-section :where(:not(.dnb-anchor--no-style)).dnb-anchor:hover:where(:not(.dnb-anchor--no-hover)).dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor:hover:not(.dnb-anchor--no-hover) { /* stylelint-disable-next-line scss/operator-no-unspaced */ } @supports not (selector(*:where(*))) { .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor:hover:not(.dnb-anchor--no-hover) { border-radius: 0.25em; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor:hover:not(.dnb-anchor--no-hover), .eufemia-scope--10_104_0 .dnb-section :where(:not(.dnb-anchor--no-style)).dnb-anchor:hover:not(.dnb-anchor--no-hover).dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor:active { border-radius: 0.25em; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor:active, .eufemia-scope--10_104_0 .dnb-section :where(:not(.dnb-anchor--no-style)).dnb-anchor:active.dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor { transition: box-shadow 200ms ease-in-out, border-radius 200ms ease-in-out, background 200ms ease-in-out; } .eufemia-scope--10_104_0 [data-visual-test-wrapper] :where(:not(.dnb-anchor--no-style)).dnb-anchor { transition: none; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor .dnb-icon { display: inline; vertical-align: middle; white-space: nowrap; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor .dnb-icon svg { vertical-align: baseline; transform: scale(2) var(--anchor-icon-position); font-size: 0.5em; width: 2em; height: 1em; pointer-events: none; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor--no-icon .dnb-icon { display: none; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor--icon-left .dnb-icon:first-child::after { content: var(--anchor-icon-separator); } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor--icon-left .dnb-icon:first-child svg { margin-right: calc(var(--anchor-icon-gutter) * 2); } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor--icon-right .dnb-icon:last-child::before { content: var(--anchor-icon-separator); } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor--icon-right .dnb-icon:last-child svg { margin-left: calc(var(--anchor-icon-gutter) * 2); } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor .dnb-icon--default { font-size: 0.8888888889em; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor.dnb-anchor--contrast { color: var(--color-white); } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor.dnb-anchor--contrast:hover:where(:not(.dnb-anchor--no-hover)) { color: var(--anchor-color--contrast); box-shadow: inset 100vw 100vw 0 0 var(--color-white), calc(var(--anchor-background-gutter-left, 0.125rem) * -1) 0 0 0 var(--color-white), var(--anchor-background-gutter-right, 0.125rem) 0 0 0 var(--color-white); } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor.dnb-anchor--contrast:hover:not(.dnb-anchor--no-hover) { /* stylelint-disable-next-line scss/operator-no-unspaced */ } @supports not (selector(*:where(*))) { .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor.dnb-anchor--contrast:hover:not(.dnb-anchor--no-hover) { color: var(--anchor-color--contrast); box-shadow: inset 100vw 100vw 0 0 var(--color-white), calc(var(--anchor-background-gutter-left, 0.125rem) * -1) 0 0 0 var(--color-white), var(--anchor-background-gutter-right, 0.125rem) 0 0 0 var(--color-white); } } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor.dnb-anchor--contrast:active { color: var(--color-white); background-color: transparent; box-shadow: inset 100vw 100vw 0 0 transparent, calc(var(--anchor-background-gutter-left, 0.125rem) * -1) 0 0 0 transparent, var(--anchor-background-gutter-right, 0.125rem) 0 0 0 transparent; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor.dnb-anchor--contrast:focus-visible { color: var(--color-white); background-color: transparent; outline: none; --border-color: var(--color-white); --border-width: var(--focus-ring-width); box-shadow: 0 0 0 var(--border-width) var(--border-color); border-color: transparent; } .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor.dnb-anchor--disabled, .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor[aria-disabled=true], .eufemia-scope--10_104_0 :where(:not(.dnb-anchor--no-style)).dnb-anchor[disabled] { color: var(--anchor-color--disabled); } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style) { /* stylelint-disable-next-line scss/operator-no-unspaced */ } @supports not (selector(*:where(*))) { .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor { --anchor-underline-thickness: 0.0938rem; --anchor-icon-gutter: 0.25em; --anchor-icon-separator: '\2060'; --anchor-icon-position: translateY(-0.175em); display: inline; padding: 0.05575em 0; font-size: var(--font-size-basis); -webkit-text-decoration: underline; text-decoration: underline; text-decoration-color: currentcolor; text-decoration-thickness: var(--anchor-underline-thickness); text-underline-offset: 0.25em; border-radius: 0; } .eufemia-scope--10_104_0 sup :not(.dnb-anchor--no-style).dnb-anchor, .eufemia-scope--10_104_0 sub :not(.dnb-anchor--no-style).dnb-anchor { padding: 0 0.025em; } .eufemia-scope--10_104_0 .dnb-p :not(.dnb-anchor--no-style).dnb-anchor, .eufemia-scope--10_104_0 .dnb-lead :not(.dnb-anchor--no-style).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--xx-large :not(.dnb-anchor--no-style).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--x-large :not(.dnb-anchor--no-style).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--large :not(.dnb-anchor--no-style).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--medium :not(.dnb-anchor--no-style).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--basis :not(.dnb-anchor--no-style).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--small :not(.dnb-anchor--no-style).dnb-anchor, .eufemia-scope--10_104_0 .dnb-h--x-small :not(.dnb-anchor--no-style).dnb-anchor { font-size: inherit; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor:focus-visible { background-color: transparent; transition: none; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor:focus-visible, .eufemia-scope--10_104_0 .dnb-section :not(.dnb-anchor--no-style).dnb-anchor:focus-visible.dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor:focus-visible { outline: none; --border-color: var(--focus-ring-color); --border-width: var(--focus-ring-width); box-shadow: 0 0 0 var(--border-width) var(--border-color); border-color: transparent; border-radius: 0.25em; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor:hover:where(:not(.dnb-anchor--no-hover)) { border-radius: 0.25em; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor:hover:where(:not(.dnb-anchor--no-hover)), .eufemia-scope--10_104_0 .dnb-section :not(.dnb-anchor--no-style).dnb-anchor:hover:where(:not(.dnb-anchor--no-hover)).dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor:hover:not(.dnb-anchor--no-hover) { /* stylelint-disable-next-line scss/operator-no-unspaced */ } @supports not (selector(*:where(*))) { .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor:hover:not(.dnb-anchor--no-hover) { border-radius: 0.25em; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor:hover:not(.dnb-anchor--no-hover), .eufemia-scope--10_104_0 .dnb-section :not(.dnb-anchor--no-style).dnb-anchor:hover:not(.dnb-anchor--no-hover).dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor:active { border-radius: 0.25em; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor:active, .eufemia-scope--10_104_0 .dnb-section :not(.dnb-anchor--no-style).dnb-anchor:active.dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor { transition: box-shadow 200ms ease-in-out, border-radius 200ms ease-in-out, background 200ms ease-in-out; } .eufemia-scope--10_104_0 [data-visual-test-wrapper] :not(.dnb-anchor--no-style).dnb-anchor { transition: none; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor .dnb-icon { display: inline; vertical-align: middle; white-space: nowrap; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor .dnb-icon svg { vertical-align: baseline; transform: scale(2) var(--anchor-icon-position); font-size: 0.5em; width: 2em; height: 1em; pointer-events: none; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor--no-icon .dnb-icon { display: none; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor--icon-left .dnb-icon:first-child::after { content: var(--anchor-icon-separator); } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor--icon-left .dnb-icon:first-child svg { margin-right: calc(var(--anchor-icon-gutter) * 2); } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor--icon-right .dnb-icon:last-child::before { content: var(--anchor-icon-separator); } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor--icon-right .dnb-icon:last-child svg { margin-left: calc(var(--anchor-icon-gutter) * 2); } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor .dnb-icon--default { font-size: 0.8888888889em; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor.dnb-anchor--contrast { color: var(--color-white); } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor.dnb-anchor--contrast:hover:where(:not(.dnb-anchor--no-hover)) { color: var(--anchor-color--contrast); box-shadow: inset 100vw 100vw 0 0 var(--color-white), calc(var(--anchor-background-gutter-left, 0.125rem) * -1) 0 0 0 var(--color-white), var(--anchor-background-gutter-right, 0.125rem) 0 0 0 var(--color-white); } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor.dnb-anchor--contrast:hover:not(.dnb-anchor--no-hover) { /* stylelint-disable-next-line scss/operator-no-unspaced */ } @supports not (selector(*:where(*))) { .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor.dnb-anchor--contrast:hover:not(.dnb-anchor--no-hover) { color: var(--anchor-color--contrast); box-shadow: inset 100vw 100vw 0 0 var(--color-white), calc(var(--anchor-background-gutter-left, 0.125rem) * -1) 0 0 0 var(--color-white), var(--anchor-background-gutter-right, 0.125rem) 0 0 0 var(--color-white); } } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor.dnb-anchor--contrast:active { color: var(--color-white); background-color: transparent; box-shadow: inset 100vw 100vw 0 0 transparent, calc(var(--anchor-background-gutter-left, 0.125rem) * -1) 0 0 0 transparent, var(--anchor-background-gutter-right, 0.125rem) 0 0 0 transparent; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor.dnb-anchor--contrast:focus-visible { color: var(--color-white); background-color: transparent; outline: none; --border-color: var(--color-white); --border-width: var(--focus-ring-width); box-shadow: 0 0 0 var(--border-width) var(--border-color); border-color: transparent; } .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor.dnb-anchor--disabled, .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor[aria-disabled=true], .eufemia-scope--10_104_0 :not(.dnb-anchor--no-style).dnb-anchor[disabled] { color: var(--anchor-color--disabled); } } .eufemia-scope--10_104_0 .dnb-anchor--hover { border-radius: 0.25em; } .eufemia-scope--10_104_0 .dnb-anchor--hover, .eufemia-scope--10_104_0 .dnb-section .dnb-anchor--hover.dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 .dnb-anchor--active { border-radius: 0.25em; } .eufemia-scope--10_104_0 .dnb-anchor--active, .eufemia-scope--10_104_0 .dnb-section .dnb-anchor--active.dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 .dnb-anchor--focus { background-color: transparent; transition: none; } .eufemia-scope--10_104_0 .dnb-anchor--focus, .eufemia-scope--10_104_0 .dnb-section .dnb-anchor--focus.dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 .dnb-anchor--focus { outline: none; --border-color: var(--focus-ring-color); --border-width: var(--focus-ring-width); box-shadow: 0 0 0 var(--border-width) var(--border-color); border-color: transparent; border-radius: 0.25em; } .eufemia-scope--10_104_0 .dnb-anchor--no-underline, .eufemia-scope--10_104_0 .dnb-section .dnb-anchor--no-underline.dnb-anchor { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 .dnb-anchor--no-radius, .eufemia-scope--10_104_0 .dnb-anchor--no-radius:hover, .eufemia-scope--10_104_0 .dnb-anchor--no-radius:active, .eufemia-scope--10_104_0 .dnb-anchor--no-radius:focus-visible { border-radius: 0; } .eufemia-scope--10_104_0 .dnb-anchor--no-animation { transition: none; } .eufemia-scope--10_104_0 a.dnb-button { transition: none; } .eufemia-scope--10_104_0 .dnb-skeleton > .dnb-anchor, .eufemia-scope--10_104_0 .dnb-anchor.dnb-skeleton { -webkit-text-decoration: none; text-decoration: none; } .eufemia-scope--10_104_0 .dnb-skeleton > .dnb-anchor .dnb-icon, .eufemia-scope--10_104_0 .dnb-anchor.dnb-skeleton .dnb-icon { filter: grayscale(100%) opacity(0.3); }