@nice-digital/nds-core 1.3.2 → 1.3.5-alpha.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.
Files changed (42) hide show
  1. package/package.json +5 -5
  2. package/scss/colours/_index.scss +2 -0
  3. package/scss/{settings/_settings-colours-nice.scss → colours/_nice-brand.scss} +17 -17
  4. package/scss/{settings/_settings-colours-semantic.scss → colours/_semantic.scss} +58 -58
  5. package/scss/{helpers/_helpers-focus.scss → focus/_index.scss} +15 -11
  6. package/scss/{helpers/_helpers-glyphs.scss → glyphs/_index.scss} +10 -10
  7. package/scss/layout/_index.scss +43 -0
  8. package/scss/media-queries/_index.scss +29 -0
  9. package/scss/media-queries/vendor/_mq.scss +307 -0
  10. package/scss/{settings/_settings-modular-scale.scss → modular-scale/_index.scss} +6 -6
  11. package/scss/settings/_settings-colour-alias-tokens.scss +53 -0
  12. package/scss/settings/_settings-colour-global-tokens.scss +44 -0
  13. package/scss/spacing/_index.scss +31 -0
  14. package/scss/typography/{_typography-headings.scss → _headings.scss} +22 -16
  15. package/scss/typography/_helpers.scss +171 -0
  16. package/scss/typography/_index.scss +4 -0
  17. package/scss/typography/_links.scss +76 -0
  18. package/scss/{settings/_settings-typography.scss → typography/_settings.scss} +42 -38
  19. package/scss/{helpers/_helpers-utils.scss → utils/_index.scss} +16 -12
  20. package/scss/{vendor/_vendor-is.scss → utils/vendor/_is.scss} +0 -0
  21. package/scss/{vendor/_vendor-math.scss → utils/vendor/_math.scss} +0 -0
  22. package/scss/visibility/_index.scss +65 -0
  23. package/scss/core.scss +0 -4
  24. package/scss/helpers/_helpers-clearfix.scss +0 -23
  25. package/scss/helpers/_helpers-lists.scss +0 -45
  26. package/scss/helpers/_helpers-print.scss +0 -35
  27. package/scss/helpers/_helpers-text.scss +0 -21
  28. package/scss/helpers/_helpers-visibility.scss +0 -37
  29. package/scss/helpers/_helpers.scss +0 -2
  30. package/scss/layout/_layout-container.scss +0 -12
  31. package/scss/layout/_layout.scss +0 -1
  32. package/scss/settings/_settings-breakpoints.scss +0 -25
  33. package/scss/settings/_settings-glyphs.scss +0 -3
  34. package/scss/settings/_settings-layout.scss +0 -15
  35. package/scss/settings/_settings-mq.scss +0 -17
  36. package/scss/settings/_settings-print.scss +0 -5
  37. package/scss/settings/_settings-spacing.scss +0 -43
  38. package/scss/settings/_settings.scss +0 -4
  39. package/scss/typography/_typography-helpers.scss +0 -148
  40. package/scss/typography/_typography-links.scss +0 -73
  41. package/scss/typography/_typography.scss +0 -1
  42. package/scss/vendor/_vendor.scss +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-digital/nds-core",
3
- "version": "1.3.2",
3
+ "version": "1.3.5-alpha.0",
4
4
  "description": "Core code for the NICE Design System",
5
5
  "author": "Ian Routledge <ian.routledge@nice.org.uk>",
6
6
  "contributors": [
@@ -33,16 +33,16 @@
33
33
  "url": "https://github.com/nice-digital/nice-design-system/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@nice-digital/icons": "^3.0.0",
36
+ "@nice-digital/icons": "^3.0.2-alpha.0",
37
37
  "prop-types": "^15.7.2",
38
38
  "sass-mq": "^6.0.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "react": "^16 || ^17",
42
- "react-dom": "^16 || ^17"
41
+ "react": "^16 || ^17 || ^18",
42
+ "react-dom": "^16 || ^17 || ^18"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@babel/cli": "^7.5.0"
46
46
  },
47
- "gitHead": "db5e29bc9fa8afa7e33c19a8e06a65adafd99bc5"
47
+ "gitHead": "0ddae81edebd757a52ca6a2838610049a83acebd"
48
48
  }
@@ -0,0 +1,2 @@
1
+ @forward "nice-brand";
2
+ @forward "semantic";
@@ -6,16 +6,16 @@
6
6
 
7
7
  /// NICE Black. Part of the primary palette.
8
8
  /// @since 0.2.0
9
- $nds-colour-nice-black: #222;
9
+ $nice-black: #222;
10
10
 
11
11
  /// NICE White. Part of the primary palette
12
12
  /// @since 0.2.0
13
- $nds-colour-nice-white: #fff;
13
+ $nice-white: #fff;
14
14
 
15
15
  /// NICE Teal. Part of the primary palette.
16
16
  /// First choice of colour for supporting
17
17
  /// @since 0.2.0
18
- $nds-colour-nice-teal: #004650;
18
+ $nice-teal: #004650;
19
19
 
20
20
  // SECONDARY PALETTE
21
21
 
@@ -23,58 +23,58 @@ $nds-colour-nice-teal: #004650;
23
23
  /// panel background to highlight a particular section of content,
24
24
  /// in which case font colour must be pure white (NICE White) to make text legible.
25
25
  /// @since 0.2.0
26
- $nds-colour-nice-purple: #451551;
26
+ $nice-purple: #451551;
27
27
 
28
28
  /// Cool Teal. Part of the secondary palette.
29
29
  /// @since 0.2.0
30
- $nds-colour-nice-cool-teal: #00506a;
30
+ $nice-cool-teal: #00506a;
31
31
 
32
32
  /// Rich Black. Part of the secondary palette.
33
33
  /// @since 0.2.0
34
- $nds-colour-nice-rich-black: #0e0e0e;
34
+ $nice-rich-black: #0e0e0e;
35
35
 
36
36
  /// Dark Grey. Part of the secondary palette.
37
37
  /// @since 0.2.0
38
- $nds-colour-nice-dark-grey: #393939;
38
+ $nice-dark-grey: #393939;
39
39
 
40
40
  /// Grey 1. Part of the secondary palette.
41
41
  /// @since 0.2.0
42
- $nds-colour-nice-grey-1: #adadad;
42
+ $nice-grey-1: #adadad;
43
43
 
44
44
  /// Grey 2. Part of the secondary palette.
45
45
  /// @since 0.2.0
46
- $nds-colour-nice-grey-2: #d6d6d6;
46
+ $nice-grey-2: #d6d6d6;
47
47
 
48
48
  /// Grey 3. Part of the secondary palette.
49
49
  /// @since 0.2.0
50
- $nds-colour-nice-grey-3: #e9e9e9;
50
+ $nice-grey-3: #e9e9e9;
51
51
 
52
52
  // TERTIARY PALETTE
53
53
 
54
54
  /// Blue 1. Part of the tertiary palette.
55
55
  /// @since 0.2.0
56
- $nds-colour-nice-blue-1: #233746;
56
+ $nice-blue-1: #233746;
57
57
 
58
58
  /// Blue 2. Part of the tertiary palette.
59
59
  /// @since 0.2.0
60
- $nds-colour-nice-blue-2: #314c60;
60
+ $nice-blue-2: #314c60;
61
61
 
62
62
  /// Blue 3. Part of the tertiary palette.
63
63
  /// @since 0.2.0
64
- $nds-colour-nice-blue-3: #517489;
64
+ $nice-blue-3: #517489;
65
65
 
66
66
  /// Ice Teal. Part of the tertiary palette.
67
67
  /// @since 0.2.0
68
- $nds-colour-nice-ice-teal: #a2bdc1;
68
+ $nice-ice-teal: #a2bdc1;
69
69
 
70
70
  /// Teal 1. Part of the tertiary palette.
71
71
  /// @since 0.2.0
72
- $nds-colour-nice-teal-1: #4f7d83;
72
+ $nice-teal-1: #4f7d83;
73
73
 
74
74
  /// Teal 2. Part of the tertiary palette.
75
75
  /// @since 0.2.0
76
- $nds-colour-nice-teal-2: #18646e;
76
+ $nice-teal-2: #18646e;
77
77
 
78
78
  /// Teal 3. Part of the tertiary palette.
79
79
  /// @since 0.2.0
80
- $nds-colour-nice-teal-3: #15434a;
80
+ $nice-teal-3: #15434a;
@@ -2,15 +2,15 @@
2
2
  /// @group colors
3
3
  ////
4
4
 
5
- @import 'settings-colours-nice';
5
+ @use 'nice-brand';
6
6
 
7
7
  /// True black, used for print styles
8
8
  /// @since 0.2.0
9
- $nds-colour-true-black: #000;
9
+ $true-black: #000;
10
10
 
11
11
  /// True white, used for print styles
12
12
  /// @since 0.2.0
13
- $nds-colour-true-white: #fff;
13
+ $true-white: #fff;
14
14
 
15
15
  // GLOBAL
16
16
 
@@ -20,228 +20,228 @@ $nds-colour-true-white: #fff;
20
20
  /// reducing contrast. See https://ux.stackexchange.com/a/73918/92081
21
21
  /// for a more detailed explanation.
22
22
  /// @since 0.2.0
23
- $nds-colour-body: #f4f4f4;
23
+ $body: #f4f4f4;
24
24
 
25
25
  /// Standard, primary body text colour. Off-black, to slightly reduce
26
26
  /// contrast in an attempt to make text easier to read for those with
27
- /// 'visual stress', see also $nds-colour-body.
27
+ /// 'visual stress', see also $body.
28
28
  /// @since 0.2.0
29
- $nds-colour-text: $nds-colour-nice-black;
29
+ $text: nice-brand.$nice-black;
30
30
 
31
31
  /// Subtle text colour
32
32
  /// @since 0.2.0
33
- $nds-colour-text-subtle: $nds-colour-nice-grey-1;
33
+ $text-subtle: nice-brand.$nice-grey-1;
34
34
 
35
35
  /// Inverse body text colour for use on dark background
36
36
  /// @since 0.2.2
37
- $nds-colour-text-inverse: $nds-colour-nice-white;
37
+ $text-inverse: nice-brand.$nice-white;
38
38
 
39
39
  /// Icons colour
40
40
  /// @since 0.2.0
41
- $nds-colour-icons: $nds-colour-nice-teal;
41
+ $icons: nice-brand.$nice-teal;
42
42
 
43
43
  // LINKS
44
44
 
45
45
  /// Link text colour
46
46
  /// @since 0.2.0
47
- $nds-colour-link: #005ea5;
47
+ $link: #005ea5;
48
48
 
49
49
  /// Link hover colour
50
50
  /// @since 0.2.0
51
- $nds-colour-link-hover: #003761;
51
+ $link-hover: #003761;
52
52
 
53
53
  /// Link visited colour
54
54
  /// @since 0.2.0
55
- $nds-colour-link-visited: #4c2c92;
55
+ $link-visited: #4c2c92;
56
56
 
57
57
  /// Link active colour
58
58
  /// @since 0.2.0
59
- $nds-colour-link-active: $nds-colour-text;
59
+ $link-active: $text;
60
60
 
61
61
  /// Link focus text colour
62
62
  /// @since 0.2.11
63
- $nds-colour-link-focus-text: $nds-colour-link;
63
+ $link-focus-text: $link;
64
64
 
65
65
  // INVERSE LINKS
66
66
 
67
67
  /// Inverse link text colour
68
68
  /// @since 0.2.9
69
- $nds-colour-link-inverse: $nds-colour-text-inverse;
69
+ $link-inverse: $text-inverse;
70
70
 
71
71
  /// Inverse link hover text colour
72
72
  /// @since 0.2.9
73
- $nds-colour-link-inverse-hover: $nds-colour-nice-grey-2;
73
+ $link-inverse-hover: nice-brand.$nice-grey-2;
74
74
 
75
75
  /// Inverse link visited text colour. Same as normal inverse link colour to ensure minimum 4.5:1 colour contrast across various dark backgrounds.
76
76
  /// @since 0.2.9
77
- $nds-colour-link-inverse-visited: $nds-colour-link-inverse;
77
+ $link-inverse-visited: $link-inverse;
78
78
 
79
79
  /// Inverse link active text colour
80
80
  /// @since 0.2.9
81
- $nds-colour-link-inverse-active: $nds-colour-link-inverse-hover;
81
+ $link-inverse-active: $link-inverse-hover;
82
82
 
83
83
  /// Inverse link focus text colour
84
84
  /// @since 0.2.9
85
- $nds-colour-link-inverse-focus-text: $nds-colour-link-inverse;
85
+ $link-inverse-focus-text: $link-inverse;
86
86
 
87
87
  // FOCUS
88
88
 
89
89
  /// Focus colour
90
90
  /// @since 0.2.0
91
- $nds-colour-focus: #0092a6;
91
+ $focus: #0092a6;
92
92
 
93
93
  /// Focus colour
94
94
  /// @since 0.3.1
95
- $nds-colour-focus-inverse: $nds-colour-link-inverse;
95
+ $focus-inverse: $link-inverse;
96
96
 
97
97
  // CTA BUTTONS
98
98
 
99
99
  /// CTA button background colour
100
100
  /// @since 0.2.2
101
- $nds-colour-btn-cta: $nds-colour-nice-purple;
101
+ $btn-cta: nice-brand.$nice-purple;
102
102
 
103
103
  /// CTA button hover colour
104
104
  /// @since 0.2.2
105
- $nds-colour-btn-cta-hover: #260b2d;
105
+ $btn-cta-hover: #260b2d;
106
106
 
107
107
  /// CTA button text colour
108
108
  /// @since 0.2.2
109
- $nds-colour-btn-cta-text: $nds-colour-nice-white;
109
+ $btn-cta-text: nice-brand.$nice-white;
110
110
 
111
111
  // PRIMARY BUTTONS
112
112
 
113
113
  /// Primary button background colour
114
114
  /// @since 0.2.2
115
- $nds-colour-btn-primary: $nds-colour-nice-dark-grey;
115
+ $btn-primary: nice-brand.$nice-dark-grey;
116
116
 
117
117
  /// Primary button hover colour
118
118
  /// @since 0.2.2
119
- $nds-colour-btn-primary-hover: $nds-colour-nice-rich-black;
119
+ $btn-primary-hover: nice-brand.$nice-rich-black;
120
120
 
121
121
  /// Primary button text colour
122
122
  /// @since 0.2.2
123
- $nds-colour-btn-primary-text: $nds-colour-nice-white;
123
+ $btn-primary-text: nice-brand.$nice-white;
124
124
 
125
125
  // SECONDARY BUTTONS
126
126
 
127
127
  /// Secondary button background colour
128
128
  /// @since 0.2.2
129
- $nds-colour-btn-secondary: #666;
129
+ $btn-secondary: #666;
130
130
 
131
131
  /// Secondary button hover colour
132
132
  /// @since 0.2.2
133
- $nds-colour-btn-secondary-hover: #333;
133
+ $btn-secondary-hover: #333;
134
134
 
135
135
  /// Primary button text colour
136
136
  /// @since 0.2.2
137
- $nds-colour-btn-secondary-text: $nds-colour-nice-white;
137
+ $btn-secondary-text: nice-brand.$nice-white;
138
138
 
139
139
  // LIGHT BUTTONS
140
140
 
141
141
  /// Inverse (light) button background colour
142
142
  /// @since 0.2.2
143
- $nds-colour-btn-inverse: $nds-colour-nice-white;
143
+ $btn-inverse: nice-brand.$nice-white;
144
144
 
145
145
  /// Inverse (light) button hover colour
146
146
  /// @since 0.2.2
147
- $nds-colour-btn-inverse-hover: $nds-colour-nice-grey-3;
147
+ $btn-inverse-hover: nice-brand.$nice-grey-3;
148
148
 
149
149
  /// Inverse (light) button text colour
150
150
  /// @since 0.2.2
151
- $nds-colour-btn-inverse-text: $nds-colour-nice-rich-black;
151
+ $btn-inverse-text: nice-brand.$nice-rich-black;
152
152
 
153
153
  // BACKGROUNDS/BORDERS
154
154
 
155
155
  /// Borders, separators, rules, keylines etc.
156
156
  /// @since 0.2.0
157
- $nds-colour-border: $nds-colour-nice-grey-1;
157
+ $border: nice-brand.$nice-grey-1;
158
158
 
159
159
  /// Focused Borders, separators, rules, keylines etc.
160
160
  /// @since 0.4.2
161
- $nds-colour-border-focus: $nds-colour-nice-blue-3;
161
+ $border-focus: nice-brand.$nice-blue-3;
162
162
 
163
163
  // NOTIFICATIONS/BANNERS
164
164
 
165
165
  /// Agile lifecycle phase banner
166
166
  /// @since 0.2.2
167
- $nds-colour-agile-phase: #009ae9;
167
+ $agile-phase: #009ae9;
168
168
 
169
169
  /// Discovery agile lifecycle phase
170
170
  /// @since 0.2.0
171
- /// @deprecated Use $nds-colour-agile-phase instead
172
- $nds-colour-discovery: #b8008e;
171
+ /// @deprecated Use $agile-phase instead
172
+ $discovery: #b8008e;
173
173
 
174
174
  /// Alpha badges and banners
175
175
  /// @since 0.2.0
176
- /// @deprecated Use $nds-colour-agile-phase instead
177
- $nds-colour-alpha: #d5367f;
176
+ /// @deprecated Use $agile-phase instead
177
+ $alpha: #d5367f;
178
178
 
179
179
  /// Beta badges and banners
180
180
  /// @since 0.2.0
181
- /// @deprecated Use $nds-colour-agile-phase instead
182
- $nds-colour-beta: #bd5826;
181
+ /// @deprecated Use $agile-phase instead
182
+ $beta: #bd5826;
183
183
 
184
184
  /// Live badges and banners
185
185
  /// @since 0.2.0
186
- /// @deprecated Use $nds-colour-agile-phase instead
187
- $nds-colour-live: #578137;
186
+ /// @deprecated Use $agile-phase instead
187
+ $live: #578137;
188
188
 
189
189
  /// Error text and border colour
190
190
  /// @since 1.7.0
191
- $nds-colour-error: #b50f23;
191
+ $error: #b50f23;
192
192
 
193
193
  /// Error background colour
194
194
  /// @since 1.7.0
195
- $nds-colour-error-background: #f9eced;
195
+ $error-background: #f9eced;
196
196
 
197
197
  /// Caution text and border colour
198
198
  /// @since 1.7.0
199
- $nds-colour-caution: #dc8a07;
199
+ $caution: #dc8a07;
200
200
 
201
201
  /// Caution background colour
202
202
  /// @since 1.7.0
203
- $nds-colour-caution-background: #fbf7f1;
203
+ $caution-background: #fbf7f1;
204
204
 
205
205
  /// Info text and border colour
206
206
  /// @since 1.7.0
207
- $nds-colour-info: #3479d0;
207
+ $info: #3479d0;
208
208
 
209
209
  /// Info background colour
210
210
  /// @since 1.7.0
211
- $nds-colour-info-background: #eff4fc;
211
+ $info-background: #eff4fc;
212
212
 
213
213
  /// Success text and border colour
214
214
  /// @since 1.7.0
215
- $nds-colour-success: #68c103;
215
+ $success: #68c103;
216
216
 
217
217
  /// Success background colour
218
218
  /// @since 1.7.0
219
- $nds-colour-success-background: #f3faeb;
219
+ $success-background: #f3faeb;
220
220
 
221
221
  /// <mark> tag highlighter colour
222
222
  /// @since 1.2.4
223
- $nds-colour-mark: #fff999;
223
+ $mark: #fff999;
224
224
 
225
225
  // GUIDANCE TYPES
226
226
 
227
227
  /// New guidance colour
228
228
  /// @since 0.3.0
229
- $nds-colour-guidance-new: $nds-colour-nice-purple;
229
+ $guidance-new: nice-brand.$nice-purple;
230
230
 
231
231
  /// Updated guidance colour
232
232
  /// @since 0.3.0
233
- $nds-colour-guidance-updated: $nds-colour-nice-blue-3;
233
+ $guidance-updated: nice-brand.$nice-blue-3;
234
234
 
235
235
  /// In consultation guidance colour
236
236
  /// @since 0.3.0
237
- $nds-colour-guidance-consultation: #557021;
237
+ $guidance-consultation: #557021;
238
238
 
239
239
  // HERO
240
240
 
241
241
  /// Background colour for the hero component
242
242
  /// @since 0.5.2
243
- $nds-colour-hero-background: $nds-colour-nice-teal-2;
243
+ $hero-background: nice-brand.$nice-teal-2;
244
244
 
245
245
  /// Colour for the border in the hero component
246
246
  /// @since 0.5.2
247
- $nds-colour-hero-border: $nds-colour-nice-teal-3;
247
+ $hero-border: nice-brand.$nice-teal-3;
@@ -1,3 +1,7 @@
1
+ @use "../spacing";
2
+ @use "../colours";
3
+ @use "../utils";
4
+
1
5
  ////
2
6
  /// @group helpers
3
7
  ////
@@ -6,13 +10,13 @@
6
10
  /// @param {Boolean} $rounded whether to use box shadow for border (outline can't be styled to have radius corners)
7
11
  /// @output the default focus styles ie background colour and outline
8
12
  /// @since 0.1.0
9
- @mixin nds-default-focus-style($rounded: false) {
13
+ @mixin default-focus-style($rounded: false) {
10
14
  @if $rounded {
11
- box-shadow: 0 0 0 rem($nds-spacing-x-small) $nds-colour-focus;
12
- outline: $nds-spacing-x-small solid transparent;
13
- outline-offset: $nds-spacing-x-small;
15
+ box-shadow: 0 0 0 utils.rem(spacing.$x-small) colours.$focus;
16
+ outline: spacing.$x-small solid transparent;
17
+ outline-offset: spacing.$x-small;
14
18
  } @else {
15
- outline: rem($nds-spacing-x-small) solid $nds-colour-focus;
19
+ outline: utils.rem(spacing.$x-small) solid colours.$focus;
16
20
  }
17
21
  }
18
22
 
@@ -20,24 +24,24 @@
20
24
  /// on an inverse (dark) background
21
25
  /// @output the inverse focus styles ie background colour and outline
22
26
  /// @since 0.3.1
23
- @mixin nds-inverse-focus-style {
24
- outline: rem($nds-spacing-x-small) solid $nds-colour-focus-inverse;
27
+ @mixin inverse-focus-style {
28
+ outline: utils.rem(spacing.$x-small) solid colours.$focus-inverse;
25
29
  }
26
30
 
27
- @mixin nds-default-button-focus {
31
+ @mixin default-button-focus {
28
32
  .btn,
29
33
  button {
30
34
  &:focus {
31
- @include nds-default-focus-style;
35
+ @include default-focus-style;
32
36
  }
33
37
  }
34
38
  }
35
39
 
36
- @mixin nds-inverse-button-focus {
40
+ @mixin inverse-button-focus {
37
41
  .btn,
38
42
  button {
39
43
  &:focus {
40
- @include nds-inverse-focus-style;
44
+ @include inverse-focus-style;
41
45
  }
42
46
  }
43
47
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  /// A map of glyph name to code point (character entity reference).
6
6
  /// Avoids magic strings like `content: '\201C'` within our SASS.
7
- /// Usual usage is via the `get-glyph` function, e.g. `nds-get-glyph(greater-than)`.
7
+ /// Usual usage is via the `get-glyph` function, e.g. `get-glyph(greater-than)`.
8
8
  /// @see get-glyph
9
9
  /// @link https://css-tricks.com/snippets/html/glyphs/
10
10
  /// @prop {String} bullet [2022] Bullet (•)
@@ -17,7 +17,7 @@
17
17
  /// @prop {String} punc-space [02008] Punctuation space (small, width of a comma)
18
18
  /// @prop {String} zero-width-space [0200B] Zero width space
19
19
  /// @since 0.1.0
20
- $nds-glyphs: (
20
+ $glyphs: (
21
21
  bullet: '2022',
22
22
  copyright: '00a9',
23
23
  greater-than: '003e',
@@ -31,29 +31,29 @@ $nds-glyphs: (
31
31
  ) !default;
32
32
 
33
33
  /// Gets a glyph code, or several, (character entity reference) from the
34
- /// `$nds-glyphs` map, matching the given `$names`. Usually used with the content
34
+ /// `$glyphs` map, matching the given `$names`. Usually used with the content
35
35
  /// property for psuedo elements, to avoid use of magic character reference strings.
36
36
  /// @param {argList} $names The name(s) of the glyph(s) to get
37
37
  /// @returns {string} The character entity reference code(s) as a string, e.g. '\201C' or '\02008\029C9'
38
- /// @see $nds-glyphs
38
+ /// @see $glyphs
39
39
  /// @since 0.1.0
40
40
  /// @example Single glyph
41
41
  /// .rule {
42
- /// content: nds-get-glyph(greater-than);
42
+ /// content: get-glyph(greater-than);
43
43
  /// }
44
44
  /// @example Multiple glyphs together
45
45
  /// .rule {
46
- /// content: nds-get-glyph(punc-space, box-box);
46
+ /// content: get-glyph(punc-space, box-box);
47
47
  /// }
48
- @function nds-get-glyph($names...) {
48
+ @function get-glyph($names...) {
49
49
  $codes: '';
50
50
 
51
51
  @each $name in $names {
52
- @if map-has-key($nds-glyphs, $name) {
53
- $code: map-get($nds-glyphs, $name);
52
+ @if map-has-key($glyphs, $name) {
53
+ $code: map-get($glyphs, $name);
54
54
  $codes: $codes + '\\#{$code}';
55
55
  } @else {
56
- @error 'Glyph with name #{$name} could not be found in the $nds-glyphs map';
56
+ @error 'Glyph with name #{$name} could not be found in the $glyphs map';
57
57
  }
58
58
  }
59
59
 
@@ -0,0 +1,43 @@
1
+ @use "../spacing";
2
+ @use "../utils";
3
+
4
+ /// The maximum width of the default container, in pixels
5
+ /// @since 0.5.2
6
+ $container-max-width: 1170;
7
+
8
+ /// The gutter for the default container
9
+ /// @since 1.0.0
10
+ $container-gutter: spacing.$medium;
11
+
12
+ /// The maximum content width to ensure good readability
13
+ /// @since 1.7.0
14
+ $readable-width: 66ch;
15
+
16
+ /// Container placeholder.
17
+ /// @since 1.0.0
18
+ @mixin container {
19
+ margin: auto;
20
+ max-width: utils.rem($container-max-width);
21
+ width: 96%; // IE11 support for calc not consistent https://caniuse.com/calc (See "Known issues")
22
+ width: calc(100% - #{rem($container-gutter * 2)});
23
+ }
24
+
25
+ /// Make an element adapt its height to fit floated children, and clear floats in both directions.
26
+ /// @since 0.1.0
27
+ @mixin clearfix {
28
+ &:before,
29
+ &:after {
30
+ content: ' ';
31
+ display: table;
32
+ }
33
+
34
+ &:after {
35
+ clear: both;
36
+ }
37
+ }
38
+
39
+ /// Placeholder for clearfix
40
+ /// @since 0.1.0
41
+ %nds-clearfix {
42
+ @include clearfix;
43
+ }
@@ -0,0 +1,29 @@
1
+ /// Extra small break point
2
+ /// @since 0.2.0
3
+ $xs: 400px !default;
4
+
5
+ /// 'Small' break point. Roughly portrait tablets.
6
+ /// @since 0.2.0
7
+ $sm: 600px !default;
8
+
9
+ /// 'Medium' break point. Roughly landscape tablets.
10
+ /// @since 0.2.0
11
+ $md: 900px !default;
12
+
13
+ /// 'Large' break point. Roughly 'dektops'.
14
+ /// @since 0.2.0
15
+ $lg: 1200px !default;
16
+
17
+ /// 'Extra large' break point for wide screens
18
+ /// @since 0.2.0
19
+ $xl: 1600px !default;
20
+
21
+ @forward 'vendor/mq' with (
22
+ $breakpoints: (
23
+ xs: $xs,
24
+ sm: $sm,
25
+ md: $md,
26
+ lg: $lg,
27
+ xl: $xl
28
+ )
29
+ );