@lucca-front/scss 22.0.1-rc.2 → 22.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucca-front/scss",
3
- "version": "22.0.1-rc.2",
3
+ "version": "22.0.1",
4
4
  "description": "A Sass framework for Lucca products.",
5
5
  "main": "src/main.scss",
6
6
  "scripts": {},
@@ -24,7 +24,7 @@
24
24
  "normalize.css": "^8.0.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "@lucca-front/icons": "22.0.1-rc.2",
28
- "@lucca/prisme": "22.0.1-rc.2"
27
+ "@lucca-front/icons": "22.0.1",
28
+ "@lucca/prisme": "22.0.1"
29
29
  }
30
30
  }
@@ -24,11 +24,29 @@
24
24
  @mixin base($atRoot: namespace.$defaultAtRoot) {
25
25
  @at-root ($atRoot) {
26
26
  @if config.$fontFamily {
27
- @include core.fontFace(config.$fontFamily, config.$fontWeights, config.$fontStyles);
27
+ @include core.fontFace(
28
+ config.$fontFamily,
29
+ config.$fontWeights,
30
+ config.$fontStyles,
31
+ $unicodeRange: config.$fontCoreRange
32
+ );
33
+ @include core.fontFace(
34
+ config.$fontFamily,
35
+ config.$fontWeights,
36
+ config.$fontStyles,
37
+ $unicodeRange: config.$fontExtendedRange,
38
+ $filenameSuffix: '-extended'
39
+ );
28
40
  }
29
41
 
30
42
  @if config.$fontFamilyBrand {
31
- @include core.fontFace(config.$fontFamilyBrand, config.$fontWeightsBrand, config.$fontStylesBrand);
43
+ @include core.fontFace(
44
+ config.$fontFamilyBrand,
45
+ config.$fontWeightsBrand,
46
+ config.$fontStylesBrand,
47
+ $path: config.$fontPathBrand,
48
+ $unicodeRangeFolder: config.$fontUnicodeRangeFolderBrand
49
+ );
32
50
  }
33
51
 
34
52
  @if config.$fontFamilyCursive {
@@ -13,6 +13,35 @@ $deprecatedUtilityPrefix: false !default;
13
13
  $prefersContrast: 'no-preference' !default;
14
14
 
15
15
  $fontFamily: 'SourceSans' !default;
16
+
17
+ $fontPath: '//cdn.lucca.fr/transverse/fonts' !default;
18
+
19
+ $fontPathBrand: $fontPath !default;
20
+
21
+ $fontUnicodeRangeFolder: 'unicode-range' !default;
22
+
23
+ $fontUnicodeRangeFolderBrand: $fontUnicodeRangeFolder !default;
24
+
25
+ // Covers fr/en/de/es/it/nl/pt/ca on their own: ASCII
26
+ // + Latin-1 Supplement (letters/punctuation/currency), Œ œ Ÿ,
27
+ // and common typographic punctuation.
28
+
29
+ // ¡ ¢ £ ¥ ¨ © ª « ® ° ± ´ · ¸ º » ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý ß à á â ã ä å æ ç è
30
+ // é ê ë ì í î ï ñ ò ó ô õ ö ÷ ø ù ú û ü ý ÿ Œ œ Ÿ – — ‘ ’ ‚ “ ” „ • … ‰ ‹ › ⁄ € ™ − fi fl (+ a thin space, U+2009)
31
+
32
+ $fontCoreRange: 'U+0020-007E, U+00A0-00A3, U+00A5, U+00A8-00AB, U+00AE, U+00B0-00B1, U+00B4, U+00B7-00B8, U+00BA-00BB, U+00BF-00CF, U+00D1-00DD, U+00DF-00EF, U+00F1-00FD, U+00FF, U+0152-0153, U+0178, U+2009, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+202F-2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02' !default;
33
+
34
+ // Only fetched by the browser when a page actually renders one of these glyphs:
35
+ // Central/Eastern European Latin
36
+ // Extended-A/B (pl/cs/hr/ro/hu/tr),
37
+ // Vietnamese-style tilde/grave vowels and ẞ found in LuccaSans,
38
+ // spacing modifiers, and arrows.
39
+
40
+ // Ă ă Ą ą Ć ć Č č Ď ď Đ đ Ę ę Ě ě Ğ ğ Ĩ ĩ İ ı Ł ł Ń ń Ň ň Ő ő Ř ř Ś ś Ş ş Š š Ť ť Ũ ũ Ů ů Ű ű Ŷ ŷ Ź ź Ż ż Ž ž Ș ș
41
+ // Ț ț ˆ ˜ ô ẞ Ẽ ẽ Ỳ ỳ Ỹ ỹ ← ↑ → ↓ ↔ ↕ ↖ ↗ ↘ ↙ ≈ ≠ ≤ ≥
42
+
43
+ $fontExtendedRange: 'U+0102-0107, U+010C-0111, U+0118-011B, U+011E-011F, U+0128-0129, U+0130-0131, U+0141-0144, U+0147-0148, U+0150-0151, U+0158-015B, U+015E-0161, U+0164-0165, U+0168-0169, U+016E-0171, U+0176-0177, U+0179-017E, U+0218-021B, U+02C6, U+02DC, U+0302, U+1E9E, U+1EBC-1EBD, U+1EF2-1EF3, U+1EF8-1EF9, U+2190-2199, U+2248, U+2260, U+2264-2265' !default;
44
+
16
45
  $fontFamilyBrand: 'LuccaSans' !default;
17
46
  $fontWeights: (
18
47
  'regular': 400,
@@ -157,28 +157,46 @@ $cursor: 'pointer', 'auto', 'default', 'text';
157
157
  }
158
158
  }
159
159
 
160
- @mixin fontFace($family, $weights, $styles, $path: '//cdn.lucca.fr/transverse/fonts') {
160
+ @mixin fontFace(
161
+ $family,
162
+ $weights,
163
+ $styles,
164
+ $path: config.$fontPath,
165
+ $unicodeRange: null,
166
+ $filenameSuffix: '',
167
+ $unicodeRangeFolder: config.$fontUnicodeRangeFolder
168
+ ) {
169
+ $familyPath: '#{$path}/#{$family}';
170
+
171
+ @if $unicodeRange {
172
+ $familyPath: '#{$familyPath}/#{$unicodeRangeFolder}';
173
+ }
174
+
161
175
  @each $keyword, $number in $weights {
162
176
  @each $style in $styles {
163
177
  @if $style == 'normal' {
164
178
  @font-face {
165
179
  font-family: '#{$family}';
166
- src:
167
- url('#{$path}/#{$family}/#{$keyword}.woff2') format('woff2'),
168
- url('#{$path}/#{$family}/#{$keyword}.woff') format('woff');
180
+ src: url('#{$familyPath}/#{$keyword}#{$filenameSuffix}.woff2') format('woff2');
169
181
  font-weight: #{$number};
170
182
  font-style: #{$style};
171
183
  font-display: swap;
184
+
185
+ @if $unicodeRange {
186
+ unicode-range: #{$unicodeRange};
187
+ }
172
188
  }
173
189
  } @else {
174
190
  @font-face {
175
191
  font-family: '#{$family}';
176
- src:
177
- url('#{$path}/#{$family}/#{$keyword}-#{$style}.woff2') format('woff2'),
178
- url('#{$path}/#{$family}/#{$keyword}-#{$style}.woff') format('woff');
192
+ src: url('#{$familyPath}/#{$keyword}#{$filenameSuffix}-#{$style}.woff2') format('woff2');
179
193
  font-weight: #{$number};
180
194
  font-style: #{$style};
181
195
  font-display: swap;
196
+
197
+ @if $unicodeRange {
198
+ unicode-range: #{$unicodeRange};
199
+ }
182
200
  }
183
201
  }
184
202
  }