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,28 @@
1
+ $icon-dimensions: 1.5rem !default;
2
+ $icon-dimensions-small: 1rem !default;
3
+ $icon-dimensions-medium: 2rem !default;
4
+ $icon-dimensions-large: 3rem !default;
5
+
6
+ .icon {
7
+ align-items: center;
8
+ display: inline-flex;
9
+ justify-content: center;
10
+ height: $icon-dimensions;
11
+ width: $icon-dimensions;
12
+
13
+ // Sizes
14
+ &.is-small {
15
+ height: $icon-dimensions-small;
16
+ width: $icon-dimensions-small;
17
+ }
18
+
19
+ &.is-medium {
20
+ height: $icon-dimensions-medium;
21
+ width: $icon-dimensions-medium;
22
+ }
23
+
24
+ &.is-large {
25
+ height: $icon-dimensions-large;
26
+ width: $icon-dimensions-large;
27
+ }
28
+ }
@@ -0,0 +1,56 @@
1
+ $dimensions: 16 24 32 48 64 96 128 !default;
2
+
3
+ .image {
4
+ display: block;
5
+ position: relative;
6
+
7
+ img {
8
+ display: block;
9
+ height: auto;
10
+ width: 100%;
11
+ }
12
+
13
+ // Ratio
14
+ &.is-square,
15
+ &.is-1by1,
16
+ &.is-4by3,
17
+ &.is-3by2,
18
+ &.is-16by9,
19
+ &.is-2by1 {
20
+ img {
21
+ @include overlay;
22
+
23
+ height: 100%;
24
+ width: 100%;
25
+ }
26
+ }
27
+
28
+ &.is-square,
29
+ &.is-1by1 {
30
+ padding-top: 100%;
31
+ }
32
+
33
+ &.is-4by3 {
34
+ padding-top: 75%;
35
+ }
36
+
37
+ &.is-3by2 {
38
+ padding-top: 66.6666%;
39
+ }
40
+
41
+ &.is-16by9 {
42
+ padding-top: 56.25%;
43
+ }
44
+
45
+ &.is-2by1 {
46
+ padding-top: 50%;
47
+ }
48
+
49
+ // Sizes
50
+ @each $dimension in $dimensions {
51
+ &.is-#{$dimension}x#{$dimension} {
52
+ height: $dimension * 1px;
53
+ width: $dimension * 1px;
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,53 @@
1
+ $notification-background-color: $background !default;
2
+ $notification-radius: $radius !default;
3
+ $notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default;
4
+
5
+ .notification {
6
+ @include block;
7
+
8
+ background-color: $notification-background-color;
9
+ border-radius: $notification-radius;
10
+ padding: $notification-padding;
11
+ position: relative;
12
+
13
+ a:not(.button) {
14
+ color: currentColor;
15
+ text-decoration: underline;
16
+ }
17
+
18
+ strong {
19
+ color: currentColor;
20
+ }
21
+
22
+ code,
23
+ pre {
24
+ background: $white;
25
+ }
26
+
27
+ pre code {
28
+ background: transparent;
29
+ }
30
+
31
+ & > .delete {
32
+ position: absolute;
33
+ right: 0.5em;
34
+ top: 0.5em;
35
+ }
36
+
37
+ .title,
38
+ .subtitle,
39
+ .content {
40
+ color: currentColor;
41
+ }
42
+
43
+ // Colors
44
+ @each $name, $pair in $colors {
45
+ $color: nth($pair, 1);
46
+ $color-invert: nth($pair, 2);
47
+
48
+ &.is-#{$name} {
49
+ background-color: $color;
50
+ color: $color-invert;
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,48 @@
1
+ .block {
2
+ @include block;
3
+ }
4
+
5
+ .delete {
6
+ @include delete;
7
+ }
8
+
9
+ .heading {
10
+ display: block;
11
+ font-size: 11px;
12
+ letter-spacing: 1px;
13
+ margin-bottom: 5px;
14
+ text-transform: uppercase;
15
+ }
16
+
17
+ .highlight {
18
+ @include block;
19
+
20
+ font-weight: $weight-normal;
21
+ max-width: 100%;
22
+ overflow: hidden;
23
+ padding: 0;
24
+
25
+ pre {
26
+ overflow: auto;
27
+ max-width: 100%;
28
+ }
29
+ }
30
+
31
+ .loader {
32
+ @include loader;
33
+ }
34
+
35
+ .number {
36
+ align-items: center;
37
+ background-color: $background;
38
+ border-radius: 290486px;
39
+ display: inline-flex;
40
+ font-size: $size-medium;
41
+ height: 2em;
42
+ justify-content: center;
43
+ margin-right: 1.5rem;
44
+ min-width: 2.5em;
45
+ padding: 0.25rem 0.5rem;
46
+ text-align: center;
47
+ vertical-align: top;
48
+ }
@@ -0,0 +1,56 @@
1
+ $progress-bar-background-color: $border !default;
2
+ $progress-value-background-color: $text !default;
3
+
4
+ .progress {
5
+ @include block;
6
+
7
+ -moz-appearance: none;
8
+ -webkit-appearance: none;
9
+ border: none;
10
+ border-radius: 290486px;
11
+ display: block;
12
+ height: $size-normal;
13
+ overflow: hidden;
14
+ padding: 0;
15
+ width: 100%;
16
+
17
+ &::-webkit-progress-bar {
18
+ background-color: $progress-bar-background-color;
19
+ }
20
+
21
+ &::-webkit-progress-value {
22
+ background-color: $progress-value-background-color;
23
+ }
24
+
25
+ &::-moz-progress-bar {
26
+ background-color: $progress-value-background-color;
27
+ }
28
+
29
+ // Colors
30
+ @each $name, $pair in $colors {
31
+ $color: nth($pair, 1);
32
+
33
+ &.is-#{$name} {
34
+ &::-webkit-progress-value {
35
+ background-color: $color;
36
+ }
37
+
38
+ &::-moz-progress-bar {
39
+ background-color: $color;
40
+ }
41
+ }
42
+ }
43
+
44
+ // Sizes
45
+ &.is-small {
46
+ height: $size-small;
47
+ }
48
+
49
+ &.is-medium {
50
+ height: $size-medium;
51
+ }
52
+
53
+ &.is-large {
54
+ height: $size-large;
55
+ }
56
+ }
@@ -0,0 +1,148 @@
1
+ $table-color: $grey-darker !default;
2
+ $table-background-color: $white !default;
3
+
4
+ $table-cell-border: 1px solid $grey-lighter !default;
5
+ $table-cell-border-width: 0 0 1px !default;
6
+ $table-cell-padding: 0.5em 0.75em !default;
7
+ $table-cell-heading-color: $text-strong !default;
8
+
9
+ $table-head-cell-border-width: 0 0 2px !default;
10
+ $table-head-cell-color: $text-strong !default;
11
+ $table-foot-cell-border-width: 2px 0 0 !default;
12
+ $table-foot-cell-color: $text-strong !default;
13
+
14
+ $table-row-hover-background-color: $white-bis !default;
15
+
16
+ $table-row-active-background-color: $primary !default;
17
+ $table-row-active-color: $primary-invert !default;
18
+
19
+ $table-striped-row-even-background-color: $white-bis !default;
20
+ $table-striped-row-even-hover-background-color: $white-ter !default;
21
+
22
+ .table {
23
+ background-color: $table-background-color;
24
+ color: $table-color;
25
+ margin-bottom: 1.5rem;
26
+
27
+ td,
28
+ th {
29
+ border: $table-cell-border;
30
+ border-width: $table-cell-border-width;
31
+ padding: $table-cell-padding;
32
+ vertical-align: top;
33
+
34
+ // Colors
35
+ @each $name, $pair in $colors {
36
+ $color: nth($pair, 1);
37
+ $color-invert: nth($pair, 2);
38
+
39
+ &.is-#{$name} {
40
+ background-color: $color;
41
+ border-color: $color;
42
+ color: $color-invert;
43
+ }
44
+ }
45
+
46
+ // Modifiers
47
+ &.is-narrow {
48
+ white-space: nowrap;
49
+ width: 1%;
50
+ }
51
+ }
52
+
53
+ th {
54
+ color: $table-cell-heading-color;
55
+ text-align: left;
56
+ }
57
+
58
+ tr {
59
+ &:hover {
60
+ background-color: $table-row-hover-background-color;
61
+ }
62
+
63
+ &.is-selected {
64
+ background-color: $table-row-active-background-color;
65
+ color: $table-row-active-color;
66
+
67
+ a,
68
+ strong {
69
+ color: currentColor;
70
+ }
71
+
72
+ td,
73
+ th {
74
+ border-color: $table-row-active-color;
75
+ color: currentColor;
76
+ }
77
+ }
78
+ }
79
+
80
+ thead {
81
+ td,
82
+ th {
83
+ border-width: $table-head-cell-border-width;
84
+ color: $table-head-cell-color;
85
+ }
86
+ }
87
+
88
+ tfoot {
89
+ td,
90
+ th {
91
+ border-width: $table-foot-cell-border-width;
92
+ color: $table-foot-cell-color;
93
+ }
94
+ }
95
+
96
+ tbody {
97
+ tr {
98
+ &:last-child {
99
+ td,
100
+ th {
101
+ border-bottom-width: 0;
102
+ }
103
+ }
104
+ }
105
+ }
106
+
107
+ // Modifiers
108
+ &.is-bordered {
109
+ td,
110
+ th {
111
+ border-width: 1px;
112
+ }
113
+
114
+ tr {
115
+ &:last-child {
116
+ td,
117
+ th {
118
+ border-bottom-width: 1px;
119
+ }
120
+ }
121
+ }
122
+ }
123
+
124
+ &.is-fullwidth {
125
+ width: 100%;
126
+ }
127
+
128
+ &.is-narrow {
129
+ td,
130
+ th {
131
+ padding: 0.25em 0.5em;
132
+ }
133
+ }
134
+
135
+ &.is-striped {
136
+ tbody {
137
+ tr:not(.is-selected) {
138
+ &:nth-child(even) {
139
+ background-color: $table-striped-row-even-background-color;
140
+
141
+ &:hover {
142
+ background-color: $table-striped-row-even-hover-background-color;
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ }
@@ -0,0 +1,132 @@
1
+ $tag-background-color: $background !default;
2
+ $tag-color: $text !default;
3
+ $tag-radius: $radius !default;
4
+ $tag-delete-margin: 1px !default;
5
+
6
+ .tags {
7
+ align-items: center;
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ justify-content: flex-start;
11
+
12
+ .tag {
13
+ margin-bottom: 0.5rem;
14
+
15
+ &:not(:last-child) {
16
+ margin-right: 0.5rem;
17
+ }
18
+ }
19
+
20
+ &:last-child {
21
+ margin-bottom: -0.5rem;
22
+ }
23
+
24
+ &:not(:last-child) {
25
+ margin-bottom: 1rem;
26
+ }
27
+
28
+ &.has-addons {
29
+ .tag {
30
+ margin-right: 0;
31
+
32
+ &:not(:first-child) {
33
+ border-bottom-left-radius: 0;
34
+ border-top-left-radius: 0;
35
+ }
36
+
37
+ &:not(:last-child) {
38
+ border-bottom-right-radius: 0;
39
+ border-top-right-radius: 0;
40
+ }
41
+ }
42
+ }
43
+ }
44
+
45
+ .tag:not(body) {
46
+ align-items: center;
47
+ background-color: $tag-background-color;
48
+ border-radius: $tag-radius;
49
+ color: $tag-color;
50
+ display: inline-flex;
51
+ font-size: $size-small;
52
+ height: 2em;
53
+ justify-content: center;
54
+ line-height: 1.5;
55
+ padding-left: 0.75em;
56
+ padding-right: 0.75em;
57
+ white-space: nowrap;
58
+
59
+ .delete {
60
+ margin-left: 0.25em;
61
+ margin-right: -0.375em;
62
+ }
63
+
64
+ // Colors
65
+ @each $name, $pair in $colors {
66
+ $color: nth($pair, 1);
67
+ $color-invert: nth($pair, 2);
68
+
69
+ &.is-#{$name} {
70
+ background-color: $color;
71
+ color: $color-invert;
72
+ }
73
+ }
74
+
75
+ // Sizes
76
+ &.is-medium {
77
+ font-size: $size-normal;
78
+ }
79
+
80
+ &.is-large {
81
+ font-size: $size-medium;
82
+ }
83
+
84
+ // Modifiers
85
+ &.is-delete {
86
+ margin-left: $tag-delete-margin;
87
+ padding: 0;
88
+ position: relative;
89
+ width: 2em;
90
+
91
+ &:before,
92
+ &:after {
93
+ background-color: currentColor;
94
+ content: "";
95
+ display: block;
96
+ left: 50%;
97
+ position: absolute;
98
+ top: 50%;
99
+ transform: translateX(-50%) translateY(-50%) rotate(45deg);
100
+ transform-origin: center center;
101
+ }
102
+
103
+ &:before {
104
+ height: 1px;
105
+ width: 50%;
106
+ }
107
+
108
+ &:after {
109
+ height: 50%;
110
+ width: 1px;
111
+ }
112
+
113
+ &:hover,
114
+ &:focus {
115
+ background-color: darken($tag-background-color, 5%);
116
+ }
117
+
118
+ &:active {
119
+ background-color: darken($tag-background-color, 10%);
120
+ }
121
+ }
122
+
123
+ &.is-rounded {
124
+ border-radius: 290486px;
125
+ }
126
+ }
127
+
128
+ a.tag {
129
+ &:hover {
130
+ text-decoration: underline;
131
+ }
132
+ }
@@ -0,0 +1,81 @@
1
+ $title-color: $grey-darker !default;
2
+ $title-size: $size-3 !default;
3
+ $title-weight: $weight-semibold !default;
4
+ $title-strong-color: inherit !default;
5
+ $title-strong-weight: inherit !default;
6
+
7
+ $subtitle-color: $grey-dark !default;
8
+ $subtitle-size: $size-5 !default;
9
+ $subtitle-weight: $weight-normal !default;
10
+ $subtitle-strong-color: $grey-darker !default;
11
+ $subtitle-strong-weight: $weight-semibold !default;
12
+
13
+ .title,
14
+ .subtitle {
15
+ @include block;
16
+
17
+ word-break: break-word;
18
+
19
+ em,
20
+ span {
21
+ font-weight: inherit;
22
+ }
23
+
24
+ .tag {
25
+ vertical-align: middle;
26
+ }
27
+ }
28
+
29
+ .title {
30
+ color: $title-color;
31
+ font-size: $title-size;
32
+ font-weight: $title-weight;
33
+ line-height: 1.125;
34
+
35
+ strong {
36
+ color: $title-strong-color;
37
+ font-weight: $title-strong-weight;
38
+ }
39
+
40
+ & + .highlight {
41
+ margin-top: -0.75rem;
42
+ }
43
+
44
+ &:not(.is-spaced) + .subtitle {
45
+ margin-top: -1.5rem;
46
+ }
47
+
48
+ // Sizes
49
+ @each $size in $sizes {
50
+ $i: index($sizes, $size);
51
+
52
+ &.is-#{$i} {
53
+ font-size: $size;
54
+ }
55
+ }
56
+ }
57
+
58
+ .subtitle {
59
+ color: $subtitle-color;
60
+ font-size: $subtitle-size;
61
+ font-weight: $subtitle-weight;
62
+ line-height: 1.25;
63
+
64
+ strong {
65
+ color: $subtitle-strong-color;
66
+ font-weight: $subtitle-strong-weight;
67
+ }
68
+
69
+ &:not(.is-spaced) + .title {
70
+ margin-top: -1.5rem;
71
+ }
72
+
73
+ // Sizes
74
+ @each $size in $sizes {
75
+ $i: index($sizes, $size);
76
+
77
+ &.is-#{$i} {
78
+ font-size: $size;
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,2 @@
1
+ @import "columns";
2
+ @import "tiles";