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
Copy file name to clipboardExpand all lines: readme.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -28,19 +28,19 @@ Before getting started, I would recommend [reading this](https://github.com/lolm
28
28
29
29
### Variables
30
30
31
-
A few variables are exposed that can be customized, each of them are listed below:
31
+
A few variables are exposed that can be customized, each of them are listed below. All of these variables are scoped under `rupture` so that there are no conflicts with css keywords or other libraries.
32
32
33
-
##### `mobile-cutoff`
33
+
##### `rupture.mobile-cutoff`
34
34
Pixel value where the `mobile` mixin kicks in, also the lower bound of the `tablet` mixin.
35
35
36
-
##### `desktop-cutoff`
36
+
##### `rupture.desktop-cutoff`
37
37
Pixel value where the `desktop` mixin kicks in, also the upper bound of the `tablet` mixin.
38
38
39
-
##### `scale`
39
+
##### `rupture.scale`
40
40
A list of values that you can reference by index in most of the mixins listed below. This works exactly like [breakpoint-slicer](https://github.com/lolmaus/breakpoint-slicer). Default looks like this:
41
41
42
42
```js
43
-
scale =0400px600px800px1050px
43
+
rupture.scale=0400px600px800px1050px
44
44
```
45
45
46
46
### Mixins
@@ -63,16 +63,16 @@ Alias of `below`. Styles take effect from zero up to the provided [measure](#wha
63
63
When the screen size is _between_ the two provided [measure](#what-is-a-measure), the styles in the block will take effect.
64
64
65
65
##### `+at(measure)`
66
-
Intended for use with scale measures, when the screen size is between the provided scale [measure](#what-is-a-measure) and the one below it, the styles in the block will take effect. For example, if your scale was something like `scale = 0 400px 600px`, and you used the mixin like `+at(2)`, it would kick in between 400 and 600px (remember, scale is zero indexed, so 2 is the third value, and one less is the second). If you use this with a value, it will not have much effect, as it will be at one specific pixel value rather than a range like you want.
66
+
Intended for use with scale measures, when the screen size is between the provided scale [measure](#what-is-a-measure) and the one below it, the styles in the block will take effect. For example, if your scale was something like `rupture.scale = 0 400px 600px`, and you used the mixin like `+at(2)`, it would kick in between 400 and 600px (remember, scale is zero indexed, so 2 is the third value, and one less is the second). If you use this with a value, it will not have much effect, as it will be at one specific pixel value rather than a range like you want.
67
67
68
68
##### `+mobile()`
69
-
When the screen size is 400px (defined by `mobile-cutoff`) or less, the styles in the block will take effect.
69
+
When the screen size is 400px (defined by `rupture.mobile-cutoff`) or less, the styles in the block will take effect.
70
70
71
71
##### `+tablet()`
72
-
When the screen size is between 1050px (defined by `desktop-cutoff`) and 400px (defined by `mobile-cutoff`), the styles in the block will take effect.
72
+
When the screen size is between 1050px (defined by `rupture.desktop-cutoff`) and 400px (defined by `mobile-cutoff`), the styles in the block will take effect.
73
73
74
74
##### `+desktop()`
75
-
When the screen size is 1050px (defined by `desktop-cutoff`) or more, the styles in the block will take effect.
75
+
When the screen size is 1050px (defined by `rupture.desktop-cutoff`) or more, the styles in the block will take effect.
76
76
77
77
##### `+retina()`
78
78
When the device has a pixel density of over 1.5 (retina), the styles in the block will take effect.
@@ -83,15 +83,15 @@ It is a popular opinion that using `em` units for media queries is a good practi
83
83
84
84
Rupture allows you to automatically convert all your breakpoint units from `px` to `em`.
85
85
86
-
All you need to do to enable this behavior is to define an optional `base-font-size` (unless already defined) and set `enable-em-breakpoints` to `true`.
86
+
All you need to do to enable this behavior is to define an optional `rupture.base-font-size` (unless already defined) and set `rupture.enable-em-breakpoints` to `true`.
87
87
88
-
`base-font-size` defaults to `16px`.
88
+
`rupture.base-font-size` defaults to `16px`.
89
89
90
90
Example:
91
91
92
92
```
93
93
// base-font-size = 18px (commented out because it's optional and we want 16px)
0 commit comments