Skip to content

Commit 91956e5

Browse files
committed
Add examples of spacing multipliers
1 parent 0a5e6dc commit 91956e5

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed

demo.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ <h2>Spacing</h2>
4848
<div class="pure-py-3 pure-bg-blue pure-bg-opacity-20 pure-border-black pure-bd-opacity-40">
4949
<div class="pure-bg-white">pure-py-3</div>
5050
</div>
51+
<br>
52+
<div class="pure-p-2 pure-spacing-2x pure-bg-blue pure-bg-opacity-20 pure-border-black pure-bd-opacity-40">
53+
<div class="pure-bg-white">pure-p-2 pure-spacing-2x</div>
54+
</div>
55+
<br>
56+
<div class="pure-pl-2 pure-spacing-3x pure-bg-blue pure-bg-opacity-20 pure-border-black pure-bd-opacity-40">
57+
<div class="pure-bg-white">pure-pl-2 pure-spacing-3x</div>
58+
</div>
5159

5260
<br>
5361
<br>
@@ -87,6 +95,14 @@ <h2>Spacing</h2>
8795
<div class="pure-bg-green pure-bg-opacity-20 pure-border-black pure-bd-opacity-40">
8896
<div class="pure-my-3 pure-bg-white">pure-my-3</div>
8997
</div>
98+
<br>
99+
<div class="pure-bg-green pure-bg-opacity-20 pure-border-black pure-bd-opacity-40">
100+
<div class="pure-m-2 pure-spacing-2x pure-bg-white">pure-m-2 pure-spacing-2x</div>
101+
</div>
102+
<br>
103+
<div class="pure-bg-green pure-bg-opacity-20 pure-border-black pure-bd-opacity-40">
104+
<div class="pure-ml-2 pure-spacing-3x pure-bg-white">pure-ml-2 pure-spacing-3x</div>
105+
</div>
90106

91107
</body>
92108
</html>

src/base.scss

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
$pure-opacities: 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90;
22
$pure-spacing-unit: 0.25;
33

4-
54
:root {
65
--pureBlue: #0078e7;
76
--pureBlueRgb: 0, 120, 231;
@@ -11,15 +10,28 @@ $pure-spacing-unit: 0.25;
1110
--pureGreenRgb: 120, 231, 0;
1211
--pureWhite: #ffffff;
1312
--pureWhiteRgb: 255, 255, 255;
13+
}
1414

15-
--pureSpacingUnit: #{$pure-spacing-unit}rem;
16-
17-
--pureTxtOpacity: 1;
18-
--pureBdOpacity: 1;
15+
@property --pureBdOpacity {
16+
syntax: "<number>";
17+
inherits: false;
18+
initial-value: 1;
1919
}
2020

2121
@property --pureBgOpacity {
2222
syntax: "<number>";
2323
inherits: false;
2424
initial-value: 1;
25-
}
25+
}
26+
27+
@property --pureSpacingUnit {
28+
syntax: "<number>";
29+
inherits: false;
30+
initial-value: #{$pure-spacing-unit}rem;
31+
}
32+
33+
@property --pureTxtOpacity {
34+
syntax: "<number>";
35+
inherits: false;
36+
initial-value: 1;
37+
}

0 commit comments

Comments
 (0)