@madgex/design-system 1.12.0 → 1.14.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.
@@ -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
 
@@ -1,77 +1,86 @@
1
1
  {
2
2
  "color": {
3
3
  "brand": {
4
- "1" : {
5
- "base": { "value" : "#1B75BB" },
6
- "light": {
7
- "value" : "#2990e0",
8
- "scssColorFunction" : "lighten($mds-color-brand-1-base,10%)"
9
- },
10
- "lightest" : {
11
- "value" : "#e9f3fc",
12
- "scssColorFunction" : "lighten($mds-color-brand-1-base,(95% - lightness($mds-color-brand-1-base)))"
4
+ "1": {
5
+ "base": { "value": "#1B75BB" },
6
+ "light": {
7
+ "value": "#2990e0",
8
+ "scssColorFunction": "lighten($mds-color-brand-1-base,10%)"
13
9
  },
14
- "dark" : {
15
- "value" : "#15598e",
16
- "scssColorFunction" : "darken($mds-color-brand-1-base,10%)"
10
+ "lightest": {
11
+ "value": "#e9f3fc",
12
+ "scssColorFunction": "lighten($mds-color-brand-1-base,(95% - lightness($mds-color-brand-1-base)))"
17
13
  },
18
- "darkest" : {
19
- "value" : "#082135",
20
- "scssColorFunction" : "darken($mds-color-brand-1-base,(lightness($mds-color-brand-1-base) - 12%))"
14
+ "dark": {
15
+ "value": "#15598e",
16
+ "scssColorFunction": "darken($mds-color-brand-1-base,10%)"
17
+ },
18
+ "darkest": {
19
+ "value": "#082135",
20
+ "scssColorFunction": "darken($mds-color-brand-1-base,(lightness($mds-color-brand-1-base) - 12%))"
21
21
  }
22
22
  },
23
- "2" : {
24
- "base": { "value" : "#f0af11" },
25
- "light": {
26
- "value" : "#f3bf41",
27
- "scssColorFunction" : "lighten($mds-color-brand-2-base,10%)"
28
- },
29
- "lightest" : {
30
- "value" : "#fdf7e7",
31
- "scssColorFunction" : "lighten($mds-color-brand-2-base,(95% - lightness($mds-color-brand-2-base)))"
23
+ "2": {
24
+ "base": { "value": "#f0af11" },
25
+ "light": {
26
+ "scssColorFunction": "lighten($mds-color-brand-2-base,10%)",
27
+ "value": "{color.brand.2.base.value}"
28
+ },
29
+ "lightest": {
30
+ "value": "#fdf7e7",
31
+ "scssColorFunction": "lighten($mds-color-brand-2-base,(95% - lightness($mds-color-brand-2-base)))"
32
32
  },
33
- "dark" : {
34
- "value" : "#c28d0c",
35
- "scssColorFunction" : "darken($mds-color-brand-2-base,10%)"
33
+ "dark": {
34
+ "value": "#c28d0c",
35
+ "scssColorFunction": "darken($mds-color-brand-2-base,10%)"
36
36
  },
37
- "darkest" : {
38
- "value" : "#3a2a04",
39
- "scssColorFunction" : "darken($mds-color-brand-2-base,(lightness($mds-color-brand-2-base) - 12%))"
37
+ "darkest": {
38
+ "value": "#3a2a04",
39
+ "scssColorFunction": "darken($mds-color-brand-2-base,(lightness($mds-color-brand-2-base) - 12%))"
40
40
  }
41
41
  },
42
- "3" : {
43
- "base": { "value" : "#16C1B4" },
44
- "light": {
45
- "value" : "#24e6d7",
46
- "scssColorFunction" : "lighten($mds-color-brand-3-base,10%)"
47
- },
48
- "lightest" : {
49
- "value" : "#e8fcfb",
50
- "scssColorFunction" : "lighten($mds-color-brand-3-base,(95% - lightness($mds-color-brand-3-base)))"
42
+ "3": {
43
+ "base": { "value": "#16C1B4" },
44
+ "light": {
45
+ "value": "#24e6d7",
46
+ "scssColorFunction": "lighten($mds-color-brand-3-base,10%)"
51
47
  },
52
- "dark" : {
53
- "value" : "#119389",
54
- "scssColorFunction" : "darken($mds-color-brand-3-base,10%)"
48
+ "lightest": {
49
+ "value": "#e8fcfb",
50
+ "scssColorFunction": "lighten($mds-color-brand-3-base,(95% - lightness($mds-color-brand-3-base)))"
55
51
  },
56
- "darkest" : {
57
- "value" : "#063733",
58
- "scssColorFunction" : "darken($mds-color-brand-3-base,(lightness($mds-color-brand-3-base) - 12%))"
52
+ "dark": {
53
+ "value": "#119389",
54
+ "scssColorFunction": "darken($mds-color-brand-3-base,10%)"
55
+ },
56
+ "darkest": {
57
+ "value": "#063733",
58
+ "scssColorFunction": "darken($mds-color-brand-3-base,(lightness($mds-color-brand-3-base) - 12%))"
59
59
  }
60
60
  }
61
61
  },
62
- "background" : {
63
- "body" : { "value" : "{color.background.site-container.value}" },
64
- "site-container" : { "value" : "#f0f0f0" },
65
- "surface" : { "value" : "#ffffff" }
62
+ "background": {
63
+ "body": { "value": "{color.neutral.white.value}" },
64
+ "site-container": { "value": "{color.neutral.lightest.value}" },
65
+ "surface": { "value": "{color.neutral.white.value}" }
66
66
  },
67
- "text" : { "value" : "#222" },
68
- "border" : { "value" : "{color.neutral.base.value}" },
69
- "white": { "value": "#FFFFFF" },
70
- "black": { "value": "#000000" },
71
67
  "neutral": {
68
+ "white": { "value": "#FFFFFF" },
69
+ "black": { "value": "#000000" },
72
70
  "base": { "value": "#979797" },
73
71
  "lightest": { "value": "#F0F0F0" },
74
72
  "darker": { "value": "#333333" }
73
+ },
74
+ "text": {
75
+ "base": {
76
+ "value": "#222"
77
+ },
78
+ "invert": {
79
+ "value": "{color.neutral.white.value}"
80
+ }
81
+ },
82
+ "border": {
83
+ "value": "{color.neutral.base.value}"
75
84
  }
76
85
  }
77
86
  }
@@ -34,9 +34,14 @@
34
34
  "max-width": {
35
35
  "value": "1280px"
36
36
  },
37
- "paddings": {
37
+ "padding": {
38
38
  "value": "2.5%"
39
39
  }
40
+ },
41
+ "surface": {
42
+ "padding": {
43
+ "value": "20px"
44
+ }
40
45
  }
41
46
  }
42
47
  }
@@ -1,8 +1,14 @@
1
1
  <h2>Unordered list</h2>
2
2
  <ul class="mds-list mds-list--bullet">
3
- <li class="mds-list__item">one</li>
4
- <li class="mds-list__item">two</li>
5
- <li class="mds-list__item">three</li>
3
+ <li class="mds-list__item">
4
+ <a href="#one">one</a>
5
+ </li>
6
+ <li class="mds-list__item">
7
+ <a href="#two">two</a>
8
+ </li>
9
+ <li class="mds-list__item">
10
+ <a href="#three">three</a>
11
+ </li>
6
12
  </ul>
7
13
 
8
14
  <h2>Ordered list</h2>
@@ -12,8 +18,8 @@
12
18
  <li class="mds-list__item">three</li>
13
19
  </ol>
14
20
 
15
- <h2>Definition List</h2>
16
- <dl class="mds-list mds-list--definition">
21
+ <h2>Definition List with border</h2>
22
+ <dl class="mds-list mds-list--definition mds-list--border">
17
23
  <dt class="mds-list__key">Recruiter</dt>
18
24
  <dd class="mds-list__value">The National Aeronautics and Space Association</dd>
19
25
  <dt class="mds-list__key">Reference</dt>