Skip to content

Commit b60125a

Browse files
authored
feat: Remove $core, $enhanced and $fixed variables (#79)
## Description These three variables allowed for control of the output, where `core` functionality could be separated out from `enhanced` functionality (for more advanced browsers) and for Internet Explorer (`fixed`). As browsers have moved on significantly since this approach was adopted it is considered a good time to remove this functionality.
1 parent f7bbd6a commit b60125a

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ v6.0.0 of GEL Typography implements the [@use](https://sass-lang.com/documentati
1010

1111
This has a number of consequences; how modules are loaded, and how to access variables. Namespaces now come into play, so please read the sass documentation links above to learn more.
1212

13+
Previously, the properties output from this module could be controlled via three variables: $core, $enhanced and $fixed. These three variables allowed for control of the output, where core functionality could be separated out from enhanced functionality (for more advanced browsers) and for Internet Explorer (fixed).
14+
15+
As browsers have moved on significantly since this approach was adopted it is considered a good time to remove this functionality.
16+
1317
For usage of GEL Typography prior to v6.0.0 please reference the [v5.2.0 readme](https://github.com/bbc/gel-typography/tree/5.2.0).
1418

1519

lib/_tools.scss

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
// # GEL TYPOGRAPHY - TOOL
1111
//\*------------------------------------*/
1212

13-
// define some output control variables
14-
$core: true !default;
15-
$enhanced: true !default;
16-
$fixed: false !default;
17-
1813
// If larger font sizes enable, merge them with gel-type-settings
1914
@if settings.$gel-type-enable--larger-type-sizes {
2015
settings.$gel-type-settings: map.merge(settings.$gel-type-settings, settings.$gel-larger-font-sizes);
@@ -111,29 +106,25 @@ $fixed: false !default;
111106
// @author Adam Bulmer
112107
//
113108
@mixin gel-typography($type-class) {
114-
@if $core {
115-
$groupA: gel-typography($type-class, 'group-a');
116-
@include _gel-output-type-values($groupA);
117-
@include reith-letter-spacing($groupA);
109+
$groupA: gel-typography($type-class, 'group-a');
110+
@include _gel-output-type-values($groupA);
111+
@include reith-letter-spacing($groupA);
112+
113+
@include mq.mq($from: gel-bp-type-b) {
114+
$groupB: gel-typography($type-class, 'group-b');
115+
@include _gel-output-type-values($groupB);
116+
@include reith-letter-spacing($groupB);
118117
}
119118

120-
@if $enhanced {
121-
@include mq.mq($from: gel-bp-type-b) {
122-
$groupB: gel-typography($type-class, 'group-b');
123-
@include _gel-output-type-values($groupB);
124-
@include reith-letter-spacing($groupB);
125-
}
126-
127-
@include mq.mq($from: gel-bp-type-c) {
128-
$groupC: gel-typography($type-class, 'group-c');
129-
@include _gel-output-type-values($groupC);
130-
@include reith-letter-spacing($groupC);
119+
@include mq.mq($from: gel-bp-type-c) {
120+
$groupC: gel-typography($type-class, 'group-c');
121+
@include _gel-output-type-values($groupC);
122+
@include reith-letter-spacing($groupC);
131123

132-
.#{settings.$gel-type-touch-class} & {
133-
$groupNoTouch: gel-typography($type-class, settings.$gel-type-no-touch-group);
134-
@include _gel-output-type-values($groupNoTouch);
135-
@include reith-letter-spacing($groupNoTouch);
136-
}
124+
.#{settings.$gel-type-touch-class} & {
125+
$groupNoTouch: gel-typography($type-class, settings.$gel-type-no-touch-group);
126+
@include _gel-output-type-values($groupNoTouch);
127+
@include reith-letter-spacing($groupNoTouch);
137128
}
138129
}
139130
}

0 commit comments

Comments
 (0)