You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A flexible code implementation of the GEL Grid.<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: v7.0.0
8
+
9
+
v7.0.0 of GEL Grid implements the [@use](https://sass-lang.com/documentation/at-rules/use/) and [@forward](https://sass-lang.com/documentation/at-rules/forward/) approach and removes [@import](https://sass-lang.com/documentation/at-rules/import/).
10
+
11
+
This has a number of consequences, but mostly the impact relates to how other modules are now loaded in and how to access variables. Namespaces now come into play, so please read the sass documention linked to above.
12
+
13
+
For usage of GEL Grid prior to v7.0.0 please reference the [v6.3.0 readme](https://github.com/bbc/gel-grid/tree/6.3.0).
14
+
10
15
## What is this?
11
16
12
17
An implementation of the [GEL Grid Guidelines](https://www.bbc.co.uk/gel/guidelines/grid).
@@ -25,14 +30,16 @@ It can used in two forms, by simply adding the relevant classes to your markup:
25
30
26
31
Or using a Sass mixin:
27
32
28
-
```sass
33
+
```scss
34
+
@use'gel-grid/grid';
35
+
29
36
.my-component {
30
-
@include gel-layout;
37
+
@includegrid.gel-layout;
31
38
}
32
39
33
40
.my-component__item {
34
-
@include gel-layout-item;
35
-
@include gel-columns(1/2);
41
+
@includegrid.gel-layout-item;
42
+
@includegrid.gel-columns(1/2);
36
43
}
37
44
```
38
45
@@ -50,38 +57,45 @@ $ npm install --save gel-grid
50
57
51
58
```sass
52
59
// your-app/main.scss
53
-
@import 'node_modules/gel-sass-tools/sass-tools';
54
-
@import 'node_modules/sass-mq/mq';
55
-
@import 'node_modules/gel-grid/grid';
60
+
@use 'gel-grid/grid';
56
61
```
57
62
58
63
### Install manually
59
64
60
-
You can install this component manually by downloading the content of this Git repo into your project and use a Sass @import to include it in your project.
65
+
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.
61
66
62
67
> **Note:** you will manually need to manage the dependencies below, without these this component will fail to compile.
63
68
64
69
### Compiled CSS
65
70
66
71
If you require just the built css, it is automatically built to the [gel-grid.css](https://github.com/bbc/gel-grid.css) repository.
67
72
68
-
## Dependencies
73
+
### Loadpaths
74
+
75
+
Because this module depends on other modules, [GEL Sass Tools](https://github.com/bbc/gel-sass-tools) and [Sass MQ](https://github.com/sass-mq/sass-mq), when compiling your Sass it needs to know where find the referenced modules. It does this via a [loadPath](https://sass-lang.com/documentation/at-rules/use/#load-paths).
76
+
77
+
If compiling from the command line you can specify:
78
+
```
79
+
sass --load-path=node_modules/ <options>
80
+
```
69
81
70
-
In order to use the component you will need the following components available:
82
+
whereas within nodejs you can call compile ot compileAsync:
0 commit comments