Skip to content

Commit 661ddfc

Browse files
authored
chore: Update README (#15)
## Description Updates the README to flect the change in name for the function and mixin (now called `toRem` instead of `rem`). ## Issue https://jira.dev.bbc.co.uk/browse/GEL-2103
1 parent f774a3a commit 661ddfc

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -130,30 +130,30 @@ or functions can be nested within other Sass features such as mixins:
130130

131131
```sass
132132
.my-component {
133-
@include rem('margin-bottom', halve($gel-spacing-unit));
134-
@include rem('padding-left', double($gel-spacing-unit));
135-
@include rem('padding-right', double($gel-spacing-unit));
133+
@include toRem('margin-bottom', halve($gel-spacing-unit));
134+
@include toRem('padding-left', double($gel-spacing-unit));
135+
@include toRem('padding-right', double($gel-spacing-unit));
136136
}
137137
```
138138

139139
### REM mixin
140140

141-
The `rem` tool can be used in two ways. Either by directly calling the `rem($value)` function, which will convert the supplied value and return a `rem` unit. E.g:
141+
The `rem` tool can be used in two ways. Either by directly calling the `toRem($value)` function, which will convert the supplied value and return a `rem` unit. E.g:
142142

143143
```sass
144144
.my-component {
145-
margin-bottom: rem($gel-spacing-unit);
145+
margin-bottom: toRem($gel-spacing-unit);
146146
}
147147
```
148148

149149
> Beware that [rem](http://caniuse.com/#feat=rem) units are not universal supported. IE8 and below do not support `rem` so require a `px` fallback.
150150
151-
You can also use the `@include rem($value);` mixin, which by default returns a `px` fallback to allow support for older browsers which don't support `rem` units. E.g:
151+
You can also use the `@include toRem($value);` mixin, which by default returns a `px` fallback to allow support for older browsers which don't support `rem` units. E.g:
152152

153153
**Sass**
154154
```sass
155155
.my-component {
156-
@include rem('margin-bottom', 16px);
156+
@include toRem('margin-bottom', 16px);
157157
}
158158
```
159159

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gel-sass-tools",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "A collection of Sass Settings & Tools which align to key GEL values",
55
"main": "_sass-tools.scss",
66
"scripts": {

0 commit comments

Comments
 (0)