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,257 @@
1
+ // Main container
2
+
3
+ .hero {
4
+ align-items: stretch;
5
+ display: flex;
6
+ flex-direction: column;
7
+ justify-content: space-between;
8
+
9
+ .nav {
10
+ background: none;
11
+ box-shadow: 0 1px 0 rgba($border, 0.3);
12
+ }
13
+
14
+ .tabs {
15
+ ul {
16
+ border-bottom: none;
17
+ }
18
+ }
19
+
20
+ // Colors
21
+ @each $name, $pair in $colors {
22
+ $color: nth($pair, 1);
23
+ $color-invert: nth($pair, 2);
24
+
25
+ &.is-#{$name} {
26
+ background-color: $color;
27
+ color: $color-invert;
28
+
29
+ a:not(.button),
30
+ strong {
31
+ color: inherit;
32
+ }
33
+
34
+ .title {
35
+ color: $color-invert;
36
+ }
37
+
38
+ .subtitle {
39
+ color: rgba($color-invert, 0.9);
40
+
41
+ a:not(.button),
42
+ strong {
43
+ color: $color-invert;
44
+ }
45
+ }
46
+
47
+ .nav {
48
+ box-shadow: 0 1px 0 rgba($color-invert, 0.2);
49
+ }
50
+
51
+ .nav-menu {
52
+ @include mobile {
53
+ background-color: $color;
54
+ }
55
+ }
56
+
57
+ a.nav-item,
58
+ .nav-item a:not(.button) {
59
+ color: rgba($color-invert, 0.7);
60
+
61
+ &:hover,
62
+ &.is-active {
63
+ color: $color-invert;
64
+ }
65
+ }
66
+
67
+ .tabs {
68
+ a {
69
+ color: $color-invert;
70
+ opacity: 0.9;
71
+
72
+ &:hover {
73
+ opacity: 1;
74
+ }
75
+ }
76
+
77
+ li {
78
+ &.is-active a {
79
+ opacity: 1;
80
+ }
81
+ }
82
+
83
+ &.is-boxed,
84
+ &.is-toggle {
85
+ a {
86
+ color: $color-invert;
87
+
88
+ &:hover {
89
+ background-color: rgba($black, 0.1);
90
+ }
91
+ }
92
+
93
+ li.is-active a {
94
+ &,
95
+ &:hover {
96
+ background-color: $color-invert;
97
+ border-color: $color-invert;
98
+ color: $color;
99
+ }
100
+ }
101
+ }
102
+ }
103
+
104
+ // Modifiers
105
+ &.is-bold {
106
+ $gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%);
107
+ $gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%);
108
+
109
+ background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%);
110
+
111
+ @include mobile {
112
+ .nav-menu {
113
+ background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%);
114
+ }
115
+ }
116
+ }
117
+
118
+ // Responsiveness
119
+ @include mobile {
120
+ .nav-toggle {
121
+ span {
122
+ background-color: $color-invert;
123
+ }
124
+
125
+ &:hover {
126
+ background-color: rgba($black, 0.1);
127
+ }
128
+
129
+ &.is-active {
130
+ span {
131
+ background-color: $color-invert;
132
+ }
133
+ }
134
+ }
135
+
136
+ .nav-menu {
137
+ .nav-item {
138
+ border-top-color: rgba($color-invert, 0.2);
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ // Sizes
146
+ &.is-small {
147
+ .hero-body {
148
+ padding-bottom: 1.5rem;
149
+ padding-top: 1.5rem;
150
+ }
151
+ }
152
+
153
+ &.is-medium {
154
+ @include tablet {
155
+ .hero-body {
156
+ padding-bottom: 9rem;
157
+ padding-top: 9rem;
158
+ }
159
+ }
160
+ }
161
+
162
+ &.is-large {
163
+ @include tablet {
164
+ .hero-body {
165
+ padding-bottom: 18rem;
166
+ padding-top: 18rem;
167
+ }
168
+ }
169
+ }
170
+
171
+ &.is-halfheight,
172
+ &.is-fullheight {
173
+ .hero-body {
174
+ align-items: center;
175
+ display: flex;
176
+
177
+ & > .container {
178
+ flex-grow: 1;
179
+ flex-shrink: 1;
180
+ }
181
+ }
182
+ }
183
+
184
+ &.is-halfheight {
185
+ min-height: 50vh;
186
+ }
187
+
188
+ &.is-fullheight {
189
+ min-height: 100vh;
190
+ }
191
+ }
192
+
193
+ // Components
194
+
195
+ .hero-video {
196
+ @include overlay;
197
+
198
+ overflow: hidden;
199
+
200
+ video {
201
+ left: 50%;
202
+ min-height: 100%;
203
+ min-width: 100%;
204
+ position: absolute;
205
+ top: 50%;
206
+ transform: translate3d(-50%, -50%, 0);
207
+ }
208
+
209
+ // Modifiers
210
+ &.is-transparent {
211
+ opacity: 0.3;
212
+ }
213
+
214
+ // Responsiveness
215
+ @include mobile {
216
+ display: none;
217
+ }
218
+ }
219
+
220
+ .hero-buttons {
221
+ margin-top: 1.5rem;
222
+
223
+ // Responsiveness
224
+ @include mobile {
225
+ .button {
226
+ display: flex;
227
+
228
+ &:not(:last-child) {
229
+ margin-bottom: 0.75rem;
230
+ }
231
+ }
232
+ }
233
+
234
+
235
+ @include tablet {
236
+ display: flex;
237
+ justify-content: center;
238
+
239
+ .button:not(:last-child) {
240
+ margin-right: 1.5rem;
241
+ }
242
+ }
243
+ }
244
+
245
+ // Containers
246
+
247
+ .hero-head,
248
+ .hero-foot {
249
+ flex-grow: 0;
250
+ flex-shrink: 0;
251
+ }
252
+
253
+ .hero-body {
254
+ flex-grow: 1;
255
+ flex-shrink: 0;
256
+ padding: 3rem 1.5rem;
257
+ }
@@ -0,0 +1,19 @@
1
+ $section-padding: 3rem 1.5rem !default;
2
+ $section-padding-medium: 9rem 1.5rem !default;
3
+ $section-padding-large: 18rem 1.5rem !default;
4
+
5
+ .section {
6
+ padding: $section-padding;
7
+
8
+ // Responsiveness
9
+ @include desktop {
10
+ // Sizes
11
+ &.is-medium {
12
+ padding: $section-padding-medium;
13
+ }
14
+
15
+ &.is-large {
16
+ padding: $section-padding-large;
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,6 @@
1
+ @import "initial-variables";
2
+ @import "functions";
3
+ @import "derived-variables";
4
+ @import "animations";
5
+ @import "mixins";
6
+ @import "controls";
@@ -0,0 +1,9 @@
1
+ @keyframes spinAround {
2
+ from {
3
+ transform: rotate(0deg);
4
+ }
5
+
6
+ to {
7
+ transform: rotate(359deg);
8
+ }
9
+ }
@@ -0,0 +1,51 @@
1
+ $control-radius: $radius !default;
2
+ $control-radius-small: $radius-small !default;
3
+
4
+ $control-padding-vertical: calc(0.375em - 1px) !default;
5
+ $control-padding-horizontal: calc(0.625em - 1px) !default;
6
+
7
+ @mixin control {
8
+ -moz-appearance: none;
9
+ -webkit-appearance: none;
10
+ align-items: center;
11
+ border: 1px solid transparent;
12
+ border-radius: $control-radius;
13
+ box-shadow: none;
14
+ display: inline-flex;
15
+ font-size: $size-normal;
16
+ height: 2.25em;
17
+ justify-content: flex-start;
18
+ line-height: 1.5;
19
+ padding-bottom: $control-padding-vertical;
20
+ padding-left: $control-padding-horizontal;
21
+ padding-right: $control-padding-horizontal;
22
+ padding-top: $control-padding-vertical;
23
+ position: relative;
24
+ vertical-align: top;
25
+
26
+ // States
27
+ &:focus,
28
+ &.is-focused,
29
+ &:active,
30
+ &.is-active {
31
+ outline: none;
32
+ }
33
+
34
+ &[disabled] {
35
+ cursor: not-allowed;
36
+ }
37
+ }
38
+
39
+ // The controls sizes use mixins so they can be used at different breakpoints
40
+ @mixin control-small {
41
+ border-radius: $control-radius-small;
42
+ font-size: $size-small;
43
+ }
44
+
45
+ @mixin control-medium {
46
+ font-size: $size-medium;
47
+ }
48
+
49
+ @mixin control-large {
50
+ font-size: $size-large;
51
+ }
@@ -0,0 +1,81 @@
1
+ $primary: $turquoise !default;
2
+
3
+ $info: $blue !default;
4
+ $success: $green !default;
5
+ $warning: $yellow !default;
6
+ $danger: $red !default;
7
+
8
+ $light: $white-ter !default;
9
+ $dark: $grey-darker !default;
10
+
11
+ // Invert colors
12
+
13
+ $orange-invert: findColorInvert($orange) !default;
14
+ $yellow-invert: findColorInvert($yellow) !default;
15
+ $green-invert: findColorInvert($green) !default;
16
+ $turquoise-invert: findColorInvert($turquoise) !default;
17
+ $blue-invert: findColorInvert($blue) !default;
18
+ $purple-invert: findColorInvert($purple) !default;
19
+ $red-invert: findColorInvert($red) !default;
20
+
21
+ $primary-invert: $turquoise-invert !default;
22
+ $info-invert: $blue-invert !default;
23
+ $success-invert: $green-invert !default;
24
+ $warning-invert: $yellow-invert !default;
25
+ $danger-invert: $red-invert !default;
26
+ $light-invert: $dark !default;
27
+ $dark-invert: $light !default;
28
+
29
+ // General colors
30
+
31
+ $background: $white-ter !default;
32
+
33
+ $border: $grey-lighter !default;
34
+ $border-hover: $grey-light !default;
35
+
36
+ // Text colors
37
+
38
+ $text: $grey-dark !default;
39
+ $text-invert: findColorInvert($text) !default;
40
+ $text-light: $grey !default;
41
+ $text-strong: $grey-darker !default;
42
+
43
+ // Code colors
44
+
45
+ $code: $red !default;
46
+ $code-background: $background !default;
47
+
48
+ $pre: $text !default;
49
+ $pre-background: $background !default;
50
+
51
+ // Link colors
52
+
53
+ $link: $primary !default;
54
+ $link-invert: $primary-invert !default;
55
+ $link-visited: $purple !default;
56
+
57
+ $link-hover: $grey-darker !default;
58
+ $link-hover-border: $grey-light !default;
59
+
60
+ $link-focus: $grey-darker !default;
61
+ $link-focus-border: $primary !default;
62
+
63
+ $link-active: $grey-darker !default;
64
+ $link-active-border: $grey-dark !default;
65
+
66
+ // Typography
67
+
68
+ $family-primary: $family-sans-serif !default;
69
+ $family-code: $family-monospace !default;
70
+
71
+ $size-small: $size-7 !default;
72
+ $size-normal: $size-6 !default;
73
+ $size-medium: $size-5 !default;
74
+ $size-large: $size-4 !default;
75
+
76
+ // Lists and maps
77
+
78
+ $colors: ("white": ($white, $black), "black": ($black, $white), "light": ($light, $light-invert), "dark": ($dark, $dark-invert), "primary": ($primary, $primary-invert), "info": ($info, $info-invert), "success": ($success, $success-invert), "warning": ($warning, $warning-invert), "danger": ($danger, $danger-invert)) !default;
79
+ $shades: ("black-bis": $black-bis, "black-ter": $black-ter, "grey-darker": $grey-darker, "grey-dark": $grey-dark, "grey": $grey, "grey-light": $grey-light, "grey-lighter": $grey-lighter, "white-ter": $white-ter, "white-bis": $white-bis) !default;
80
+
81
+ $sizes: $size-1 $size-2 $size-3 $size-4 $size-5 $size-6 $size-7 !default;
@@ -0,0 +1,46 @@
1
+ @function powerNumber($number, $exp) {
2
+ $value: 1;
3
+
4
+ @if $exp > 0 {
5
+ @for $i from 1 through $exp {
6
+ $value: $value * $number;
7
+ }
8
+ }
9
+ @else if $exp < 0 {
10
+ @for $i from 1 through -$exp {
11
+ $value: $value / $number;
12
+ }
13
+ }
14
+
15
+ @return $value;
16
+ }
17
+
18
+ @function colorLuminance($color) {
19
+ $color-rgb: ("red": red($color), "green": green($color), "blue": blue($color));
20
+
21
+ @each $name, $value in $color-rgb {
22
+ $adjusted: 0;
23
+ $value: $value / 255;
24
+
25
+ @if $value < 0.03928 {
26
+ $value: $value / 12.92;
27
+ }
28
+ @else {
29
+ $value: ($value + 0.055) / 1.055;
30
+ $value: powerNumber($value, 2);
31
+ }
32
+
33
+ $color-rgb: map-merge($color-rgb, ($name: $value));
34
+ }
35
+
36
+ @return map-get($color-rgb, "red") * 0.2126 + map-get($color-rgb, "green") * 0.7152 + map-get($color-rgb, "blue") * 0.0722;
37
+ }
38
+
39
+ @function findColorInvert($color) {
40
+ @if colorLuminance($color) > 0.55 {
41
+ @return rgba(#000, 0.7);
42
+ }
43
+ @else {
44
+ @return #fff;
45
+ }
46
+ }
@@ -0,0 +1,68 @@
1
+ // Colors
2
+
3
+ $black: hsl(0, 0%, 4%) !default;
4
+ $black-bis: hsl(0, 0%, 7%) !default;
5
+ $black-ter: hsl(0, 0%, 14%) !default;
6
+
7
+ $grey-darker: hsl(0, 0%, 21%) !default;
8
+ $grey-dark: hsl(0, 0%, 29%) !default;
9
+ $grey: hsl(0, 0%, 48%) !default;
10
+ $grey-light: hsl(0, 0%, 71%) !default;
11
+ $grey-lighter: hsl(0, 0%, 86%) !default;
12
+
13
+ $white-ter: hsl(0, 0%, 96%) !default;
14
+ $white-bis: hsl(0, 0%, 98%) !default;
15
+ $white: hsl(0, 0%, 100%) !default;
16
+
17
+ $orange: hsl(14, 100%, 53%) !default;
18
+ $yellow: hsl(48, 100%, 67%) !default;
19
+ $green: hsl(141, 71%, 48%) !default;
20
+ $turquoise: hsl(171, 100%, 41%) !default;
21
+ $blue: hsl(217, 71%, 53%) !default;
22
+ $purple: hsl(271, 100%, 71%) !default;
23
+ $red: hsl(348, 100%, 61%) !default;
24
+
25
+ // Typography
26
+
27
+ $family-sans-serif: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !default;
28
+ $family-monospace: monospace !default;
29
+ $render-mode: optimizeLegibility !default;
30
+
31
+ $size-1: 3rem !default;
32
+ $size-2: 2.5rem !default;
33
+ $size-3: 2rem !default;
34
+ $size-4: 1.5rem !default;
35
+ $size-5: 1.25rem !default;
36
+ $size-6: 1rem !default;
37
+ $size-7: 0.75rem !default;
38
+
39
+ $weight-light: 300 !default;
40
+ $weight-normal: 400 !default;
41
+ $weight-medium: 500 !default;
42
+ $weight-semibold: 600 !default;
43
+ $weight-bold: 700 !default;
44
+
45
+ // Responsiveness
46
+
47
+ // The container horizontal gap, which acts as the offset for breakpoints
48
+ $gap: 32px !default;
49
+
50
+ // 960, 1152, and 1344 have been chosen because they are divisible by both 12 and 16
51
+ $tablet: 769px !default;
52
+
53
+ // 960px container + 3rem
54
+ $desktop: 960px + 2 * $gap !default;
55
+
56
+ // 1152px container + 3rem
57
+ $widescreen: 1152px + 2 * $gap !default;
58
+
59
+ // 1344px container + 3rem
60
+ $fullhd: 1344px + 2 * $gap !default;
61
+
62
+ // Miscellaneous
63
+
64
+ $easing: ease-out !default;
65
+ $radius-small: 2px !default;
66
+ $radius: 3px !default;
67
+ $radius-large: 5px !default;
68
+ $speed: 86ms !default;