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,119 @@
1
+ .level {
2
+ @include block;
3
+
4
+ align-items: center;
5
+ justify-content: space-between;
6
+
7
+ code {
8
+ border-radius: $radius;
9
+ }
10
+
11
+ img {
12
+ display: inline-block;
13
+ vertical-align: top;
14
+ }
15
+
16
+ // Modifiers
17
+ &.is-mobile {
18
+ display: flex;
19
+
20
+ .level-left,
21
+ .level-right {
22
+ display: flex;
23
+ }
24
+
25
+ .level-left + .level-right {
26
+ margin-top: 0;
27
+ }
28
+
29
+ .level-item {
30
+ &:not(:last-child) {
31
+ margin-bottom: 0;
32
+ }
33
+
34
+ &:not(.is-narrow) {
35
+ flex-grow: 1;
36
+ }
37
+ }
38
+ }
39
+
40
+ // Responsiveness
41
+ @include tablet {
42
+ display: flex;
43
+
44
+ & > .level-item {
45
+ &:not(.is-narrow) {
46
+ flex-grow: 1;
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ .level-item {
53
+ align-items: center;
54
+ display: flex;
55
+ flex-basis: auto;
56
+ flex-grow: 0;
57
+ flex-shrink: 0;
58
+ justify-content: center;
59
+
60
+ .title,
61
+ .subtitle {
62
+ margin-bottom: 0;
63
+ }
64
+
65
+ // Responsiveness
66
+ @include mobile {
67
+ &:not(:last-child) {
68
+ margin-bottom: 0.75rem;
69
+ }
70
+ }
71
+ }
72
+
73
+ .level-left,
74
+ .level-right {
75
+ flex-basis: auto;
76
+ flex-grow: 0;
77
+ flex-shrink: 0;
78
+
79
+ .level-item {
80
+ // Modifiers
81
+ &.is-flexible {
82
+ flex-grow: 1;
83
+ }
84
+
85
+ // Responsiveness
86
+ @include tablet {
87
+ &:not(:last-child) {
88
+ margin-right: 0.75rem;
89
+ }
90
+ }
91
+ }
92
+ }
93
+
94
+ .level-left {
95
+ align-items: center;
96
+ justify-content: flex-start;
97
+
98
+ // Responsiveness
99
+ @include mobile {
100
+ & + .level-right {
101
+ margin-top: 1.5rem;
102
+ }
103
+ }
104
+
105
+
106
+ @include tablet {
107
+ display: flex;
108
+ }
109
+ }
110
+
111
+ .level-right {
112
+ align-items: center;
113
+ justify-content: flex-end;
114
+
115
+ // Responsiveness
116
+ @include tablet {
117
+ display: flex;
118
+ }
119
+ }
@@ -0,0 +1,64 @@
1
+ .media {
2
+ align-items: flex-start;
3
+ display: flex;
4
+ text-align: left;
5
+
6
+ .content:not(:last-child) {
7
+ margin-bottom: 0.75rem;
8
+ }
9
+
10
+ .media {
11
+ border-top: 1px solid rgba($border, 0.5);
12
+ display: flex;
13
+ padding-top: 0.75rem;
14
+
15
+ .content:not(:last-child),
16
+ .control:not(:last-child) {
17
+ margin-bottom: 0.5rem;
18
+ }
19
+
20
+ .media {
21
+ padding-top: 0.5rem;
22
+
23
+ & + .media {
24
+ margin-top: 0.5rem;
25
+ }
26
+ }
27
+ }
28
+
29
+ & + .media {
30
+ border-top: 1px solid rgba($border, 0.5);
31
+ margin-top: 1rem;
32
+ padding-top: 1rem;
33
+ }
34
+
35
+ // Sizes
36
+ &.is-large {
37
+ & + .media {
38
+ margin-top: 1.5rem;
39
+ padding-top: 1.5rem;
40
+ }
41
+ }
42
+ }
43
+
44
+ .media-left,
45
+ .media-right {
46
+ flex-basis: auto;
47
+ flex-grow: 0;
48
+ flex-shrink: 0;
49
+ }
50
+
51
+ .media-left {
52
+ margin-right: 1rem;
53
+ }
54
+
55
+ .media-right {
56
+ margin-left: 1rem;
57
+ }
58
+
59
+ .media-content {
60
+ flex-basis: auto;
61
+ flex-grow: 1;
62
+ flex-shrink: 1;
63
+ text-align: left;
64
+ }
@@ -0,0 +1,72 @@
1
+ $menu-item-color: $text !default;
2
+ $menu-item-radius: $radius-small !default;
3
+ $menu-item-hover-color: $text-strong !default;
4
+ $menu-item-hover-background-color: $background !default;
5
+ $menu-item-active-color: $link-invert !default;
6
+ $menu-item-active-background-color: $link !default;
7
+
8
+ $menu-list-border-left: 1px solid $border !default;
9
+
10
+ $menu-label-color: $text-light !default;
11
+
12
+ .menu {
13
+ font-size: $size-normal;
14
+
15
+ // Sizes
16
+ &.is-small {
17
+ font-size: $size-small;
18
+ }
19
+
20
+ &.is-medium {
21
+ font-size: $size-medium;
22
+ }
23
+
24
+ &.is-large {
25
+ font-size: $size-large;
26
+ }
27
+ }
28
+
29
+ .menu-list {
30
+ line-height: 1.25;
31
+
32
+ a {
33
+ border-radius: $menu-item-radius;
34
+ color: $menu-item-color;
35
+ display: block;
36
+ padding: 0.5em 0.75em;
37
+
38
+ &:hover {
39
+ background-color: $menu-item-hover-background-color;
40
+ color: $menu-item-hover-color;
41
+ }
42
+
43
+ // Modifiers
44
+ &.is-active {
45
+ background-color: $menu-item-active-background-color;
46
+ color: $menu-item-active-color;
47
+ }
48
+ }
49
+
50
+ li {
51
+ ul {
52
+ border-left: $menu-list-border-left;
53
+ margin: 0.75em;
54
+ padding-left: 0.75em;
55
+ }
56
+ }
57
+ }
58
+
59
+ .menu-label {
60
+ color: $menu-label-color;
61
+ font-size: 0.75em;
62
+ letter-spacing: 0.1em;
63
+ text-transform: uppercase;
64
+
65
+ &:not(:first-child) {
66
+ margin-top: 1em;
67
+ }
68
+
69
+ &:not(:last-child) {
70
+ margin-bottom: 1em;
71
+ }
72
+ }
@@ -0,0 +1,118 @@
1
+ $message-background-color: $background !default;
2
+ $message-radius: $radius !default;
3
+
4
+ $message-header-background-color: $text !default;
5
+ $message-header-color: $text-invert !default;
6
+ $message-header-padding: 0.5em 0.75em !default;
7
+ $message-header-radius: $radius !default;
8
+
9
+ $message-body-border: 1px solid $border !default;
10
+ $message-body-color: $text !default;
11
+ $message-body-padding: 1em 1.25em !default;
12
+ $message-body-radius: $radius !default;
13
+
14
+ $message-body-pre-background-color: $white !default;
15
+ $message-body-pre-code-background-color: transparent !default;
16
+
17
+ .message {
18
+ @include block;
19
+
20
+ background-color: $message-background-color;
21
+ border-radius: $message-radius;
22
+ font-size: $size-normal;
23
+
24
+ // Sizes
25
+ &.is-small {
26
+ font-size: $size-small;
27
+ }
28
+
29
+ &.is-medium {
30
+ font-size: $size-medium;
31
+ }
32
+
33
+ &.is-large {
34
+ font-size: $size-large;
35
+ }
36
+
37
+ // Colors
38
+ @each $name, $pair in $colors {
39
+ $color: nth($pair, 1);
40
+ $color-invert: nth($pair, 2);
41
+ $color-lightning: max(100% - lightness($color) - 2%, 0%);
42
+ $color-luminance: colorLuminance($color);
43
+ $darken-percentage: $color-luminance * 70%;
44
+ $desaturate-percentage: $color-luminance * 30%;
45
+
46
+ &.is-#{$name} {
47
+ background-color: lighten($color, $color-lightning);
48
+
49
+ .message-header {
50
+ background-color: $color;
51
+ color: $color-invert;
52
+ }
53
+
54
+ .message-body {
55
+ border-color: $color;
56
+ color: desaturate(darken($color, $darken-percentage), $desaturate-percentage);
57
+ }
58
+ }
59
+ }
60
+ }
61
+
62
+ .message-header {
63
+ align-items: center;
64
+ background-color: $message-header-background-color;
65
+ border-radius: $message-header-radius $message-header-radius 0 0;
66
+ color: $message-header-color;
67
+ display: flex;
68
+ justify-content: space-between;
69
+ line-height: 1.25;
70
+ padding: $message-header-padding;
71
+ position: relative;
72
+
73
+ a:not(.button),
74
+ strong {
75
+ color: currentColor;
76
+ }
77
+
78
+ a:not(.button) {
79
+ text-decoration: underline;
80
+ }
81
+
82
+ .delete {
83
+ flex-grow: 0;
84
+ flex-shrink: 0;
85
+ margin-left: 0.75em;
86
+ }
87
+
88
+ & + .message-body {
89
+ border-top-left-radius: 0;
90
+ border-top-right-radius: 0;
91
+ border-top: none;
92
+ }
93
+ }
94
+
95
+ .message-body {
96
+ border: $message-body-border;
97
+ border-radius: $message-body-radius;
98
+ color: $message-body-color;
99
+ padding: $message-body-padding;
100
+
101
+ a:not(.button),
102
+ strong {
103
+ color: currentColor;
104
+ }
105
+
106
+ a:not(.button) {
107
+ text-decoration: underline;
108
+ }
109
+
110
+ code,
111
+ pre {
112
+ background-color: $message-body-pre-background-color;
113
+ }
114
+
115
+ pre code {
116
+ background-color: $message-body-pre-code-background-color;
117
+ }
118
+ }
@@ -0,0 +1,132 @@
1
+ $modal-z: 20 !default;
2
+
3
+ $modal-background-background-color: rgba($black, 0.86) !default;
4
+
5
+ $modal-content-width: 640px !default;
6
+ $modal-content-margin-mobile: 20px !default;
7
+ $modal-content-spacing-mobile: 160px !default;
8
+ $modal-content-spacing-tablet: 40px !default;
9
+
10
+ $modal-close-dimensions: 40px !default;
11
+ $modal-close-right: 20px !default;
12
+ $modal-close-top: 20px !default;
13
+
14
+ $modal-card-spacing: 40px !default;
15
+
16
+ $modal-card-head-background-color: $background !default;
17
+ $modal-card-head-border-bottom: 1px solid $border !default;
18
+ $modal-card-head-padding: 20px !default;
19
+ $modal-card-head-radius: $radius-large !default;
20
+
21
+ $modal-card-title-color: $text-strong !default;
22
+ $modal-card-title-line-height: 1 !default;
23
+ $modal-card-title-size: $size-4 !default;
24
+
25
+ $modal-card-foot-radius: $radius-large !default;
26
+ $modal-card-foot-border-top: 1px solid $border !default;
27
+
28
+ $modal-card-body-background-color: $white !default;
29
+ $modal-card-body-padding: 20px !default;
30
+
31
+ .modal {
32
+ @include overlay;
33
+
34
+ align-items: center;
35
+ display: none;
36
+ justify-content: center;
37
+ overflow: hidden;
38
+ position: fixed;
39
+ z-index: $modal-z;
40
+
41
+ // Modifiers
42
+ &.is-active {
43
+ display: flex;
44
+ }
45
+ }
46
+
47
+ .modal-background {
48
+ @include overlay;
49
+
50
+ background-color: $modal-background-background-color;
51
+ }
52
+
53
+ .modal-content,
54
+ .modal-card {
55
+ margin: 0 $modal-content-margin-mobile;
56
+ max-height: calc(100vh - #{$modal-content-spacing-mobile});
57
+ overflow: auto;
58
+ position: relative;
59
+ width: 100%;
60
+
61
+ // Responsiveness
62
+ @include tablet {
63
+ margin: 0 auto;
64
+ max-height: calc(100vh - #{$modal-content-spacing-tablet});
65
+ width: $modal-content-width;
66
+ }
67
+ }
68
+
69
+ .modal-close {
70
+ @include delete;
71
+
72
+ background: none;
73
+ height: $modal-close-dimensions;
74
+ position: fixed;
75
+ right: $modal-close-right;
76
+ top: $modal-close-top;
77
+ width: $modal-close-dimensions;
78
+ }
79
+
80
+ .modal-card {
81
+ display: flex;
82
+ flex-direction: column;
83
+ max-height: calc(100vh - #{$modal-card-spacing});
84
+ overflow: hidden;
85
+ }
86
+
87
+ .modal-card-head,
88
+ .modal-card-foot {
89
+ align-items: center;
90
+ background-color: $modal-card-head-background-color;
91
+ display: flex;
92
+ flex-shrink: 0;
93
+ justify-content: flex-start;
94
+ padding: $modal-card-head-padding;
95
+ position: relative;
96
+ }
97
+
98
+ .modal-card-head {
99
+ border-bottom: $modal-card-head-border-bottom;
100
+ border-top-left-radius: $modal-card-head-radius;
101
+ border-top-right-radius: $modal-card-head-radius;
102
+ }
103
+
104
+ .modal-card-title {
105
+ color: $modal-card-title-color;
106
+ flex-grow: 1;
107
+ flex-shrink: 0;
108
+ font-size: $modal-card-title-size;
109
+ line-height: $modal-card-title-line-height;
110
+ }
111
+
112
+ .modal-card-foot {
113
+ border-bottom-left-radius: $modal-card-foot-radius;
114
+ border-bottom-right-radius: $modal-card-foot-radius;
115
+ border-top: $modal-card-foot-border-top;
116
+
117
+ .button {
118
+ &:not(:last-child) {
119
+ margin-right: 10px;
120
+ }
121
+ }
122
+ }
123
+
124
+ .modal-card-body {
125
+ @include overflow-touch;
126
+
127
+ background-color: $modal-card-body-background-color;
128
+ flex-grow: 1;
129
+ flex-shrink: 1;
130
+ overflow: auto;
131
+ padding: $modal-card-body-padding;
132
+ }
@@ -0,0 +1,173 @@
1
+ $nav-height: 3.25rem !default;
2
+
3
+ // Components
4
+
5
+ .nav-toggle {
6
+ @include hamburger($nav-height);
7
+
8
+ // Responsiveness
9
+ @include tablet {
10
+ display: none;
11
+ }
12
+ }
13
+
14
+ .nav-item {
15
+ align-items: center;
16
+ display: flex;
17
+ flex-grow: 0;
18
+ flex-shrink: 0;
19
+ font-size: $size-normal;
20
+ justify-content: center;
21
+ line-height: 1.5;
22
+ padding: 0.5rem 0.75rem;
23
+
24
+ a {
25
+ flex-grow: 1;
26
+ flex-shrink: 0;
27
+ }
28
+
29
+ img {
30
+ max-height: 1.75rem;
31
+ }
32
+
33
+ .tag {
34
+ &:first-child:not(:last-child) {
35
+ margin-right: 0.5rem;
36
+ }
37
+
38
+ &:last-child:not(:first-child) {
39
+ margin-left: 0.5rem;
40
+ }
41
+ }
42
+
43
+ // Responsiveness
44
+ @include mobile {
45
+ justify-content: flex-start;
46
+ }
47
+ }
48
+
49
+ .nav-item a:not(.button),
50
+ a.nav-item:not(.button) {
51
+ color: $text-light;
52
+
53
+ &:hover {
54
+ color: $link-hover;
55
+ }
56
+
57
+ // Modifiers
58
+ &.is-active {
59
+ color: $link-active;
60
+ }
61
+
62
+ &.is-tab {
63
+ border-bottom: 1px solid transparent;
64
+ border-top: 1px solid transparent;
65
+ padding-bottom: calc(0.75rem - 1px);
66
+ padding-left: 1rem;
67
+ padding-right: 1rem;
68
+ padding-top: calc(0.75rem - 1px);
69
+
70
+ &:hover {
71
+ border-bottom-color: $primary;
72
+ border-top-color: transparent;
73
+ }
74
+
75
+ &.is-active {
76
+ border-bottom: 3px solid $primary;
77
+ color: $primary;
78
+ padding-bottom: calc(0.75rem - 3px);
79
+ }
80
+ }
81
+
82
+ // Responsiveness
83
+ @include desktop {
84
+ &.is-brand {
85
+ padding-left: 0;
86
+ }
87
+ }
88
+ }
89
+
90
+ // Containers
91
+
92
+ .nav-left,
93
+ .nav-right {
94
+ @include overflow-touch;
95
+
96
+ align-items: stretch;
97
+ display: flex;
98
+ flex-grow: 1;
99
+ flex-shrink: 0;
100
+ max-width: 100%;
101
+ overflow: auto;
102
+
103
+ @include widescreen {
104
+ flex-basis: 0;
105
+ }
106
+ }
107
+
108
+ .nav-left {
109
+ justify-content: flex-start;
110
+ white-space: nowrap;
111
+ }
112
+
113
+ .nav-right {
114
+ justify-content: flex-end;
115
+ }
116
+
117
+ .nav-center {
118
+ align-items: stretch;
119
+ display: flex;
120
+ flex-grow: 0;
121
+ flex-shrink: 0;
122
+ justify-content: center;
123
+ margin-left: auto;
124
+ margin-right: auto;
125
+ }
126
+
127
+ .nav-menu {
128
+ // Responsiveness
129
+ @include mobile {
130
+ &.nav-right {
131
+ background-color: $white;
132
+ box-shadow: 0 4px 7px rgba($black, 0.1);
133
+ left: 0;
134
+ display: none;
135
+ right: 0;
136
+ top: 100%;
137
+ position: absolute;
138
+
139
+ .nav-item {
140
+ border-top: 1px solid rgba($border, 0.5);
141
+ padding: 0.75rem;
142
+ }
143
+
144
+ &.is-active {
145
+ display: block;
146
+ }
147
+ }
148
+ }
149
+ }
150
+
151
+ // Main container
152
+
153
+ .nav {
154
+ align-items: stretch;
155
+ background-color: $white;
156
+ display: flex;
157
+ height: $nav-height;
158
+ position: relative;
159
+ text-align: center;
160
+ z-index: 10;
161
+
162
+ & > .container {
163
+ align-items: stretch;
164
+ display: flex;
165
+ min-height: $nav-height;
166
+ width: 100%;
167
+ }
168
+
169
+ // Modifiers
170
+ &.has-shadow {
171
+ box-shadow: 0 2px 3px rgba($black, 0.1);
172
+ }
173
+ }