sass-zero 0.0.41 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/Example.html +13 -13
  3. data/README.md +6 -1
  4. data/app/assets/stylesheets/sass-zero/base.scss +0 -1
  5. data/app/assets/stylesheets/sass-zero/base/preflight.scss +15 -4
  6. data/app/assets/stylesheets/sass-zero/breadboard.scss +213 -0
  7. data/app/assets/stylesheets/sass-zero/mixins.scss +48 -23
  8. data/app/assets/stylesheets/sass-zero/utilities.scss +3 -0
  9. data/app/assets/stylesheets/sass-zero/utilities/align.scss +28 -0
  10. data/app/assets/stylesheets/sass-zero/utilities/animation.scss +59 -0
  11. data/app/assets/stylesheets/sass-zero/utilities/container.scss +36 -0
  12. data/app/assets/stylesheets/sass-zero/utilities/flex.scss +33 -21
  13. data/app/assets/stylesheets/sass-zero/utilities/layout.scss +40 -3
  14. data/app/assets/stylesheets/sass-zero/utilities/list.scss +20 -10
  15. data/app/assets/stylesheets/sass-zero/utilities/position.scss +2 -2
  16. data/app/assets/stylesheets/sass-zero/utilities/text.scss +66 -64
  17. data/app/assets/stylesheets/sass-zero/variables.scss +1 -0
  18. data/app/assets/stylesheets/sass-zero/variables/border.scss +4 -1
  19. data/app/assets/stylesheets/sass-zero/variables/breakpoints.scss +5 -4
  20. data/app/assets/stylesheets/sass-zero/variables/colors.scss +239 -118
  21. data/app/assets/stylesheets/sass-zero/variables/effects.scss +28 -4
  22. data/app/assets/stylesheets/sass-zero/variables/flex.scss +17 -1
  23. data/app/assets/stylesheets/sass-zero/variables/grid.scss +85 -0
  24. data/app/assets/stylesheets/sass-zero/variables/spacing.scss +16 -2
  25. data/app/assets/stylesheets/sass-zero/variables/transform.scss +9 -2
  26. data/app/assets/stylesheets/sass-zero/variables/typography.scss +18 -15
  27. data/app/assets/stylesheets/sass-zero/variables/width.scss +8 -3
  28. data/app/assets/stylesheets/sass-zero/variables/zindex.scss +1 -1
  29. data/lib/sass/zero/version.rb +1 -1
  30. data/package.json +1 -1
  31. metadata +12 -9
  32. data/app/assets/stylesheets/sass-zero/base/breadboard.scss +0 -191
  33. data/app/assets/stylesheets/sass-zero/base/variables.scss +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7535d89224d6749bc77287fa7b66b68e6e1fe7d14e418187dacc923461ee184
4
- data.tar.gz: a29e525d141f3d99e1740f60f07820c7af8e41b2bc1965ada826b6bc979c7456
3
+ metadata.gz: a70d79a12adc6f8ce1f1e8cb6010376853a05f3811220d802bdba66807af5f73
4
+ data.tar.gz: 468f771702b25513dd37bfb8fc80e3ebbc61816db3680b3bc3839976676eaafb
5
5
  SHA512:
6
- metadata.gz: 7f6ee090a317a9a289339d88312e2655923745196ede0d1e1704de70b5ec0ea61f4136e1630d9112284204e32ab4c3d97b60c9ad31925f24c2c3c4b020adc7a3
7
- data.tar.gz: 82a8ced5aa112b734f511f212beab343b5aafa29f1a77cb8ece989fe6f8a6384418d3692027dfa8d9c18567f71ae2de56a9e99004b5fa693817a6eacff2f3a8a
6
+ metadata.gz: d1b54a51fe3aff5ca9203f97ac299afbef75c7fc823d6809ef33c8157856d253126d215bf635eb34ffd53e70387b682cc4b4f9db942ca7a21d8450302127d199
7
+ data.tar.gz: dc64fedbee094996ad563e765e3edbd70e53a659d653437e26baea00abe691b925e564929c1932c22e0d3411d0e7855b5e6806103a13b302eb4213b592a490e7
@@ -1,6 +1,6 @@
1
- <main>
1
+ <main class="container">
2
2
  <p>The base type is 1.6rem (16px) over 1.6 line height (24px)</p>
3
- <a href="#">Anchor</a>
3
+ <a href="#" class="txt--underline">Anchor</a>
4
4
  <em>Emphasis</em>
5
5
  <small>Small</small>
6
6
  <strong>Strong</strong>
@@ -24,9 +24,9 @@
24
24
 
25
25
  <form class="push-lg--bottom">
26
26
  <div class="push-md--bottom">
27
- <label for="nameField">Name</label>
27
+ <label for="nameField" class="u-display-b txt--bold">Name</label>
28
28
  <input type="text" placeholder="CJ Patoilo" id="nameField" class="input">
29
- <label for="ageRangeField">Age Range</label>
29
+ <label for="ageRangeField" class="u-display-b txt--bold">Age Range</label>
30
30
 
31
31
  <select id="ageRangeField" class="input input--select">
32
32
  <option value="0-13">0-13</option>
@@ -35,36 +35,36 @@
35
35
  <option value="24+">24+</option>
36
36
  </select>
37
37
 
38
- <label for="commentField">Comment</label>
38
+ <label for="commentField" class="u-display-b txt--bold">Comment</label>
39
39
  <textarea placeholder="Hi CJ …" id="commentField" rows="3" class="input"></textarea>
40
40
 
41
41
  <div class="push-md--bottom">
42
42
  <div>
43
43
  <input type="checkbox" name="option1" value="1" class="checkbox" checked>
44
- <label for="option1">Option 1</label>
44
+ <label for="option1" class="u-display-ib">Option 1</label>
45
45
  </div>
46
46
  <div>
47
47
  <input type="checkbox" name="option2" value="2" class="checkbox">
48
- <label for="option2">Option 2</label>
48
+ <label for="option2" class="u-display-ib">Option 2</label>
49
49
  </div>
50
50
  <div>
51
51
  <input type="checkbox" name="option3" value="3" class="checkbox">
52
- <label for="option3">Option 3</label>
52
+ <label for="option3" class="u-display-ib">Option 3</label>
53
53
  </div>
54
54
  </div>
55
55
 
56
56
  <div class="push-md--bottom">
57
57
  <div>
58
58
  <input type="radio" name="radio" value="1" class="radio" checked>
59
- <label for="radio">Option 1</label>
59
+ <label for="radio" class="u-display-ib">Option 1</label>
60
60
  </div>
61
61
  <div>
62
62
  <input type="radio" name="radio" value="2" class="radio">
63
- <label for="radio">Option 2</label>
63
+ <label for="radio" class="u-display-ib">Option 2</label>
64
64
  </div>
65
65
  <div>
66
66
  <input type="radio" name="radio" value="3" class="radio">
67
- <label for="radio">Option 3</label>
67
+ <label for="radio" class="u-display-ib">Option 3</label>
68
68
  </div>
69
69
  </div>
70
70
  </div>
@@ -113,13 +113,13 @@
113
113
 
114
114
  <hr>
115
115
 
116
- <ul>
116
+ <ul class="list--unindented ">
117
117
  <li>Unordered list item 1</li>
118
118
  <li>Unordered list item 2</li>
119
119
  <li>Unordered list item 3</li>
120
120
  </ul>
121
121
 
122
- <ol>
122
+ <ol class="list--unindented ">
123
123
  <li>Ordered list item 1</li>
124
124
  <li>Ordered list item 2</li>
125
125
  <li>Ordered list item 3</li>
data/README.md CHANGED
@@ -31,7 +31,7 @@ Developers should be able to produce your own design, [Refactoring UI](https://r
31
31
  ### Breadboard Theme
32
32
 
33
33
  - [Example](https://github.com/lazaronixon/sass-zero/blob/master/Example.html)
34
- - [Breadboard](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/base/breadboard.scss)
34
+ - [Breadboard](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/breadboard.scss)
35
35
 
36
36
  ### Variables
37
37
 
@@ -40,6 +40,7 @@ Developers should be able to produce your own design, [Refactoring UI](https://r
40
40
  - [Colors](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/variables/colors.scss)
41
41
  - [Effects](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/variables/effects.scss)
42
42
  - [Flex](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/variables/flex.scss)
43
+ - [Grid](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/variables/grid.scss)
43
44
  - [Spacing](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/variables/spacing.scss)
44
45
  - [Transform](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/variables/transform.scss)
45
46
  - [Transition](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/variables/transition.scss)
@@ -50,6 +51,9 @@ Developers should be able to produce your own design, [Refactoring UI](https://r
50
51
 
51
52
  ### Utilities
52
53
 
54
+ - [Align](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/utilities/align.scss)
55
+ - [Animation](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/utilities/animation.scss)
56
+ - [Container](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/utilities/container.scss)
53
57
  - [Margin Push](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/utilities/push.scss)
54
58
  - [Margin Pull](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/utilities/pull.scss)
55
59
  - [Margin Reset](https://github.com/lazaronixon/sass-zero/blob/master/app/assets/stylesheets/sass-zero/utilities/flush.scss)
@@ -76,6 +80,7 @@ Add this line to your application.css:
76
80
  ```css
77
81
  *= require sass-zero/base
78
82
  *= require sass-zero/utilities
83
+ *= require sass-zero/breadboard
79
84
  ```
80
85
 
81
86
  Create some stylesheet using [BEM](http://getbem.com/naming) and [SASS-ZERO Variables](https://github.com/lazaronixon/sass-zero/blob/master/vendor/assets/stylesheets/sass-zero/variables.scss):
@@ -1,3 +1,2 @@
1
1
  @import "base/normalize";
2
2
  @import "base/preflight";
3
- @import "base/breadboard";
@@ -1,4 +1,5 @@
1
- @import "sass-zero/base/variables";
1
+ @import "sass-zero/variables/colors";
2
+ @import "sass-zero/variables/typography";
2
3
 
3
4
  /**
4
5
  * Manually forked from SUIT CSS Base: https://github.com/suitcss/base
@@ -29,7 +30,6 @@ pre {
29
30
  button {
30
31
  background-color: transparent;
31
32
  background-image: none;
32
- padding: 0;
33
33
  }
34
34
 
35
35
  /**
@@ -70,6 +70,17 @@ html {
70
70
  line-height: 1.5; /* 2 */
71
71
  }
72
72
 
73
+
74
+ /**
75
+ * Inherit font-family and line-height from `html` so users can set them as
76
+ * a class directly on the `html` element.
77
+ */
78
+
79
+ body {
80
+ font-family: inherit;
81
+ line-height: inherit;
82
+ }
83
+
73
84
  /**
74
85
  * 1. Prevent padding and border from affecting element width.
75
86
  *
@@ -102,7 +113,7 @@ html {
102
113
  box-sizing: border-box; /* 1 */
103
114
  border-width: 0; /* 2 */
104
115
  border-style: solid; /* 2 */
105
- border-color: $breadboard-border; /* 2 */
116
+ border-color: $gray-200; /* 2 */
106
117
  }
107
118
 
108
119
  /*
@@ -133,7 +144,7 @@ textarea {
133
144
 
134
145
  input::placeholder,
135
146
  textarea::placeholder {
136
- color: $breadboard-placeholder;
147
+ color: $gray-400;
137
148
  }
138
149
 
139
150
  button,
@@ -0,0 +1,213 @@
1
+ @import "sass-zero/variables";
2
+ @import "sass-zero/mixins";
3
+
4
+ $font-family: $font-sans;
5
+
6
+ $radius-input: $rounded;
7
+ $radius-button: $rounded;
8
+
9
+ :root {
10
+ --color-bg--main: #{$white};
11
+ --color-bg--surface: #{$gray-100};
12
+ --color-primary: #{$gray-900};
13
+ --color-txt: #{$gray-900};
14
+ --color-focus-ring: #{rgba($gray-900, $opacity-50)};
15
+
16
+ --image-bg-select: url('data:image/svg+xml,<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>');
17
+ --image-checked-checkbox: url('data:image/svg+xml,<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>');
18
+ --image-checked-radio: url('data:image/svg+xml,<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>');
19
+ }
20
+
21
+ html {
22
+ background: var(--color-bg--main);
23
+ color: var(--color-txt);
24
+ font-family: $font-family;
25
+ font-size: 16px;
26
+ }
27
+
28
+ .btn {
29
+ border-radius: $radius-button;
30
+ border-width: $border;
31
+ display: inline-block;
32
+ font-weight: $font-bold;
33
+ padding: $size-2 $size-4;
34
+ cursor: pointer;
35
+
36
+ &:focus {
37
+ outline: 2px dotted var(--color-primary);
38
+ outline-offset: 2px;
39
+ }
40
+
41
+ &:disabled {
42
+ pointer-events: none;
43
+ opacity: $opacity-50;
44
+ }
45
+
46
+ &--primary {
47
+ background-color: var(--color-primary);
48
+ border-color: var(--color-primary);
49
+ color: var(--color-bg--main);
50
+ }
51
+
52
+ &--secondary {
53
+ background-color: var(--color-bg--main);
54
+ border-color: var(--color-primary);
55
+ }
56
+
57
+ &--tertiary {
58
+ background-color: $transparent;
59
+ border-color: $transparent;
60
+ }
61
+ }
62
+
63
+ .input {
64
+ appearance: none;
65
+ background-color: $transparent;
66
+ border-radius: $radius-input;
67
+ border-width: $border;
68
+ padding: $size-2 $size-3;
69
+ width: $size-full;
70
+
71
+ &--select {
72
+ background-image: var(--image-bg-select);
73
+ background-position: right $size-2 center;
74
+ background-repeat: no-repeat;
75
+ background-size: auto $size-5;
76
+ padding-right: $size-8;
77
+ }
78
+
79
+ &:focus {
80
+ box-shadow: ring($color: var(--color-focus-ring));
81
+ @include outline-none;
82
+ }
83
+ }
84
+
85
+ .checkbox {
86
+ border-radius: $rounded;
87
+ @include input-selection(var(--color-primary));
88
+
89
+ &:checked {
90
+ background-image: var(--image-checked-checkbox);
91
+ @include checked;
92
+ }
93
+
94
+ &:focus {
95
+ box-shadow: ring($color: var(--color-focus-ring));
96
+ @include outline-none;
97
+ }
98
+ }
99
+
100
+ .radio {
101
+ border-radius: $rounded-full;
102
+ @include input-selection(var(--color-primary));
103
+
104
+ &:checked {
105
+ background-image: var(--image-checked-radio);
106
+ @include checked;
107
+ }
108
+
109
+ &:focus {
110
+ box-shadow: ring($color: var(--color-focus-ring));
111
+ @include outline-none;
112
+ }
113
+ }
114
+
115
+ blockquote {
116
+ border-left-width: $border-4;
117
+ padding: $size-3 $size-4;
118
+ }
119
+
120
+ code {
121
+ background-color: var(--color-bg--surface);
122
+ border-radius: $rounded;
123
+ font-size: $text-sm;
124
+ margin: $size-0 $size-1;
125
+ padding: $size-1 $size-2;
126
+ white-space: nowrap;
127
+ }
128
+
129
+ pre {
130
+ background-color: var(--color-bg--surface);
131
+ overflow-y: hidden;
132
+
133
+ & > code {
134
+ display: block;
135
+ padding: $size-2 $size-3;
136
+ white-space: pre;
137
+ }
138
+ }
139
+
140
+ hr {
141
+ margin: $size-6 $size-0;
142
+ }
143
+
144
+ a {
145
+ font-weight: $font-bold;
146
+ }
147
+
148
+ ul, ol {
149
+ padding-left: $size-10;
150
+ }
151
+
152
+ ul {
153
+ list-style: disc outside;
154
+ }
155
+
156
+ ol {
157
+ list-style: decimal outside;
158
+ }
159
+
160
+ label, legend, dt {
161
+ margin-bottom: $size-1;
162
+ }
163
+
164
+ h1, h2, h3, h4, h5, h6, .hdg {
165
+ margin-bottom: $size-4;
166
+ }
167
+
168
+ fieldset, .input {
169
+ margin-bottom: $size-6;
170
+ }
171
+
172
+ blockquote, figure, p, pre, table, ul, ol, dl {
173
+ margin-bottom: $size-6;
174
+ }
175
+
176
+ table {
177
+ width: $size-full;
178
+ }
179
+
180
+ td, th {
181
+ border-bottom-width: $border;
182
+ padding: $size-3 $size-4;
183
+ text-align: inherit;
184
+ }
185
+
186
+ h1, h2, h3, h4, h5, h6, .hdg {
187
+ font-weight: $font-bold;
188
+ line-height: $leading-tight;
189
+ }
190
+
191
+ h1, .hdg--4xl {
192
+ font-size: $text-4xl;
193
+ }
194
+
195
+ h2, .hdg--3xl {
196
+ font-size: $text-3xl;
197
+ }
198
+
199
+ h3, .hdg--2xl {
200
+ font-size: $text-2xl;
201
+ }
202
+
203
+ h4, .hdg--xl {
204
+ font-size: $text-xl;
205
+ }
206
+
207
+ h5, .hdg--lg {
208
+ font-size: $text-lg;
209
+ }
210
+
211
+ h6, .hdg--base {
212
+ font-size: $text-base;
213
+ }
@@ -1,12 +1,7 @@
1
1
  @import "sass-zero/variables/border";
2
2
  @import "sass-zero/variables/effects";
3
3
  @import "sass-zero/variables/spacing";
4
-
5
- @mixin ellipsis {
6
- overflow: hidden;
7
- text-overflow: ellipsis;
8
- white-space: nowrap;
9
- }
4
+ @import "sass-zero/variables/zindex";
10
5
 
11
6
  @mixin antialiased {
12
7
  -webkit-font-smoothing: antialiased;
@@ -26,10 +21,19 @@
26
21
  }
27
22
  }
28
23
 
29
- @mixin focus {
30
- border-color: #a4cafe;
31
- box-shadow: $shadow-outline;
32
- outline: 0;
24
+ @mixin ellipsis {
25
+ text-overflow: ellipsis;
26
+ white-space: nowrap;
27
+ overflow: hidden;
28
+ }
29
+
30
+ @mixin input-selection($color) {
31
+ appearance: none;
32
+ border-width: $border;
33
+ color: $color;
34
+ margin-bottom: -0.1rem;
35
+ height: $size-4;
36
+ width: $size-4;
33
37
  }
34
38
 
35
39
  @mixin checked {
@@ -39,8 +43,39 @@
39
43
  background-repeat: no-repeat;
40
44
  }
41
45
 
46
+ @mixin outline-none {
47
+ outline: 2px solid transparent;
48
+ outline-offset: 2px;
49
+ }
50
+
51
+ @mixin outline-white {
52
+ outline: 2px dotted white;
53
+ outline-offset: 2px;
54
+ }
55
+
56
+ @mixin outline-black {
57
+ outline: 2px dotted black;
58
+ outline-offset: 2px;
59
+ }
60
+
61
+ @mixin divider($color) {
62
+ position: relative;
63
+ z-index: $z-10;
64
+
65
+ ::before {
66
+ content: '';
67
+ position: absolute;
68
+ top: 50%;
69
+ left: $size-0;
70
+ right: $size-0;
71
+ height: $size-px;
72
+ background-color: $color;
73
+ z-index: -1;
74
+ }
75
+ }
76
+
42
77
  @mixin space-x($space, $reverse: false) {
43
- & > :not(template) ~ :not(template) {
78
+ & > :not([hidden]) ~ :not([hidden]) {
44
79
  @if $reverse {
45
80
  margin-right: $space;
46
81
  } @else {
@@ -50,7 +85,7 @@
50
85
  }
51
86
 
52
87
  @mixin space-y($space, $reverse: false) {
53
- & > :not(template) ~ :not(template) {
88
+ & > :not([hidden]) ~ :not([hidden]) {
54
89
  @if $reverse {
55
90
  margin-bottom: $space;
56
91
  } @else {
@@ -59,20 +94,10 @@
59
94
  }
60
95
  }
61
96
 
62
- @mixin make-container($padding-x, $max-width) {
97
+ @mixin make-container($padding-x: $size-4) {
63
98
  width: 100%;
64
99
  padding-right: $padding-x;
65
100
  padding-left: $padding-x;
66
101
  margin-right: $size-auto;
67
102
  margin-left: $size-auto;
68
- max-width: $max-width;
69
- }
70
-
71
- @mixin input-selection($color) {
72
- appearance: none;
73
- border-width: $border;
74
- color: $color;
75
- margin-bottom: -0.1rem;
76
- height: $size-4;
77
- width: $size-4;
78
103
  }