Skip to content

Commit 06f1b12

Browse files
authored
refactor: move basic style sets from core to base (#223)
1 parent 58c8a10 commit 06f1b12

File tree

1 file changed

+73
-5
lines changed

1 file changed

+73
-5
lines changed

scss/_init.scss

+73-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,60 @@
11
@use "variables" as *;
22

33
:root {
4+
// Todo: probably move these to the tokens as well
45
--db-focus-outline-offset: 1px;
56
--db-focus-outline-color: #{$db-colors-information-enabled};
67
--db-focus-outline-transition-duration: #{$db-transition-duration-ultra-fast};
78
--db-focus-outline-size: max(2px, 0.08em);
9+
10+
--db-disabled-text-opacity: 0.5;
11+
}
12+
13+
// *! this is an opionionated (especially based on "enhancing" normalize.css) version of minireset.css v0.0.4 | MIT License | github.com/jgthms/minireset.css
14+
html,
15+
body {
16+
margin: 0;
17+
padding: 0;
18+
}
19+
20+
// Box sizing
21+
html {
22+
box-sizing: border-box;
23+
}
24+
25+
// Make sure every elements has the current color from container above
26+
body {
27+
color: var(--db-current-color, $db-colors-neutral-on-bg-enabled);
28+
min-height: 100vh;
29+
}
30+
31+
a {
32+
color: inherit;
33+
34+
strong {
35+
color: currentColor;
36+
}
37+
}
38+
39+
*,
40+
::before,
41+
::after {
42+
box-sizing: inherit;
43+
}
44+
45+
// Media
46+
img,
47+
embed,
48+
iframe,
49+
object,
50+
video {
51+
height: auto;
52+
max-width: 100%;
53+
}
54+
55+
// Iframe
56+
iframe {
57+
border: 0;
858
}
959

1060
// Focus styles
@@ -23,11 +73,29 @@
2373
}
2474
}
2575

26-
// Make sure every elements has the current color from container above
27-
body {
28-
color: var(--db-current-color, $db-colors-neutral-on-bg-enabled);
76+
// List style / https://marketingportal.extranet.deutschebahn.com/de/brandguide/typografie-1#8e0be060-c2f5-42a1-abbc-6b050845d73c~paragraph--image_link
77+
:where(ul) {
78+
list-style-type: "\2022"+ "   ";
79+
80+
li::marker {
81+
color: #{$db-colors-primary-enabled};
82+
}
2983
}
3084

31-
a {
32-
color: inherit;
85+
// * Individual styles
86+
// Navigation lists
87+
nav,
88+
[role="navigation"] {
89+
ol,
90+
ul {
91+
list-style: none;
92+
93+
margin: 0;
94+
padding: 0;
95+
}
96+
}
97+
98+
// Block
99+
fieldset {
100+
border: none;
33101
}

0 commit comments

Comments
 (0)