hux 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +8 -0
  3. data/.hound.yml +5 -0
  4. data/.ruby-version +1 -0
  5. data/.scss-lint.yml +249 -0
  6. data/CHANGELOG.md +4 -0
  7. data/CODE_OF_CONDUCT.md +6 -0
  8. data/Gemfile +3 -0
  9. data/Gulpfile.js +34 -0
  10. data/LICENSE.md +21 -0
  11. data/README.md +1 -0
  12. data/RELEASING.md +21 -0
  13. data/Rakefile +8 -0
  14. data/bin/hux +5 -0
  15. data/circle.yml +7 -0
  16. data/contrib/index.html +1 -0
  17. data/contrib/styles.scss +19 -0
  18. data/core/_base.scss +9 -0
  19. data/core/_generic.scss +152 -0
  20. data/core/_helpers.scss +349 -0
  21. data/core/_minireset.scss +92 -0
  22. data/core/components/_all.scss +15 -0
  23. data/core/components/_breadcrumb.scss +116 -0
  24. data/core/components/_card.scss +77 -0
  25. data/core/components/_dropdown.scss +84 -0
  26. data/core/components/_level.scss +119 -0
  27. data/core/components/_media.scss +64 -0
  28. data/core/components/_menu.scss +72 -0
  29. data/core/components/_message.scss +118 -0
  30. data/core/components/_modal.scss +132 -0
  31. data/core/components/_nav.scss +173 -0
  32. data/core/components/_navbar.scss +441 -0
  33. data/core/components/_pagination.scss +188 -0
  34. data/core/components/_panel.scss +135 -0
  35. data/core/components/_tabs.scss +206 -0
  36. data/core/elements/_all.scss +14 -0
  37. data/core/elements/_box.scss +30 -0
  38. data/core/elements/_button.scss +290 -0
  39. data/core/elements/_container.scss +44 -0
  40. data/core/elements/_content.scss +224 -0
  41. data/core/elements/_form.scss +935 -0
  42. data/core/elements/_icon.scss +28 -0
  43. data/core/elements/_image.scss +56 -0
  44. data/core/elements/_notification.scss +53 -0
  45. data/core/elements/_other.scss +48 -0
  46. data/core/elements/_progress.scss +56 -0
  47. data/core/elements/_table.scss +148 -0
  48. data/core/elements/_tag.scss +132 -0
  49. data/core/elements/_title.scss +81 -0
  50. data/core/grid/_all.scss +2 -0
  51. data/core/grid/_columns.scss +577 -0
  52. data/core/grid/_tiles.scss +53 -0
  53. data/core/layout/_all.scss +3 -0
  54. data/core/layout/_footer.scss +6 -0
  55. data/core/layout/_hero.scss +257 -0
  56. data/core/layout/_section.scss +19 -0
  57. data/core/utilities/_all.scss +6 -0
  58. data/core/utilities/_animations.scss +9 -0
  59. data/core/utilities/_controls.scss +51 -0
  60. data/core/utilities/_derived-variables.scss +81 -0
  61. data/core/utilities/_functions.scss +46 -0
  62. data/core/utilities/_initial-variables.scss +68 -0
  63. data/core/utilities/_mixins.scss +301 -0
  64. data/core/utilities/_variables.scss +153 -0
  65. data/hux.gemspec +31 -0
  66. data/lib/hux/generator.rb +80 -0
  67. data/lib/hux/version.rb +3 -0
  68. data/lib/hux.rb +1 -1
  69. data/package.json +33 -0
  70. data/spec/bitters_spec.rb +17 -0
  71. data/spec/fixtures/application.scss +2 -0
  72. data/spec/spec_helper.rb +3 -0
  73. metadata +183 -12
@@ -0,0 +1,349 @@
1
+ // Float
2
+
3
+ .is-clearfix {
4
+ @include clearfix;
5
+ }
6
+
7
+ .is-pulled-left {
8
+ float: left !important;
9
+ }
10
+
11
+ .is-pulled-right {
12
+ float: right !important;
13
+ }
14
+
15
+ // Overflow
16
+
17
+ .is-clipped {
18
+ overflow: hidden !important;
19
+ }
20
+
21
+ // Overlay
22
+
23
+ .is-overlay {
24
+ @include overlay;
25
+ }
26
+
27
+ // Typography
28
+
29
+ @mixin typography-size($target: "") {
30
+ @each $size in $sizes {
31
+ $i: index($sizes, $size);
32
+
33
+ .is-size-#{$i}#{if($target == "", "", "-" + $target)} {
34
+ font-size: $size !important;
35
+ }
36
+ }
37
+ }
38
+
39
+ @include typography-size;
40
+
41
+ @include mobile {
42
+ @include typography-size("mobile");
43
+ }
44
+
45
+
46
+ @include tablet {
47
+ @include typography-size("tablet");
48
+ }
49
+
50
+
51
+ @include touch {
52
+ @include typography-size("touch");
53
+ }
54
+
55
+
56
+ @include desktop {
57
+ @include typography-size("desktop");
58
+ }
59
+
60
+
61
+ @include widescreen {
62
+ @include typography-size("widescreen");
63
+ }
64
+
65
+
66
+ @include fullhd {
67
+ @include typography-size("fullhd");
68
+ }
69
+
70
+
71
+ $alignments: ("centered": "center", "left": "left", "right": "right");
72
+
73
+ @each $alignment, $text-align in $alignments {
74
+ .has-text-#{$alignment} {
75
+ text-align: #{$text-align} !important;
76
+ }
77
+
78
+ @include mobile {
79
+ .has-text-#{$alignment}-mobile {
80
+ text-align: #{$text-align} !important;
81
+ }
82
+ }
83
+
84
+
85
+ @include tablet {
86
+ .has-text-#{$alignment}-tablet {
87
+ text-align: #{$text-align} !important;
88
+ }
89
+ }
90
+
91
+
92
+ @include tablet-only {
93
+ .has-text-#{$alignment}-tablet-only {
94
+ text-align: #{$text-align} !important;
95
+ }
96
+ }
97
+
98
+
99
+ @include touch {
100
+ .has-text-#{$alignment}-touch {
101
+ text-align: #{$text-align} !important;
102
+ }
103
+ }
104
+
105
+
106
+ @include desktop {
107
+ .has-text-#{$alignment}-desktop {
108
+ text-align: #{$text-align} !important;
109
+ }
110
+ }
111
+
112
+
113
+ @include desktop-only {
114
+ .has-text-#{$alignment}-desktop-only {
115
+ text-align: #{$text-align} !important;
116
+ }
117
+ }
118
+
119
+
120
+ @include widescreen {
121
+ .has-text-#{$alignment}-widescreen {
122
+ text-align: #{$text-align} !important;
123
+ }
124
+ }
125
+
126
+
127
+ @include widescreen-only {
128
+ .has-text-#{$alignment}-widescreen-only {
129
+ text-align: #{$text-align} !important;
130
+ }
131
+ }
132
+
133
+
134
+ @include fullhd {
135
+ .has-text-#{$alignment}-fullhd {
136
+ text-align: #{$text-align} !important;
137
+ }
138
+ }
139
+ }
140
+
141
+ .is-capitalized {
142
+ text-transform: capitalize !important;
143
+ }
144
+
145
+ .is-lowercase {
146
+ text-transform: lowercase !important;
147
+ }
148
+
149
+ .is-uppercase {
150
+ text-transform: uppercase !important;
151
+ }
152
+
153
+ @each $name, $pair in $colors {
154
+ $color: nth($pair, 1);
155
+
156
+ .has-text-#{$name} {
157
+ color: $color !important;
158
+ }
159
+
160
+ a.has-text-#{$name} {
161
+ &:hover,
162
+ &:focus {
163
+ color: darken($color, 10%) !important;
164
+ }
165
+ }
166
+ }
167
+
168
+ @each $name, $shade in $shades {
169
+ .has-text-#{$name} {
170
+ color: $shade !important;
171
+ }
172
+ }
173
+
174
+ .has-text-weight-light {
175
+ font-weight: $weight-light !important;
176
+ }
177
+
178
+ .has-text-weight-normal {
179
+ font-weight: $weight-normal !important;
180
+ }
181
+
182
+ .has-text-weight-semibold {
183
+ font-weight: $weight-semibold !important;
184
+ }
185
+
186
+ .has-text-weight-bold {
187
+ font-weight: $weight-bold !important;
188
+ }
189
+
190
+ // Visibility
191
+
192
+ $displays: "block" "flex" "inline" "inline-block" "inline-flex";
193
+
194
+ @each $display in $displays {
195
+ .is-#{$display} {
196
+ display: #{$display} !important;
197
+ }
198
+
199
+ @include mobile {
200
+ .is-#{$display}-mobile {
201
+ display: #{$display} !important;
202
+ }
203
+ }
204
+
205
+
206
+ @include tablet {
207
+ .is-#{$display}-tablet {
208
+ display: #{$display} !important;
209
+ }
210
+ }
211
+
212
+
213
+ @include tablet-only {
214
+ .is-#{$display}-tablet-only {
215
+ display: #{$display} !important;
216
+ }
217
+ }
218
+
219
+
220
+ @include touch {
221
+ .is-#{$display}-touch {
222
+ display: #{$display} !important;
223
+ }
224
+ }
225
+
226
+
227
+ @include desktop {
228
+ .is-#{$display}-desktop {
229
+ display: #{$display} !important;
230
+ }
231
+ }
232
+
233
+
234
+ @include desktop-only {
235
+ .is-#{$display}-desktop-only {
236
+ display: #{$display} !important;
237
+ }
238
+ }
239
+
240
+
241
+ @include widescreen {
242
+ .is-#{$display}-widescreen {
243
+ display: #{$display} !important;
244
+ }
245
+ }
246
+
247
+
248
+ @include widescreen-only {
249
+ .is-#{$display}-widescreen-only {
250
+ display: #{$display} !important;
251
+ }
252
+ }
253
+
254
+
255
+ @include fullhd {
256
+ .is-#{$display}-fullhd {
257
+ display: #{$display} !important;
258
+ }
259
+ }
260
+ }
261
+
262
+ .is-hidden {
263
+ display: none !important;
264
+ }
265
+
266
+ @include mobile {
267
+ .is-hidden-mobile {
268
+ display: none !important;
269
+ }
270
+ }
271
+
272
+
273
+ @include tablet {
274
+ .is-hidden-tablet {
275
+ display: none !important;
276
+ }
277
+ }
278
+
279
+
280
+ @include tablet-only {
281
+ .is-hidden-tablet-only {
282
+ display: none !important;
283
+ }
284
+ }
285
+
286
+
287
+ @include touch {
288
+ .is-hidden-touch {
289
+ display: none !important;
290
+ }
291
+ }
292
+
293
+
294
+ @include desktop {
295
+ .is-hidden-desktop {
296
+ display: none !important;
297
+ }
298
+ }
299
+
300
+
301
+ @include desktop-only {
302
+ .is-hidden-desktop-only {
303
+ display: none !important;
304
+ }
305
+ }
306
+
307
+
308
+ @include widescreen {
309
+ .is-hidden-widescreen {
310
+ display: none !important;
311
+ }
312
+ }
313
+
314
+
315
+ @include widescreen-only {
316
+ .is-hidden-widescreen-only {
317
+ display: none !important;
318
+ }
319
+ }
320
+
321
+
322
+ @include fullhd {
323
+ .is-hidden-fullhd {
324
+ display: none !important;
325
+ }
326
+ }
327
+
328
+
329
+ // Other
330
+
331
+ .is-marginless {
332
+ margin: 0 !important;
333
+ }
334
+
335
+ .is-paddingless {
336
+ padding: 0 !important;
337
+ }
338
+
339
+ .is-radiusless {
340
+ border-radius: 0 !important;
341
+ }
342
+
343
+ .is-shadowless {
344
+ box-shadow: none !important;
345
+ }
346
+
347
+ .is-unselectable {
348
+ @include unselectable;
349
+ }
@@ -0,0 +1,92 @@
1
+ /*! minireset.css v0.0.2 | MIT License | github.com/jgthms/minireset.css */
2
+ // Blocks
3
+ html,
4
+ body,
5
+ p,
6
+ ol,
7
+ ul,
8
+ li,
9
+ dl,
10
+ dt,
11
+ dd,
12
+ blockquote,
13
+ figure,
14
+ fieldset,
15
+ legend,
16
+ textarea,
17
+ pre,
18
+ iframe,
19
+ hr,
20
+ h1,
21
+ h2,
22
+ h3,
23
+ h4,
24
+ h5,
25
+ h6 {
26
+ margin: 0;
27
+ padding: 0;
28
+ }
29
+
30
+ // Headings
31
+ h1,
32
+ h2,
33
+ h3,
34
+ h4,
35
+ h5,
36
+ h6 {
37
+ font-size: 100%;
38
+ font-weight: normal;
39
+ }
40
+
41
+ // List
42
+ ul {
43
+ list-style: none;
44
+ }
45
+
46
+ // Form
47
+ button,
48
+ input,
49
+ select,
50
+ textarea {
51
+ margin: 0;
52
+ }
53
+
54
+ // Box sizing
55
+ html {
56
+ box-sizing: border-box;
57
+ }
58
+
59
+ * {
60
+ box-sizing: inherit;
61
+
62
+ &:before,
63
+ &:after {
64
+ box-sizing: inherit;
65
+ }
66
+ }
67
+
68
+ // Media
69
+ img,
70
+ embed,
71
+ object,
72
+ audio,
73
+ video {
74
+ max-width: 100%;
75
+ }
76
+
77
+ // Iframe
78
+ iframe {
79
+ border: 0;
80
+ }
81
+
82
+ // Table
83
+ table {
84
+ border-collapse: collapse;
85
+ border-spacing: 0;
86
+ }
87
+
88
+ td,
89
+ th {
90
+ padding: 0;
91
+ text-align: left;
92
+ }
@@ -0,0 +1,15 @@
1
+ @charset "utf-8";
2
+
3
+ @import "breadcrumb";
4
+ @import "card";
5
+ @import "dropdown";
6
+ @import "level";
7
+ @import "media";
8
+ @import "menu";
9
+ @import "message";
10
+ @import "modal";
11
+ @import "nav";
12
+ @import "navbar";
13
+ @import "pagination";
14
+ @import "panel";
15
+ @import "tabs";
@@ -0,0 +1,116 @@
1
+ $breadcrumb-item-color: $text-light !default;
2
+ $breadcrumb-item-hover-color: $link-hover !default;
3
+ $breadcrumb-item-active-color: $text-strong !default;
4
+
5
+ $breadcrumb-item-separator-color: $text !default;
6
+
7
+ .breadcrumb {
8
+ @include block;
9
+ @include unselectable;
10
+
11
+ align-items: stretch;
12
+ display: flex;
13
+ font-size: $size-normal;
14
+ overflow: hidden;
15
+ overflow-x: auto;
16
+ white-space: nowrap;
17
+
18
+ a {
19
+ align-items: center;
20
+ color: $breadcrumb-item-color;
21
+ display: flex;
22
+ justify-content: center;
23
+ padding: 0.5em 0.75em;
24
+
25
+ &:hover {
26
+ color: $breadcrumb-item-hover-color;
27
+ }
28
+ }
29
+
30
+ li {
31
+ align-items: center;
32
+ display: flex;
33
+
34
+ &.is-active {
35
+ a {
36
+ color: $breadcrumb-item-active-color;
37
+ cursor: default;
38
+ pointer-events: none;
39
+ }
40
+ }
41
+
42
+ & + li::before {
43
+ color: $breadcrumb-item-separator-color;
44
+ content: "/";
45
+ }
46
+ }
47
+
48
+ ul, ol {
49
+ align-items: center;
50
+ display: flex;
51
+ flex-grow: 1;
52
+ flex-shrink: 0;
53
+ justify-content: flex-start;
54
+ }
55
+
56
+ .icon {
57
+ &:first-child {
58
+ margin-right: 0.5em;
59
+ }
60
+
61
+ &:last-child {
62
+ margin-left: 0.5em;
63
+ }
64
+ }
65
+
66
+ // Alignment
67
+ &.is-centered {
68
+ ol, ul {
69
+ justify-content: center;
70
+ }
71
+ }
72
+
73
+ &.is-right {
74
+ ol, ul {
75
+ justify-content: flex-end;
76
+ }
77
+ }
78
+
79
+ // Sizes
80
+ &.is-small {
81
+ font-size: $size-small;
82
+ }
83
+
84
+ &.is-medium {
85
+ font-size: $size-medium;
86
+ }
87
+
88
+ &.is-large {
89
+ font-size: $size-large;
90
+ }
91
+
92
+ // Styles
93
+ &.has-arrow-separator {
94
+ li + li::before {
95
+ content: "→";
96
+ }
97
+ }
98
+
99
+ &.has-bullet-separator {
100
+ li + li::before {
101
+ content: "•";
102
+ }
103
+ }
104
+
105
+ &.has-dot-separator {
106
+ li + li::before {
107
+ content: "·";
108
+ }
109
+ }
110
+
111
+ &.has-succeeds-separator {
112
+ li + li::before {
113
+ content: "≻";
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,77 @@
1
+ $card-color: $text !default;
2
+ $card-background-color: $white !default;
3
+ $card-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default;
4
+
5
+ $card-header-color: $text-strong !default;
6
+ $card-header-shadow: 0 1px 2px rgba($black, 0.1) !default;
7
+ $card-header-weight: $weight-bold !default;
8
+
9
+ $card-footer-border-top: 1px solid $border !default;
10
+
11
+ .card {
12
+ background-color: $card-background-color;
13
+ box-shadow: $card-shadow;
14
+ color: $card-color;
15
+ max-width: 100%;
16
+ position: relative;
17
+ }
18
+
19
+ .card-header {
20
+ align-items: stretch;
21
+ box-shadow: $card-header-shadow;
22
+ display: flex;
23
+ }
24
+
25
+ .card-header-title {
26
+ align-items: center;
27
+ color: $card-header-color;
28
+ display: flex;
29
+ flex-grow: 1;
30
+ font-weight: $card-header-weight;
31
+ padding: 0.75rem;
32
+ }
33
+
34
+ .card-header-icon {
35
+ align-items: center;
36
+ cursor: pointer;
37
+ display: flex;
38
+ justify-content: center;
39
+ padding: 0.75rem;
40
+ }
41
+
42
+ .card-image {
43
+ display: block;
44
+ position: relative;
45
+ }
46
+
47
+ .card-content {
48
+ padding: 1.5rem;
49
+ }
50
+
51
+ .card-footer {
52
+ border-top: $card-footer-border-top;
53
+ align-items: stretch;
54
+ display: flex;
55
+ }
56
+
57
+ .card-footer-item {
58
+ align-items: center;
59
+ display: flex;
60
+ flex-basis: 0;
61
+ flex-grow: 1;
62
+ flex-shrink: 0;
63
+ justify-content: center;
64
+ padding: 0.75rem;
65
+
66
+ &:not(:last-child) {
67
+ border-right: $card-footer-border-top;
68
+ }
69
+ }
70
+
71
+ // Combinations
72
+
73
+ .card {
74
+ .media:not(:last-child) {
75
+ margin-bottom: 0.75rem;
76
+ }
77
+ }
@@ -0,0 +1,84 @@
1
+ $dropdown-content-background-color: $white !default;
2
+ $dropdown-content-arrow: $link !default;
3
+ $dropdown-content-offset: 4px !default;
4
+ $dropdown-content-radius: $radius !default;
5
+ $dropdown-content-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default;
6
+ $dropdown-content-z: 20 !default;
7
+
8
+ $dropdown-item-color: $grey-dark !default;
9
+ $dropdown-item-hover-color: $black !default;
10
+ $dropdown-item-hover-background-color: $background !default;
11
+ $dropdown-item-active-color: $primary-invert !default;
12
+ $dropdown-item-active-background-color: $primary !default;
13
+
14
+ $dropdown-divider-background-color: $border !default;
15
+
16
+ .dropdown {
17
+ display: inline-flex;
18
+ position: relative;
19
+ vertical-align: top;
20
+
21
+ &.is-active,
22
+ &.is-hoverable:hover {
23
+ .dropdown-menu {
24
+ display: block;
25
+ }
26
+ }
27
+
28
+ &.is-right {
29
+ .dropdown-menu {
30
+ left: auto;
31
+ right: 0;
32
+ }
33
+ }
34
+ }
35
+
36
+ .dropdown-menu {
37
+ display: none;
38
+ left: 0;
39
+ min-width: 12rem;
40
+ padding-top: $dropdown-content-offset;
41
+ position: absolute;
42
+ top: 100%;
43
+ z-index: $dropdown-content-z;
44
+ }
45
+
46
+ .dropdown-content {
47
+ background-color: $dropdown-content-background-color;
48
+ border-radius: $dropdown-content-radius;
49
+ box-shadow: $dropdown-content-shadow;
50
+ padding-bottom: 0.5rem;
51
+ padding-top: 0.5rem;
52
+ }
53
+
54
+ .dropdown-item {
55
+ color: $dropdown-item-color;
56
+ display: block;
57
+ font-size: 0.875rem;
58
+ line-height: 1.5;
59
+ padding: 0.375rem 1rem;
60
+ position: relative;
61
+ }
62
+
63
+ a.dropdown-item {
64
+ padding-right: 3rem;
65
+ white-space: nowrap;
66
+
67
+ &:hover {
68
+ background-color: $dropdown-item-hover-background-color;
69
+ color: $dropdown-item-hover-color;
70
+ }
71
+
72
+ &.is-active {
73
+ background-color: $dropdown-item-active-background-color;
74
+ color: $dropdown-item-active-color;
75
+ }
76
+ }
77
+
78
+ .dropdown-divider {
79
+ background-color: $dropdown-divider-background-color;
80
+ border: none;
81
+ display: block;
82
+ height: 1px;
83
+ margin: 0.5rem 0;
84
+ }