gel-typography 5.1.2 → 6.0.0-beta.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/.editorconfig +1 -1
- package/README.md +17 -11
- package/_typography.scss +596 -34
- package/jest.config.mjs +5 -0
- package/package.json +9 -10
- package/prettier.config.mjs +6 -0
- package/src/gel-typography.scss +4 -10
- package/test/__snapshots__/typography.test.js.snap +1733 -0
- package/test/data/large-type-sizes/atlas.scss +7 -0
- package/test/data/large-type-sizes/elephant.scss +7 -0
- package/test/data/large-type-sizes/foolscap.scss +7 -0
- package/test/data/large-type-sizes/imperial.scss +7 -0
- package/test/data/large-type-sizes/royal.scss +7 -0
- package/test/data/type-sizes/body-copy.scss +5 -0
- package/test/data/type-sizes/brevier.scss +5 -0
- package/test/data/type-sizes/canon.scss +5 -0
- package/test/data/type-sizes/double-pica.scss +5 -0
- package/test/data/type-sizes/great-primer.scss +5 -0
- package/test/data/type-sizes/long-primer.scss +5 -0
- package/test/data/type-sizes/minion.scss +5 -0
- package/test/data/type-sizes/paragon.scss +5 -0
- package/test/data/type-sizes/pica.scss +5 -0
- package/test/data/type-sizes/trafalgar.scss +5 -0
- package/test/data/with-large-fonts.scss +4 -0
- package/test/data/without-large-fonts.scss +3 -0
- package/test/setup-jest.js +7 -0
- package/test/typography.test.js +107 -0
- package/.travis.yml +0 -21
- package/lib/_settings.scss +0 -420
- package/lib/_tools.scss +0 -151
- package/test/test-with-large-fonts-expected.css +0 -843
- package/test/test-with-large-fonts.scss +0 -20
- package/test/test-without-large-fonts-expected.css +0 -558
- package/test/test-without-large-fonts.scss +0 -24
package/.editorconfig
CHANGED
package/README.md
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
<h1 align="center">GEL Typography</h1>
|
|
2
|
-
<p align="center">
|
|
3
|
-
<a href="https://travis-ci.org/bbc/gel-typography" target="_blank"><img src="https://travis-ci.org/bbc/gel-typography.svg?branch=master"></a>
|
|
4
|
-
</p>
|
|
5
2
|
<p align="center">
|
|
6
3
|
A flexible code implementation of the GEL Typography.<br />
|
|
7
4
|
Forms part of the <a href="https://github.com/bbc/gel-foundations" target="_blank"><b>GEL Foundations</b></a>
|
|
8
5
|
</p>
|
|
9
6
|
|
|
7
|
+
## Breaking Change: v6.0.0
|
|
8
|
+
|
|
9
|
+
### @import, @use and @forward
|
|
10
|
+
|
|
11
|
+
The `@import` directive is now deprecated in favour of `@use` and `@forward`, see [SASS documentation](https://sass-lang.com/documentation/at-rules/use/) for more information.
|
|
12
|
+
|
|
13
|
+
GEL Typography has now been updated to `@use` and `@forward` to remove a large number of deprecation notices.
|
|
14
|
+
|
|
15
|
+
With the new @use directive, no var, function, or mixin is placed in global scope, and they are all scoped within the file.
|
|
16
|
+
|
|
17
|
+
This means that users will explicitly need to include the partial file in each file that may use its vars, functions or mixins.
|
|
18
|
+
|
|
19
|
+
|
|
10
20
|
## What is this?
|
|
11
21
|
|
|
12
22
|
An implementation of the [GEL Typography Guidelines](http://www.bbc.co.uk/gel/guidelines/typography).
|
|
@@ -43,14 +53,12 @@ $ npm install --save gel-typography
|
|
|
43
53
|
|
|
44
54
|
```sass
|
|
45
55
|
// your-app/main.scss
|
|
46
|
-
@
|
|
47
|
-
@import 'node_modules/sass-mq/mq';
|
|
48
|
-
@import 'node_modules/gel-typography/typography';
|
|
56
|
+
@use 'node_modules/gel-typography/typography';
|
|
49
57
|
```
|
|
50
58
|
|
|
51
59
|
### Install manually
|
|
52
60
|
|
|
53
|
-
You can install this component manually by downloading the content of this Git repo into your project and use a Sass @
|
|
61
|
+
You can install this component manually by downloading the content of this Git repo into your project and use a Sass @use to include it in your project.
|
|
54
62
|
|
|
55
63
|
> **Note:** you will manually need to manage the dependencies below, without these this component will fail to compile.
|
|
56
64
|
|
|
@@ -77,14 +85,12 @@ By default the GEL Typography component does not output any markup but exposes a
|
|
|
77
85
|
}
|
|
78
86
|
```
|
|
79
87
|
|
|
80
|
-
A collection of typography classes can be output by defining `$gel-type-enable--markup-output: true;`
|
|
88
|
+
A collection of typography classes can be output by defining `$gel-type-enable--markup-output: true;` as you `@use` the typography partial.
|
|
81
89
|
|
|
82
90
|
**Example:**
|
|
83
91
|
|
|
84
92
|
```scss
|
|
85
|
-
$gel-type-enable--markup-output: true;
|
|
86
|
-
|
|
87
|
-
@import "gel-typography/typography";
|
|
93
|
+
@use "gel-typography/typography" with ($gel-type-enable--markup-output: true);
|
|
88
94
|
```
|
|
89
95
|
|
|
90
96
|
The following configurable options are available:
|