UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

546 lines (542 loc) 10.8 kB
/** * Import reset and body scope * */ /* * Utilities */ /* * Scopes * */ /* * Document Reset * */ /** * 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 * IE on Windows Phone and 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; } 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) !important; } html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover) { color: var(--color-white) !important; } 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 { /** * 1. Remove repeating backgrounds in all browsers (opinionated). * 2. Add border box sizing in all browsers (opinionated). */ } body *, body ::before, body ::after { background-repeat: no-repeat; /* 1 */ box-sizing: border-box; /* 2 */ } body { /** * 1. Add text decoration inheritance in all browsers (opinionated). * 2. Add vertical alignment inheritance in all browsers (opinionated). */ } body ::before, body ::after { text-decoration: inherit; /* 1 */ vertical-align: inherit; /* 2 */ } body { /* Grouping content */ /** * 1. Add the correct sizing in Firefox. * 2. Show the overflow in Edge and IE. */ } body hr { height: 0; /* 1 */ overflow: visible; /* 2 */ } body { /** * Add the correct display in IE. */ } body main { display: block; } body { /** * Remove the list style on navigation lists in all browsers (opinionated). */ } body nav ol, body nav ul { list-style: none; } body { /* Text-level semantics */ /** * Add the correct text decoration in Edge, IE, Opera, and Safari. */ } body abbr[title] { text-decoration: underline; -webkit-text-decoration: underline dotted; text-decoration: underline dotted; } body { /** * Add the correct font weight in Chrome, Edge, and Safari. */ } body b, body strong { font-weight: bolder; } body { /** * 1. Use the default monospace user interface font * in all browsers (opinionated). */ } body pre, body code, body kbd, body samp { font-family: var(--font-family-monospace); /* 1 */ } body { /* * Remove the text shadow on text selections in Firefox 61- (opinionated). * 1. Restore the coloring undone by defining the text shadow * in all browsers (opinionated). */ } body ::selection { background-color: #b3d4fc; /* 1 */ color: #000; /* 1 */ text-shadow: none; } body { /* Embedded content */ /* * Change the alignment on media elements in all browsers (opinionated). */ } body audio, body canvas, body iframe, body img, body svg, body video { vertical-align: middle; } body { /** * Add the correct display in IE 9-. */ } body audio, body video { display: inline-block; } body { /** * Add the correct display in iOS 4-7. */ } body audio:not([controls]) { display: none; height: 0; } body { /** * Remove the border on images inside links in IE 10-. */ } body img { border-style: none; } body { /** * Change the fill color to match the text color in all browsers (opinionated). */ } body svg:not([fill]) { fill: currentcolor; } body { /** * Hide the overflow in IE. */ } body svg:not(:root) { overflow: hidden; } body { /* Tabular data */ /** * Collapse border spacing in all browsers (opinionated). */ } body table { border-collapse: collapse; } body { /* Forms */ /** * Inherit styling in all browsers (opinionated). */ } body button, body input, body select, body textarea { font-family: inherit; font-size: inherit; line-height: inherit; } body { /** * Remove the margin in Safari. */ } body figure, body button, body input, body select { margin: 0; } body { /** * 1. Show the overflow in IE. * 2. Remove the inheritance of text transform in Edge, Firefox, and IE. */ } body button { overflow: visible; /* 1 */ text-transform: none; /* 2 */ } body { /** * Show the overflow in Edge and IE. * 1. Safari did inherit the break-word from html root */ } body input { overflow: visible; word-break: normal; /* 1 */ } body { /** * 1. Correct the text wrapping in Edge and IE. * 2. Correct the color inheritance from `fieldset` elements in IE. */ } body legend { color: inherit; /* 2 */ display: table; /* 1 */ max-width: 100%; /* 1 */ white-space: normal; /* 1 */ } body { /** * 1. Add the correct display in Edge and IE. * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. */ } body progress { display: inline-block; /* 1 */ vertical-align: baseline; /* 2 */ } body { /** * Remove the inheritance of text transform in Firefox. */ } body select { text-transform: none; } body { /** * 2. Remove the default vertical scrollbar in IE. * 3. Change the resize direction on textareas in all browsers (opinionated). */ } body textarea { overflow: auto; /* 2 */ resize: vertical; /* 3 */ } body { /** * Remove the padding in IE 10-. */ } body [type=checkbox], body [type=radio] { padding: 0; } body { /** * 1. Correct the odd appearance in Chrome and Safari. * 2. Correct the outline style in Safari. */ } body input[type=search] { -webkit-appearance: textfield; appearance: textfield; /* 1 */ outline-offset: -2px; /* 2 */ } body { /** * Correct the cursor style of increment and decrement buttons in Safari. */ } body ::-webkit-inner-spin-button, body ::-webkit-outer-spin-button { height: auto; } body { /** * Remove the inner padding in Chrome and Safari on macOS. */ } body ::-webkit-search-decoration { -webkit-appearance: none; appearance: none; } body { /** * 1. Change font properties to `inherit` in Safari. */ } body ::-webkit-file-upload-button { font: inherit; /* 1 */ background-color: transparent; border: none; } body { /** * Remove the inner border and padding of focus outlines in Firefox. */ } body ::-moz-focus-inner { border-style: none; padding: 0; } body { /* Interactive */ /* * Add the correct display in Edge and IE. */ } body details { display: block; } body { /* * Add the correct display in all browsers. */ } body summary { display: list-item; } body { /* Scripting */ /** * Add the correct display in IE 9-. */ } body canvas { display: inline-block; } body { /** * Add the correct display in IE. */ } body template { display: none; } body { /* User interaction */ /* * 1. Remove the tapping delay in IE 10. * 2. 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] { /* 1 */ touch-action: manipulation; /* 2 */ } body { /** * Add the correct display in IE 10-. */ } body [hidden] { display: none; } body { /* Accessibility */ /** * Change the cursor on busy elements in all browsers (opinionated). */ } body [aria-busy=true] { cursor: progress; } body { /* * Change the cursor on control elements in all browsers (opinionated). */ } body [aria-controls]:not(input) { cursor: pointer; } body { /* * Change the cursor on disabled, not-editable, or otherwise * inoperable elements in all browsers (opinionated). */ } body [aria-disabled=true], body [disabled] { cursor: not-allowed; } body { /* * Change the display on visually hidden accessible elements * in all browsers (opinionated). */ } body [aria-hidden=false][hidden]:not(:focus) { clip: rect(0, 0, 0, 0); display: inherit; position: absolute; } body { 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(--theme-color-body, var(--color-black-80, #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 */ -moz-tab-size: 4; /* stylelint-disable-next-line */ -ms-text-size-adjust: 100%; /* stylelint-disable-next-line */ -webkit-text-size-adjust: 100%; word-break: break-word; --eufemia-version: '10.104.0'; } @media print { body { background-color: white; color: black; } } body .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(--theme-color-body, var(--color-black-80, #333)); }