@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
851 lines (816 loc) • 18.1 kB
CSS
@charset "UTF-8";
/*
* This package includes the DNB core styles
*
*/
/*
* Scopes
*
*/
/*
* Document Reset
*
*/
/*
* Scopes
*
*/
/*
* Z-Index Scale
*
* Centralized z-index token definitions for layering control.
* Components should reference these variables instead of hardcoding values.
*
* Layers (low to high):
* section → 1 (content sections)
* dropdown → 100 (inline dropdowns, drawer-lists)
* popover → 1000 (popovers, floating elements)
* tooltip → 1100 (tooltips, always above popovers)
* modal → 3000 (dialogs, drawers, full overlays)
*/
:root {
--z-index-section: 1;
--z-index-dropdown: 100;
--z-index-popover: 1000;
--z-index-tooltip: 1100;
--z-index-modal: 3000;
}
/**
* 1. Use the default cursor in all browsers (opinionated).
* 2. Use the default user interface font in all browsers (opinionated).
* 3. Correct the line height in all browsers.
* 4. Use a 4-space tab width in all browsers (opinionated).
* 5. Prevent adjustments of font size after orientation changes in iOS.
* 6. Breaks words to prevent overflow in all browsers (opinionated).
*/
html {
cursor: default; /* 1 */
font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 2 */
line-height: var(--line-height-basis); /* 3 */ /* 4 */
tab-size: 4; /* 4 */ /* 5 */
-webkit-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
text-size-adjust: 100%; /* 5 */
word-break: break-word; /* 6 */
}
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms ;
animation-iteration-count: 1 ;
transition-duration: 0.01ms ;
scroll-behavior: auto ;
}
}
html:not([data-visual-test]) {
scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
html:not([data-visual-test]) {
scroll-behavior: auto;
}
}
html {
font-size: 100%;
}
@supports (-webkit-touch-callout: none) {
@supports (font: -apple-system-body) {
html {
font: -apple-system-body; /* stylelint-disable-line */
}
}
}
html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active {
color: var(--color-mint-green) ;
}
html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary {
color: var(--color-white);
}
html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul {
list-style: initial;
}
html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p {
overflow: initial;
text-align: inherit;
background-color: initial;
}
html[xmlns="http://www.w3.org/1999/xhtml"] i {
font-style: italic;
}
html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,
html[xmlns="http://www.w3.org/1999/xhtml"] #root {
width: 100%;
}
html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,
html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper {
width: 100%;
padding: 0;
}
html[xmlns="http://www.w3.org/1999/xhtml"] #column_content {
box-shadow: none;
}
body,
.dnb-core-style {
/**
* 1. Remove repeating backgrounds in all browsers (opinionated).
* 2. Add border box sizing in all browsers (opinionated).
*/
}
body *,
body ::before,
body ::after,
.dnb-core-style *,
.dnb-core-style ::before,
.dnb-core-style ::after {
background-repeat: no-repeat; /* 1 */
box-sizing: border-box; /* 2 */
}
body,
.dnb-core-style {
/**
* 1. Add text decoration inheritance in all browsers (opinionated).
* 2. Add vertical alignment inheritance in all browsers (opinionated).
*/
}
body ::before,
body ::after,
.dnb-core-style ::before,
.dnb-core-style ::after {
text-decoration: inherit; /* 1 */
vertical-align: inherit; /* 2 */
}
body,
.dnb-core-style {
/* Grouping content
*/
/**
* Add the correct sizing in Firefox.
*/
}
body hr,
.dnb-core-style hr {
height: 0; /* 1 */
overflow: visible; /* 2 */
}
body,
.dnb-core-style {
/**
* Remove the list style on navigation lists in all browsers (opinionated).
*/
}
body nav ol,
body nav ul,
.dnb-core-style nav ol,
.dnb-core-style nav ul {
list-style: none;
}
body,
.dnb-core-style {
/* Text-level semantics
*/
/**
* Add the correct text decoration in Opera and Safari.
*/
}
body abbr[title],
.dnb-core-style abbr[title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
body,
.dnb-core-style {
/**
* Add the correct font weight in Chrome and Safari.
*/
}
body b,
body strong,
.dnb-core-style b,
.dnb-core-style strong {
font-weight: bolder;
}
body,
.dnb-core-style {
/**
* 1. Use the default monospace user interface font
* in all browsers (opinionated).
*/
}
body pre,
body code,
body kbd,
body samp,
.dnb-core-style pre,
.dnb-core-style code,
.dnb-core-style kbd,
.dnb-core-style samp {
font-family: var(--font-family-monospace); /* 1 */
}
body,
.dnb-core-style {
/*
* Restore the coloring and remove text shadow on text selections (opinionated).
*/
}
body ::selection,
.dnb-core-style ::selection {
background-color: #b3d4fc;
color: var(--color-black);
text-shadow: none;
}
body,
.dnb-core-style {
/* Embedded content
*/
/*
* Change the alignment on media elements in all browsers (opinionated).
*/
}
body audio,
body canvas,
body iframe,
body img,
body svg,
body video,
.dnb-core-style audio,
.dnb-core-style canvas,
.dnb-core-style iframe,
.dnb-core-style img,
.dnb-core-style svg,
.dnb-core-style video {
vertical-align: middle;
}
body,
.dnb-core-style {
/**
* Change the fill color to match the text color in all browsers (opinionated).
*/
}
body svg:not([fill]),
.dnb-core-style svg:not([fill]) {
fill: currentcolor;
}
body,
.dnb-core-style {
/* Tabular data
*/
/**
* Collapse border spacing in all browsers (opinionated).
*/
}
body table,
.dnb-core-style table {
border-collapse: collapse;
}
body,
.dnb-core-style {
/* Forms
*/
/**
* Inherit styling in all browsers (opinionated).
*/
}
body button,
body input,
body select,
body textarea,
.dnb-core-style button,
.dnb-core-style input,
.dnb-core-style select,
.dnb-core-style textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
body,
.dnb-core-style {
/**
* Remove the margin in Safari.
*/
}
body figure,
body button,
body input,
body select,
.dnb-core-style figure,
.dnb-core-style button,
.dnb-core-style input,
.dnb-core-style select {
margin: 0;
}
body,
.dnb-core-style {
/**
* Remove the inheritance of text transform in Firefox.
*/
}
body button,
.dnb-core-style button {
text-transform: none;
}
body,
.dnb-core-style {
/**
* Safari did inherit the break-word from html root
*/
}
body input,
.dnb-core-style input {
word-break: normal;
}
body,
.dnb-core-style {
/**
* Correct the color inheritance from `fieldset` elements.
*/
}
body legend,
.dnb-core-style legend {
color: inherit;
display: table;
max-width: 100%;
white-space: normal;
}
body,
.dnb-core-style {
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
}
body progress,
.dnb-core-style progress {
display: inline-block;
vertical-align: baseline;
}
body,
.dnb-core-style {
/**
* Remove the inheritance of text transform in Firefox.
*/
}
body select,
.dnb-core-style select {
text-transform: none;
}
body,
.dnb-core-style {
/**
* Change the resize direction on textareas in all browsers (opinionated).
*/
}
body textarea,
.dnb-core-style textarea {
resize: vertical;
}
body,
.dnb-core-style {
/**
* Correct the odd appearance in Chrome and Safari.
*/
}
body input[type=search],
.dnb-core-style input[type=search] {
-webkit-appearance: textfield;
appearance: textfield;
outline-offset: -2px;
}
body,
.dnb-core-style {
/**
* Correct the cursor style of increment and decrement buttons in Safari.
*/
}
body ::-webkit-inner-spin-button,
body ::-webkit-outer-spin-button,
.dnb-core-style ::-webkit-inner-spin-button,
.dnb-core-style ::-webkit-outer-spin-button {
height: auto;
}
body,
.dnb-core-style {
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
}
body ::-webkit-search-decoration,
.dnb-core-style ::-webkit-search-decoration {
-webkit-appearance: none;
appearance: none;
}
body,
.dnb-core-style {
/**
* Change font properties to inherit in Safari.
*/
}
body ::-webkit-file-upload-button,
.dnb-core-style ::-webkit-file-upload-button {
font: inherit;
background-color: transparent;
border: none;
}
body,
.dnb-core-style {
/**
* Remove the inner border and padding of focus outlines in Firefox.
*/
}
body ::-moz-focus-inner,
.dnb-core-style ::-moz-focus-inner {
border-style: none;
padding: 0;
}
body,
.dnb-core-style {
/* Interactive
*/
/*
* Add the correct display in all browsers.
*/
}
body summary,
.dnb-core-style summary {
display: list-item;
}
body,
.dnb-core-style {
/* Scripting
*/
/**
* Add the correct display in all browsers.
*/
}
body template,
.dnb-core-style template {
display: none;
}
body,
.dnb-core-style {
/* User interaction
*/
/*
* Remove the tapping delay on clickable elements in all browsers (opinionated).
*/
}
body a,
body area,
body button,
body input,
body label,
body select,
body summary,
body textarea,
body [tabindex],
.dnb-core-style a,
.dnb-core-style area,
.dnb-core-style button,
.dnb-core-style input,
.dnb-core-style label,
.dnb-core-style select,
.dnb-core-style summary,
.dnb-core-style textarea,
.dnb-core-style [tabindex] {
touch-action: manipulation;
}
body,
.dnb-core-style {
/**
* Add the correct display in all browsers.
*/
}
body [hidden],
.dnb-core-style [hidden] {
display: none;
}
body,
.dnb-core-style {
/* Accessibility
*/
/**
* Change the cursor on busy elements in all browsers (opinionated).
*/
}
body [aria-busy=true],
.dnb-core-style [aria-busy=true] {
cursor: progress;
}
body,
.dnb-core-style {
/*
* Change the cursor on control elements in all browsers (opinionated).
*/
}
body [aria-controls]:not(input),
.dnb-core-style [aria-controls]:not(input) {
cursor: pointer;
}
body,
.dnb-core-style {
/*
* Change the cursor on disabled, not-editable, or otherwise
* inoperable elements in all browsers (opinionated).
*/
}
body [aria-disabled=true],
body [disabled],
.dnb-core-style [aria-disabled=true],
.dnb-core-style [disabled] {
cursor: not-allowed;
}
body,
.dnb-core-style {
/*
* Change the display on visually hidden accessible elements
* in all browsers (opinionated).
*/
}
body [aria-hidden=false][hidden]:not(:focus),
.dnb-core-style [aria-hidden=false][hidden]:not(:focus) {
clip-path: inset(100%);
display: inherit;
position: absolute;
}
body,
.dnb-core-style {
font-family: var(--font-family-default);
font-weight: var(--font-weight-basis);
font-size: var(--font-size-small);
font-style: normal;
line-height: var(--line-height-basis);
color: var(--token-color-text-neutral, #333);
/* stylelint-disable-next-line */
-moz-osx-font-smoothing: grayscale;
/* stylelint-disable-next-line */
-webkit-font-smoothing: antialiased;
/* stylelint-disable-next-line */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
/**
* Ensure consistency and use the same as HTML reset -> html {...}
* between base and code package
*/
tab-size: 4;
/* stylelint-disable-next-line */
-webkit-text-size-adjust: 100%;
word-break: break-word;
--eufemia-version: '11.0.0';
}
@media print {
body,
.dnb-core-style {
background-color: white;
color: black;
}
}
body .eufemia-theme,
.dnb-core-style .eufemia-theme {
font-family: var(--font-family-default);
font-weight: var(--font-weight-basis);
font-size: var(--font-size-small);
font-style: normal;
line-height: var(--line-height-basis);
color: var(--token-color-text-neutral, #333);
}
/*
* Helper Classes
*
*/
/*
* Utilities
*/
/*
* Utilities
*/
.dnb-no-focus {
outline: none;
}
.dnb-tab-focus {
outline: none;
}
.dnb-tab-focus:focus {
outline: none;
}
html[data-whatinput=keyboard] .dnb-tab-focus:focus {
--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;
}
.dnb-mouse-focus {
outline: none;
}
.dnb-mouse-focus:focus {
outline: none;
}
html[data-whatinput=mouse] .dnb-mouse-focus:focus {
--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;
}
.dnb-focus-ring {
--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;
}
.dnb-scrollbar-appearance {
scrollbar-color: var(--scrollbar-thumb-color, #888) transparent;
}
@supports not (scrollbar-color: auto) {
.dnb-scrollbar-appearance::-webkit-scrollbar:vertical {
width: var(--scrollbar-track-width, 0.5rem);
}
.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal {
height: var(--scrollbar-track-width, 0.5rem);
}
.dnb-scrollbar-appearance::-webkit-scrollbar {
border-radius: var(--scrollbar-thumb-width, 0.5rem);
background-color: var(--scrollbar-track-color, #eee);
}
.dnb-scrollbar-appearance::-webkit-scrollbar-thumb {
background-color: var(--scrollbar-thumb-color, #888);
}
.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover {
background-color: var(--scrollbar-thumb-hover-color, #666);
}
.dnb-scrollbar-appearance::-webkit-scrollbar-thumb {
border-radius: var(--scrollbar-thumb-width, 0.5rem);
}
}
/*
* Helper Classes
*
*/
/*
* Utilities
*/
/*
* Utilities
*/
.dnb-skip-link {
position: absolute;
z-index: 0;
top: -100vh;
opacity: 0.3;
transition: opacity 0.3s ease-out;
}
.dnb-skip-link--active,
.dnb-skip-link:focus {
position: fixed;
z-index: 9999;
top: 5%;
left: 40%;
margin: 0;
padding: 0.5rem 1rem;
white-space: nowrap;
font-size: var(--font-size-basis);
color: var(--skip-link-color);
-webkit-text-decoration: none;
text-decoration: none;
text-align: center;
user-select: none;
/* stylelint-disable-next-line */
-webkit-user-select: none;
outline: none;
background-color: transparent;
border-radius: 0;
border: none;
box-shadow: none;
}
.dnb-skip-link--active::after,
.dnb-skip-link:focus::after {
content: "";
position: absolute;
z-index: -2;
left: -200vw;
top: -200vh;
width: 150vw;
height: 150vh;
background-color: rgba(255, 255, 255, 0.85);
box-shadow: 150vw 150vh 0 0 rgba(255, 255, 255, 0.85);
}
.dnb-skip-link--active::before,
.dnb-skip-link:focus::before {
content: "";
position: absolute;
z-index: -1;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 1.5rem;
background-color: var(--skip-link-background);
outline: none;
}
html[data-whatinput=mouse] .dnb-skip-link--active::before,
html[data-whatinput=mouse] .dnb-skip-link:focus::before {
--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;
}
.dnb-skip-link--active:hover::before,
.dnb-skip-link:focus:hover::before {
background-color: var(--skip-link-background--hover);
}
.dnb-skip-link--active:active::before,
.dnb-skip-link:focus:active::before {
background-color: var(--skip-link-background--active);
}
.dnb-skip-link--active:focus:not(:active)::before,
.dnb-skip-link:focus:focus:not(:active)::before {
outline: none;
}
html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active)::before,
html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active)::before {
--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;
}
.dnb-skip-link--active:focus,
.dnb-skip-link:focus:focus {
opacity: 1;
}
.dnb-skip-link--active:hover,
.dnb-skip-link:focus:hover {
color: var(--skip-link-color--hover);
background-color: transparent;
box-shadow: none;
}
.dnb-skip-link--active:focus:not(:hover):not(:active),
.dnb-skip-link:focus:focus:not(:hover):not(:active) {
color: var(--skip-link-color);
background-color: transparent;
box-shadow: none;
}
.dnb-skip-link--active:active,
.dnb-skip-link:focus:active {
color: var(--skip-link-color--active);
background-color: transparent;
}
html[data-whatintent=touch] .dnb-skip-link {
display: none;
}
.dnb-alignment-helper {
display: inline-block;
width: 0;
height: 0;
font-size: var(--font-size-small);
speak: none;
}
.dnb-alignment-helper::before {
content: "";
display: inline-block;
width: 0;
height: 0;
font-size: var(--font-size-small);
speak: none;
height: 100%;
opacity: 0;
}
.dnb-alignment-helper--pseudo-element-only::before {
content: "";
display: inline-block;
width: 0;
height: 0;
font-size: var(--font-size-small);
speak: none;
height: 100%;
opacity: 0;
}
.dnb-drop-shadow {
box-shadow: var(--shadow-default);
}
.dnb-sharp-drop-shadow {
box-shadow: var(--shadow-sharp);
}
.dnb-sr-only {
-webkit-user-select: none ;
user-select: none ;
-webkit-touch-callout: none ;
pointer-events: none ;
position: absolute ;
clip-path: inset(50%) ;
max-width: 1px ;
max-height: 1px ;
overflow: hidden ;
white-space: nowrap ;
padding: 0 ;
margin: 0 ;
border: 0 ;
}
.dnb-suffix {
padding-left: 0.5rem;
font-size: var(--font-size-basis);
line-height: var(--line-height-basis);
word-break: normal;
}