sass-zero 0.0.40 → 0.0.45

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/Example.html +12 -12
  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 +215 -0
  7. data/app/assets/stylesheets/sass-zero/mixins.scss +41 -16
  8. data/app/assets/stylesheets/sass-zero/utilities.scss +10 -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 +22 -5
  15. data/app/assets/stylesheets/sass-zero/utilities/position.scss +2 -2
  16. data/app/assets/stylesheets/sass-zero/utilities/text.scss +88 -53
  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 +8 -5
  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: 4c1618f19a592e556e232f98069655ba71d5627c3b9a329412eec047515fb0ce
4
- data.tar.gz: '085a4f0596a1b83213ebb14faf1575574ffcc985a497002f1d753b9e1ee556c1'
3
+ metadata.gz: 90335efa16cb09716e4c31bd9cb7df2469d9e586ce409ac5db752ef195f367a5
4
+ data.tar.gz: 867fd4aec244f7886f26d438734e92d3e7511d9be443983632d673a12a4296b3
5
5
  SHA512:
6
- metadata.gz: 422213f88a6e53076c21fab195d233b1ac131d02235e7229d01fd04804195bfc3cc45299c5ed178c24c5a6cce914d475264c75cd4ab919c3e2b5238ac9cc31a2
7
- data.tar.gz: 28a3d5da494a2dd64a5ae588a397ee3cd21303ca5600267b774140009ea02f58fac16a9f868a53aed07d84e8678ff22f5f19a6cd90650c1b9c35a27b6f99c542
6
+ metadata.gz: 14ac230bce5200038c588cbca45e565931061251a1e401ccf3699a1c326ef55eb0caf3806b6c29124a6641847567891d69e3d43c0b0280cf8ba26f4d7ac66ee3
7
+ data.tar.gz: b525273b68b1538a8102dbeb0ccd9abeaa9bcb5f60e1fea95829613fdcdfcdb354b991e228e22c6fd915fb4c515374cedac40d775c233ac8b5289ef3735948d9
@@ -1,4 +1,4 @@
1
- <main>
1
+ <main class="container">
2
2
  <p>The base type is 1.6rem (16px) over 1.6 line height (24px)</p>
3
3
  <a href="#">Anchor</a>
4
4
  <em>Emphasis</em>
@@ -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,215 @@
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
+ $color-bg--main: $white;
10
+ $color-bg--surface: $gray-100;
11
+ $color-primary: $gray-900;
12
+ $color-txt: $gray-900;
13
+ $color-focus-ring: rgba($gray-900, $opacity-50);
14
+
15
+ $image-bg-select-black: 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>');
16
+ $image-checked-checkbox-white: 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>');
17
+ $image-checked-radio-white: 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>');
18
+
19
+ html {
20
+ background: $color-bg--main;
21
+ color: $color-txt;
22
+ font-family: $font-family;
23
+ font-size: 16px;
24
+ }
25
+
26
+ blockquote {
27
+ border-color: $color-primary;
28
+ border-left-width: $border-4;
29
+ padding: $size-3 $size-4;
30
+ }
31
+
32
+ .btn {
33
+ border-radius: $radius-button;
34
+ border-width: $border;
35
+ display: inline-block;
36
+ font-weight: $font-bold;
37
+ padding: $size-2 $size-4;
38
+ cursor: pointer;
39
+
40
+ &:focus {
41
+ outline: 2px dotted $color-primary;
42
+ outline-offset: 2px;
43
+ }
44
+
45
+ &:disabled {
46
+ pointer-events: none;
47
+ opacity: $opacity-50;
48
+ }
49
+
50
+ &--primary {
51
+ background-color: $color-primary;
52
+ border-color: $color-primary;
53
+ color: $color-bg--main;
54
+ }
55
+
56
+ &--secondary {
57
+ background-color: $color-bg--main;
58
+ border-color: $color-primary;
59
+ }
60
+
61
+ &--tertiary {
62
+ background-color: $transparent;
63
+ border-color: $transparent;
64
+ }
65
+ }
66
+
67
+ code {
68
+ background-color: $color-bg--surface;
69
+ border-radius: $rounded-xl;
70
+ font-size: $text-sm;
71
+ margin: $size-0 $size-1;
72
+ padding: $size-1 $size-2;
73
+ white-space: nowrap;
74
+ }
75
+
76
+ pre {
77
+ background-color: $color-bg--surface;
78
+ border-color: $color-primary;
79
+ border-left-width: $border-4;
80
+ overflow-y: hidden;
81
+
82
+ & > code {
83
+ border-radius: $rounded-none;
84
+ display: block;
85
+ padding: $size-2 $size-3;
86
+ white-space: pre;
87
+ }
88
+ }
89
+
90
+ hr {
91
+ margin: $size-6 $size-0;
92
+ }
93
+
94
+ .input {
95
+ appearance: none;
96
+ background-color: $transparent;
97
+ border-radius: $radius-input;
98
+ border-width: $border;
99
+ padding: $size-2 $size-3;
100
+ width: $size-full;
101
+
102
+ &--select {
103
+ background-image: $image-bg-select-black;
104
+ background-position: right $size-2 center;
105
+ background-repeat: no-repeat;
106
+ background-size: auto $size-5;
107
+ padding-right: $size-8;
108
+ }
109
+
110
+ &:focus {
111
+ box-shadow: ring($color: $color-focus-ring);
112
+ @include outline-none;
113
+ }
114
+ }
115
+
116
+ .checkbox {
117
+ border-radius: $rounded;
118
+ @include input-selection($color-primary);
119
+
120
+ &:checked {
121
+ background-image: $image-checked-checkbox-white;
122
+ @include checked;
123
+ }
124
+
125
+ &:focus {
126
+ box-shadow: ring($color: $color-focus-ring);
127
+ @include outline-none;
128
+ }
129
+ }
130
+
131
+ .radio {
132
+ border-radius: $rounded-full;
133
+ @include input-selection($color-primary);
134
+
135
+ &:checked {
136
+ background-image: $image-checked-radio-white;
137
+ @include checked;
138
+ }
139
+
140
+ &:focus {
141
+ box-shadow: ring($color: $color-focus-ring);
142
+ @include outline-none;
143
+ }
144
+ }
145
+
146
+ a {
147
+ font-weight: $font-bold;
148
+ }
149
+
150
+ ul, ol {
151
+ padding-left: $size-10;
152
+ }
153
+
154
+ ul {
155
+ list-style: disc outside;
156
+ }
157
+
158
+ ol {
159
+ list-style: decimal outside;
160
+ }
161
+
162
+ label, legend, dt {
163
+ margin-bottom: $size-1;
164
+ }
165
+
166
+ h1, h2, h3, h4, h5, h6, .hdg {
167
+ margin-bottom: $size-4;
168
+ }
169
+
170
+ fieldset, .input {
171
+ margin-bottom: $size-6;
172
+ }
173
+
174
+ blockquote, figure, p, pre, table, ul, ol, dl {
175
+ margin-bottom: $size-6;
176
+ }
177
+
178
+ table {
179
+ width: $size-full;
180
+ }
181
+
182
+ td, th {
183
+ border-bottom-width: $border;
184
+ padding: $size-3 $size-4;
185
+ text-align: left;
186
+ }
187
+
188
+ h1, h2, h3, h4, h5, h6, .hdg {
189
+ font-weight: $font-bold;
190
+ line-height: $leading-tight;
191
+ }
192
+
193
+ h1, .hdg--4xl {
194
+ font-size: $text-4xl;
195
+ }
196
+
197
+ h2, .hdg--3xl {
198
+ font-size: $text-3xl;
199
+ }
200
+
201
+ h3, .hdg--2xl {
202
+ font-size: $text-2xl;
203
+ }
204
+
205
+ h4, .hdg--xl {
206
+ font-size: $text-xl;
207
+ }
208
+
209
+ h5, .hdg--lg {
210
+ font-size: $text-lg;
211
+ }
212
+
213
+ h6, .hdg--base {
214
+ font-size: $text-base;
215
+ }
@@ -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,17 +21,17 @@
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;
33
28
  }
34
29
 
35
- @mixin selection($color) {
30
+ @mixin input-selection($color) {
36
31
  appearance: none;
37
32
  border-width: $border;
38
33
  color: $color;
39
- margin-bottom: -0.2rem;
34
+ margin-bottom: -0.1rem;
40
35
  height: $size-4;
41
36
  width: $size-4;
42
37
  }
@@ -48,8 +43,39 @@
48
43
  background-repeat: no-repeat;
49
44
  }
50
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
+
51
77
  @mixin space-x($space, $reverse: false) {
52
- & > :not(template) ~ :not(template) {
78
+ & > :not([hidden]) ~ :not([hidden]) {
53
79
  @if $reverse {
54
80
  margin-right: $space;
55
81
  } @else {
@@ -59,7 +85,7 @@
59
85
  }
60
86
 
61
87
  @mixin space-y($space, $reverse: false) {
62
- & > :not(template) ~ :not(template) {
88
+ & > :not([hidden]) ~ :not([hidden]) {
63
89
  @if $reverse {
64
90
  margin-bottom: $space;
65
91
  } @else {
@@ -68,11 +94,10 @@
68
94
  }
69
95
  }
70
96
 
71
- @mixin make-container($padding-x, $max-width) {
97
+ @mixin make-container($padding-x: $size-4) {
72
98
  width: 100%;
73
99
  padding-right: $padding-x;
74
100
  padding-left: $padding-x;
75
101
  margin-right: $size-auto;
76
102
  margin-left: $size-auto;
77
- max-width: $max-width;
78
103
  }