@madgex/design-system 1.11.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tokens/css/_tokens.css +16 -8
- package/dist/_tokens/js/_tokens-module.js +219 -69
- package/dist/_tokens/scss/_tokens.scss +38 -14
- package/dist/css/index.css +2848 -2303
- package/fractal-theme/assets/css/styles.css +14 -1
- package/package.json +5 -5
- package/src/components/button/button.scss +10 -6
- package/src/components/tabs/tabs.scss +6 -6
- package/src/helpers/borders/README.md +26 -0
- package/src/helpers/borders/borders.njk +13 -0
- package/src/helpers/display/README.md +8 -0
- package/src/helpers/display/display.njk +14 -0
- package/src/helpers/floats/README.md +8 -0
- package/src/helpers/floats/floats.njk +5 -0
- package/src/helpers/text-align/README.md +8 -0
- package/src/helpers/text-align/text-align.njk +4 -0
- package/src/layout/containers/README.md +6 -0
- package/src/layout/containers/containers.njk +13 -0
- package/src/scss/core/__index.scss +1 -0
- package/src/scss/core/_containers.scss +31 -0
- package/src/scss/core/_defaults.scss +16 -6
- package/src/scss/helpers/__index.scss +4 -0
- package/src/scss/helpers/_borders.scss +100 -0
- package/src/scss/helpers/_display.scss +35 -0
- package/src/scss/helpers/_floats.scss +18 -0
- package/src/scss/helpers/_text-align.scss +18 -0
- package/src/scss/index.scss +3 -2
- package/src/scss/resets/__index.scss +96 -0
- package/src/scss/utilities/_mixins.scss +24 -0
- package/src/scss/vendor/_normalize.scss +0 -10
- package/src/tokens/color.json +62 -53
- package/src/tokens/size.json +30 -3
- package/src/typography/lists.njk +9 -3
- /package/src/{layout → helpers}/spacing/README.md +0 -0
- /package/src/{layout → helpers}/spacing/spacing.njk +0 -0
|
@@ -41,4 +41,17 @@
|
|
|
41
41
|
padding: 10px;
|
|
42
42
|
text-align: center;
|
|
43
43
|
margin-bottom: 1rem;
|
|
44
|
-
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.container-example.mds-site-container {
|
|
47
|
+
background-color: #ff6861;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.container-example .mds-wrapper {
|
|
51
|
+
background-color: #fcba30;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.container-example .mds-wrapper .content-example {
|
|
55
|
+
padding: 30px;
|
|
56
|
+
min-height: 250px;
|
|
57
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@madgex/design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"clean": "rimraf dist public tokens/build",
|
|
6
6
|
"commit": "commit",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"babel-loader": "^8.0.6",
|
|
38
38
|
"commitizen": "^3.1.1",
|
|
39
39
|
"concurrently": "^4.1.0",
|
|
40
|
-
"css-loader": "^
|
|
40
|
+
"css-loader": "^3.0.0",
|
|
41
41
|
"cssnano": "^4.1.10",
|
|
42
42
|
"cz-conventional-changelog": "^2.1.0",
|
|
43
|
-
"del": "^
|
|
43
|
+
"del": "^5.0.0",
|
|
44
44
|
"file-loader": "^4.0.0",
|
|
45
45
|
"flat": "^4.1.0",
|
|
46
46
|
"glob": "^7.1.4",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"gulp-svgmin": "^2.2.0",
|
|
51
51
|
"gulp-svgstore": "^7.0.1",
|
|
52
52
|
"gulp-tap": "^1.0.1",
|
|
53
|
-
"husky": "^
|
|
54
|
-
"lint-staged": "^
|
|
53
|
+
"husky": "^3.0.0",
|
|
54
|
+
"lint-staged": "^9.2.0",
|
|
55
55
|
"mini-css-extract-plugin": "^0.7.0",
|
|
56
56
|
"node-sass": "^4.12.0",
|
|
57
57
|
"postcss": "^7.0.17",
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
$mds-color-button-bg: $mds-color-brand-2-base !default;
|
|
2
|
+
$mds-color-button-bg-hover: $mds-color-brand-2-light !default;
|
|
3
|
+
|
|
1
4
|
.mds-button {
|
|
2
5
|
cursor: pointer;
|
|
3
6
|
user-select: none;
|
|
@@ -5,13 +8,13 @@
|
|
|
5
8
|
white-space: nowrap;
|
|
6
9
|
-webkit-appearance: none;
|
|
7
10
|
border: 1px solid transparent;
|
|
8
|
-
color: $mds-color-
|
|
11
|
+
background-color: $mds-color-button-bg;
|
|
9
12
|
padding: ($mds-size-baseline * 2) ($mds-size-baseline * 3);
|
|
10
|
-
background-color: $mds-color-brand-1-base;
|
|
11
13
|
font-size: 100%;
|
|
12
14
|
width: 100%;
|
|
13
15
|
display: inline-block;
|
|
14
16
|
text-align: center;
|
|
17
|
+
@include mds-text-contrast($mds-color-button-bg);
|
|
15
18
|
|
|
16
19
|
@include mq($from: md) {
|
|
17
20
|
width: auto;
|
|
@@ -20,14 +23,15 @@
|
|
|
20
23
|
// Ensure that any global link styles are overridden
|
|
21
24
|
&:link,
|
|
22
25
|
&:visited,
|
|
23
|
-
&:active
|
|
24
|
-
&:hover {
|
|
25
|
-
color: $mds-color-white;
|
|
26
|
+
&:active {
|
|
26
27
|
text-decoration: none;
|
|
28
|
+
@include mds-text-contrast($mds-color-button-bg);
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
&:hover,
|
|
30
32
|
&:focus {
|
|
31
|
-
|
|
33
|
+
background-color: $mds-color-button-bg-hover;
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
@include mds-text-contrast($mds-color-button-bg-hover);
|
|
32
36
|
}
|
|
33
37
|
}
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
display: none;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.mds-tabs__list{
|
|
5
|
+
.mds-tabs__list {
|
|
6
6
|
margin-bottom: $mds-size-baseline * 2;
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
.js & {
|
|
9
9
|
border-bottom: $mds-size-border-width solid $mds-color-border;
|
|
10
10
|
margin-bottom: 0;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.js .mds-tabs__list-item{
|
|
14
|
+
.js .mds-tabs__list-item {
|
|
15
15
|
display: inline-block;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.mds-tabs__tab{
|
|
18
|
+
.mds-tabs__tab {
|
|
19
19
|
display: inline-block;
|
|
20
20
|
margin-bottom: $mds-size-baseline * 2;
|
|
21
21
|
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.js .mds-tabs__tab.mds-tabs__tab--selected {
|
|
35
|
-
background-color: $mds-color-white;
|
|
35
|
+
background-color: $mds-color-neutral-white;
|
|
36
36
|
padding-bottom: ($mds-size-baseline * 2) + 1px;
|
|
37
37
|
margin-bottom: -1px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.js .mds-tabs__panel{
|
|
40
|
+
.js .mds-tabs__panel {
|
|
41
41
|
padding: ($mds-size-baseline * 3) ($mds-size-baseline * 4);
|
|
42
42
|
border: $mds-size-border-width solid $mds-color-border;
|
|
43
43
|
border-top: 0;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## Helpers
|
|
2
|
+
|
|
3
|
+
### Border
|
|
4
|
+
|
|
5
|
+
Use the class `mds-border`, followed by a position: `top`, `right`, `bottom`, `left` (optional), a breakpoint: `sm`, `md`, `lg`, `xl` (optional), and a flag none as required (optional).
|
|
6
|
+
|
|
7
|
+
Examples:
|
|
8
|
+
|
|
9
|
+
- `mds-border`
|
|
10
|
+
- `mds-border-lg-none`
|
|
11
|
+
- `mds-border-md-bottom`
|
|
12
|
+
|
|
13
|
+
the hierarchy of the classes is (where last class overrides all the previous ones):
|
|
14
|
+
|
|
15
|
+
- `mds-border`
|
|
16
|
+
- `mds-border-none`
|
|
17
|
+
- `mds-border-[breakpoint]`
|
|
18
|
+
- `mds-border-[breakpoint]-none`
|
|
19
|
+
- `mds-border-[position]`
|
|
20
|
+
- `mds-border-[position]-none`
|
|
21
|
+
- `mds-border-[breakpoint]-[position]`
|
|
22
|
+
- `mds-border-[breakpoint]-[position]-none`
|
|
23
|
+
|
|
24
|
+
### Border radius
|
|
25
|
+
|
|
26
|
+
Use the class `mds-border-radius` to add border radius to all corners, and `mds-border-radius-none` to remove it.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<h2>Borders</h2>
|
|
2
|
+
<div class="mds-border">A div with default border</div>
|
|
3
|
+
<br/>
|
|
4
|
+
<div class="mds-border-xl">A div with default border from 'xl' breakpoint</div>
|
|
5
|
+
<br/>
|
|
6
|
+
<div class="mds-border mds-border-xl-none">A div with default border before 'xl' breakpoint</div>
|
|
7
|
+
<br/>
|
|
8
|
+
<div class="mds-border mds-border-md-top-none">A div with default border and no border after 'md' breakpoint</div>
|
|
9
|
+
<br/>
|
|
10
|
+
<div class="mds-border mds-border-sm-none mds-border-sm-top mds-border-md-right mds-border-lg-bottom mds-border-xl-left">A div with all borders as default, only top border after 'sm', plus right border after 'md', plus bottom border after 'lg' and plus left border after 'xl', breakpoints</div>
|
|
11
|
+
|
|
12
|
+
<h2>Border radius</h2>
|
|
13
|
+
<div class="mds-border mds-border-radius">A div with borders and border radius</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<h2>Display</h2>
|
|
2
|
+
<div class="mds-display-block">A div with display block<br/></div>
|
|
3
|
+
<div class="mds-display-block mds-display-lg-inline-block" style="color: #ff6861;">
|
|
4
|
+
A div with block and inline-block after 'lg' breakpoint<br/>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="mds-display-block mds-display-lg-inline" style="color: #1B75BB;">
|
|
7
|
+
A div with block and inline after 'lg' breakpoint<br/>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="mds-display-xl-none" style="color: #3e2563;">
|
|
10
|
+
A div hidden from 'xl' breakpoint<br/>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="mds-display-none mds-display-xl-block" style="color: #ff6861;">
|
|
13
|
+
A div visible from 'xl' breakpoint<br/>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
## Containers
|
|
2
|
+
|
|
3
|
+
Class `mds-site-container` should be added right after the body, it contains all the visual elements of the site
|
|
4
|
+
`mds-wrapper` inside `mds-site-container` will give a max-width to the content of the pages
|
|
5
|
+
|
|
6
|
+
`mds-surface` will add a block with a white background, border and and border-radius. Add `mds-surface__inner` inside it to get the padding.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div class="mds-site-container container-example">
|
|
2
|
+
<div class="mds-wrapper">
|
|
3
|
+
<div class="content-example">
|
|
4
|
+
<div class="mds-surface">
|
|
5
|
+
<div class="mds-surface__inner">
|
|
6
|
+
<h2>Content inside the site-container and wrapper</h2>
|
|
7
|
+
<p>site-container is 100%</p>
|
|
8
|
+
<p>wrapper is 100% and max-width 1280px (2.5% left and right padding)</p>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
body {
|
|
2
|
+
background: $mds-color-background-body;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.mds-site-container {
|
|
6
|
+
width: $mds-size-container-width;
|
|
7
|
+
max-width: $mds-size-container-max-width;
|
|
8
|
+
min-width: $mds-size-container-min-width;
|
|
9
|
+
margin: 0 auto;
|
|
10
|
+
background: $mds-color-background-site-container;
|
|
11
|
+
// box-shadow: $mds-color-container-box-shadow;
|
|
12
|
+
}
|
|
13
|
+
.mds-wrapper {
|
|
14
|
+
width: $mds-size-wrapper-width;
|
|
15
|
+
max-width: $mds-size-wrapper-max-width;
|
|
16
|
+
margin: 0 auto;
|
|
17
|
+
padding: 0 $mds-size-wrapper-padding;
|
|
18
|
+
@include mq($from: xl) {
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.mds-surface {
|
|
24
|
+
background: $mds-color-background-surface;
|
|
25
|
+
@extend .mds-border;
|
|
26
|
+
@extend .mds-border-radius;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mds-surface__inner {
|
|
30
|
+
padding: $mds-size-surface-padding;
|
|
31
|
+
}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
$mds-color-link: $mds-color-brand-1-base !default;
|
|
2
|
+
$mds-color-link-hover: $mds-color-brand-1-dark !default;
|
|
1
3
|
|
|
2
|
-
ol,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, pre {
|
|
5
|
+
margin-bottom: $mds-size-baseline * 3;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
a {
|
|
10
|
+
color: $mds-color-link;
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
|
|
13
|
+
&:hover,
|
|
14
|
+
&:focus {
|
|
15
|
+
color: $mds-color-link-hover;
|
|
16
|
+
text-decoration: underline;
|
|
17
|
+
}
|
|
8
18
|
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
$breakpoints: map-get(map-get($tokens, 'size'), 'breakpoint');
|
|
2
|
+
$positions: top, right, bottom, left;
|
|
3
|
+
$corners: top-left, top-right, bottom-right, bottom-left;
|
|
4
|
+
|
|
5
|
+
.mds-border {
|
|
6
|
+
border: $mds-size-border-width solid $mds-color-border;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.mds-border-none {
|
|
10
|
+
border: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@each $bpname, $value in $breakpoints {
|
|
14
|
+
@include mq($from: $bpname) {
|
|
15
|
+
.mds-border-#{$bpname} {
|
|
16
|
+
border: $mds-size-border-width solid $mds-color-border;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@each $bpname, $value in $breakpoints {
|
|
22
|
+
@include mq($from: $bpname) {
|
|
23
|
+
.mds-border-#{$bpname}-none {
|
|
24
|
+
border: 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@each $position in $positions {
|
|
30
|
+
.mds-border-#{$position} {
|
|
31
|
+
border-#{$position}: $mds-size-border-width solid $mds-color-border;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@each $position in $positions {
|
|
36
|
+
.mds-border-#{$position}-none {
|
|
37
|
+
border-#{$position}: 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@each $bpname, $value in $breakpoints {
|
|
42
|
+
@include mq($from: $bpname) {
|
|
43
|
+
@each $position in $positions {
|
|
44
|
+
.mds-border-#{$bpname}-#{$position} {
|
|
45
|
+
border-#{$position}: $mds-size-border-width solid $mds-color-border;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@each $bpname, $value in $breakpoints {
|
|
52
|
+
@include mq($from: $bpname) {
|
|
53
|
+
@each $position in $positions {
|
|
54
|
+
.mds-border-#{$bpname}-#{$position}-none {
|
|
55
|
+
border-#{$position}: 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// border radius
|
|
62
|
+
.mds-border-radius {
|
|
63
|
+
border-radius: $mds-size-border-radius;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.mds-border-radius-none {
|
|
67
|
+
border-radius: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 0/4 corners
|
|
71
|
+
// @each $bpname, $value in $breakpoints {
|
|
72
|
+
// @include mq($from: $bpname) {
|
|
73
|
+
// .mds-border-radius-#{$bpname} {
|
|
74
|
+
// border-radius: $mds-size-border-radius;
|
|
75
|
+
// }
|
|
76
|
+
// .mds-border-radius-#{$bpname}-none {
|
|
77
|
+
// border-radius: 0;
|
|
78
|
+
// }
|
|
79
|
+
// }
|
|
80
|
+
// }
|
|
81
|
+
|
|
82
|
+
// 1 corner
|
|
83
|
+
// @each $corner in $corners {
|
|
84
|
+
// .mds-border-radius-#{$corner} {
|
|
85
|
+
// border-#{$corner}-radius: $mds-size-border-radius;
|
|
86
|
+
// }
|
|
87
|
+
// }
|
|
88
|
+
|
|
89
|
+
// @each $bpname, $value in $breakpoints {
|
|
90
|
+
// @include mq($from: $bpname) {
|
|
91
|
+
// @each $corner in $corners {
|
|
92
|
+
// .mds-border-radius-#{$bpname}-#{$corner} {
|
|
93
|
+
// border-#{$corner}-radius: $mds-size-border-radius;
|
|
94
|
+
// }
|
|
95
|
+
// .mds-border-radius-#{$bpname}-#{$corner}-none {
|
|
96
|
+
// border-#{$corner}-radius: 0;
|
|
97
|
+
// }
|
|
98
|
+
// }
|
|
99
|
+
// }
|
|
100
|
+
// }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
$breakpoints: map-get(map-get($tokens, 'size'), 'breakpoint');
|
|
2
|
+
$types: block, inline, inline-block, none;
|
|
3
|
+
|
|
4
|
+
@each $type in $types {
|
|
5
|
+
.mds-display-#{$type} {
|
|
6
|
+
display: #{$type};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@each $bpname, $value in $breakpoints {
|
|
11
|
+
@include mq($from: $bpname) {
|
|
12
|
+
@each $type in $types {
|
|
13
|
+
.mds-display-#{$bpname}-#{$type} {
|
|
14
|
+
display: #{$type};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// .js .mds-js-display-none {
|
|
21
|
+
// display: none;
|
|
22
|
+
// }
|
|
23
|
+
// .js .mds-js-display-block {
|
|
24
|
+
// display: block;
|
|
25
|
+
// }
|
|
26
|
+
// @each $bpname, $value in $breakpoints {
|
|
27
|
+
// @include mq($from: $bpname) {
|
|
28
|
+
// .js .mds-js-display-#{$bpname}-none {
|
|
29
|
+
// display: none;
|
|
30
|
+
// }
|
|
31
|
+
// .js .mds-js-display-#{$bpname}-block {
|
|
32
|
+
// display: block;
|
|
33
|
+
// }
|
|
34
|
+
// }
|
|
35
|
+
// }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
$breakpoints: map-get(map-get($tokens, 'size'), 'breakpoint');
|
|
2
|
+
$positions: left, right, none;
|
|
3
|
+
|
|
4
|
+
@each $position in $positions {
|
|
5
|
+
.mds-float-#{$position} {
|
|
6
|
+
float: #{$position};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@each $bpname, $value in $breakpoints {
|
|
11
|
+
@include mq($from: $bpname) {
|
|
12
|
+
@each $position in $positions {
|
|
13
|
+
.mds-float-#{$bpname}-#{$position} {
|
|
14
|
+
float: #{$position};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
$breakpoints: map-get(map-get($tokens, 'size'), 'breakpoint');
|
|
2
|
+
$positions: left, right, center;
|
|
3
|
+
|
|
4
|
+
@each $position in $positions {
|
|
5
|
+
.mds-text-align-#{$position} {
|
|
6
|
+
text-align: #{$position};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@each $bpname, $value in $breakpoints {
|
|
11
|
+
@include mq($from: $bpname) {
|
|
12
|
+
@each $position in $positions {
|
|
13
|
+
.mds-text-align-#{$bpname}-#{$position} {
|
|
14
|
+
text-align: #{$position};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
package/src/scss/index.scss
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
@import '../../dist/_tokens/scss/tokens';
|
|
2
|
+
@import 'resets/_index';
|
|
2
3
|
@import 'vendor/normalize';
|
|
3
|
-
@import '
|
|
4
|
+
@import 'helpers/_index';
|
|
4
5
|
@import 'functions/_index';
|
|
5
6
|
@import 'utilities/_index';
|
|
6
|
-
@import '
|
|
7
|
+
@import 'core/_index';
|
|
7
8
|
|
|
8
9
|
*,
|
|
9
10
|
*::before,
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
html,
|
|
2
|
+
body,
|
|
3
|
+
div,
|
|
4
|
+
span,
|
|
5
|
+
applet,
|
|
6
|
+
object,
|
|
7
|
+
iframe,
|
|
8
|
+
h1,
|
|
9
|
+
h2,
|
|
10
|
+
h3,
|
|
11
|
+
h4,
|
|
12
|
+
h5,
|
|
13
|
+
h6,
|
|
14
|
+
p,
|
|
15
|
+
blockquote,
|
|
16
|
+
pre,
|
|
17
|
+
a,
|
|
18
|
+
abbr,
|
|
19
|
+
acronym,
|
|
20
|
+
address,
|
|
21
|
+
big,
|
|
22
|
+
cite,
|
|
23
|
+
code,
|
|
24
|
+
del,
|
|
25
|
+
dfn,
|
|
26
|
+
em,
|
|
27
|
+
img,
|
|
28
|
+
ins,
|
|
29
|
+
kbd,
|
|
30
|
+
q,
|
|
31
|
+
s,
|
|
32
|
+
samp,
|
|
33
|
+
small,
|
|
34
|
+
strike,
|
|
35
|
+
strong,
|
|
36
|
+
sub,
|
|
37
|
+
sup,
|
|
38
|
+
tt,
|
|
39
|
+
var,
|
|
40
|
+
b,
|
|
41
|
+
u,
|
|
42
|
+
i,
|
|
43
|
+
center,
|
|
44
|
+
dl,
|
|
45
|
+
dt,
|
|
46
|
+
dd,
|
|
47
|
+
ol,
|
|
48
|
+
ul,
|
|
49
|
+
li,
|
|
50
|
+
fieldset,
|
|
51
|
+
form,
|
|
52
|
+
label,
|
|
53
|
+
legend,
|
|
54
|
+
table,
|
|
55
|
+
caption,
|
|
56
|
+
tbody,
|
|
57
|
+
tfoot,
|
|
58
|
+
thead,
|
|
59
|
+
tr,
|
|
60
|
+
th,
|
|
61
|
+
td,
|
|
62
|
+
article,
|
|
63
|
+
aside,
|
|
64
|
+
canvas,
|
|
65
|
+
details,
|
|
66
|
+
embed,
|
|
67
|
+
figure,
|
|
68
|
+
figcaption,
|
|
69
|
+
footer,
|
|
70
|
+
header,
|
|
71
|
+
hgroup,
|
|
72
|
+
menu,
|
|
73
|
+
nav,
|
|
74
|
+
output,
|
|
75
|
+
ruby,
|
|
76
|
+
section,
|
|
77
|
+
summary,
|
|
78
|
+
time,
|
|
79
|
+
mark,
|
|
80
|
+
audio,
|
|
81
|
+
video {
|
|
82
|
+
margin: 0;
|
|
83
|
+
padding: 0;
|
|
84
|
+
border: 0;
|
|
85
|
+
font: inherit;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
* {
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
ol,
|
|
93
|
+
ul {
|
|
94
|
+
list-style-type: none;
|
|
95
|
+
list-style-position: outside;
|
|
96
|
+
}
|
|
@@ -4,3 +4,27 @@
|
|
|
4
4
|
-moz-user-select: none;
|
|
5
5
|
user-select: none;
|
|
6
6
|
}
|
|
7
|
+
|
|
8
|
+
// This mixin will check the brightness of the background colour and text
|
|
9
|
+
// and return either light or dark text depending on the contrast
|
|
10
|
+
@mixin mds-text-contrast($bg-color) {
|
|
11
|
+
$color-text-base-brightness: round(
|
|
12
|
+
(red($mds-color-text-base) * 299) + (green($mds-color-text-base) * 587) + (blue($mds-color-text-base) * 114) / 1000
|
|
13
|
+
);
|
|
14
|
+
$color-brightness: round((red($bg-color) * 299) + (green($bg-color) * 587) + (blue($bg-color) * 114) / 1000);
|
|
15
|
+
$light-color: round((red(#ffffff) * 299) + (green(#ffffff) * 587) + (blue(#ffffff) * 114) / 1000);
|
|
16
|
+
|
|
17
|
+
$text-color-dark: $mds-color-text-base !default;
|
|
18
|
+
$text-color-light: $mds-color-text-invert !default;
|
|
19
|
+
|
|
20
|
+
@if abs($color-text-base-brightness) >= ($light-color/2) {
|
|
21
|
+
$text-color-dark: $mds-color-text-invert;
|
|
22
|
+
$text-color-light: $mds-color-text-base;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@if abs($color-brightness) < ($light-color/2) {
|
|
26
|
+
color: $text-color-light;
|
|
27
|
+
} @else {
|
|
28
|
+
color: $text-color-dark;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -32,16 +32,6 @@ main {
|
|
|
32
32
|
display: block;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
/**
|
|
36
|
-
* Correct the font size and margin on `h1` elements within `section` and
|
|
37
|
-
* `article` contexts in Chrome, Firefox, and Safari.
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
h1 {
|
|
41
|
-
font-size: 2em;
|
|
42
|
-
margin: 0.67em 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
35
|
/* Grouping content
|
|
46
36
|
========================================================================== */
|
|
47
37
|
|