Skip to content

Commit

Permalink
refactor: move basic style sets from core to base (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
annsch authored Jan 12, 2023
1 parent 58c8a10 commit 06f1b12
Showing 1 changed file with 73 additions and 5 deletions.
78 changes: 73 additions & 5 deletions scss/_init.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,60 @@
@use "variables" as *;

:root {
// Todo: probably move these to the tokens as well
--db-focus-outline-offset: 1px;
--db-focus-outline-color: #{$db-colors-information-enabled};
--db-focus-outline-transition-duration: #{$db-transition-duration-ultra-fast};
--db-focus-outline-size: max(2px, 0.08em);

--db-disabled-text-opacity: 0.5;
}

// *! this is an opionionated (especially based on "enhancing" normalize.css) version of minireset.css v0.0.4 | MIT License | github.com/jgthms/minireset.css
html,
body {
margin: 0;
padding: 0;
}

// Box sizing
html {
box-sizing: border-box;
}

// Make sure every elements has the current color from container above
body {
color: var(--db-current-color, $db-colors-neutral-on-bg-enabled);
min-height: 100vh;
}

a {
color: inherit;

strong {
color: currentColor;
}
}

*,
::before,
::after {
box-sizing: inherit;
}

// Media
img,
embed,
iframe,
object,
video {
height: auto;
max-width: 100%;
}

// Iframe
iframe {
border: 0;
}

// Focus styles
Expand All @@ -23,11 +73,29 @@
}
}

// Make sure every elements has the current color from container above
body {
color: var(--db-current-color, $db-colors-neutral-on-bg-enabled);
// List style / https://marketingportal.extranet.deutschebahn.com/de/brandguide/typografie-1#8e0be060-c2f5-42a1-abbc-6b050845d73c~paragraph--image_link
:where(ul) {
list-style-type: "\2022"+ "   ";

li::marker {
color: #{$db-colors-primary-enabled};
}
}

a {
color: inherit;
// * Individual styles
// Navigation lists
nav,
[role="navigation"] {
ol,
ul {
list-style: none;

margin: 0;
padding: 0;
}
}

// Block
fieldset {
border: none;
}

0 comments on commit 06f1b12

Please sign in to comment.