bulma-rails 0.1.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/stylesheets/bulma.sass +7 -5
  4. data/app/assets/stylesheets/sass/base/_all.sass +5 -0
  5. data/app/assets/stylesheets/sass/base/generic.sass +7 -2
  6. data/app/assets/stylesheets/sass/base/helpers.sass +4 -1
  7. data/app/assets/stylesheets/sass/base/minireset.sass +81 -0
  8. data/app/assets/stylesheets/sass/components/_all.sass +13 -0
  9. data/app/assets/stylesheets/sass/components/level.sass +1 -1
  10. data/app/assets/stylesheets/sass/components/media.sass +8 -5
  11. data/app/assets/stylesheets/sass/components/message.sass +1 -1
  12. data/app/assets/stylesheets/sass/components/modal.sass +10 -5
  13. data/app/assets/stylesheets/sass/components/nav.sass +9 -2
  14. data/app/assets/stylesheets/sass/components/pagination.sass +2 -0
  15. data/app/assets/stylesheets/sass/components/tabs.sass +4 -2
  16. data/app/assets/stylesheets/sass/elements/_all.sass +13 -0
  17. data/app/assets/stylesheets/sass/elements/box.sass +1 -1
  18. data/app/assets/stylesheets/sass/elements/button.sass +8 -8
  19. data/app/assets/stylesheets/sass/elements/content.sass +2 -1
  20. data/app/assets/stylesheets/sass/elements/form.sass +23 -19
  21. data/app/assets/stylesheets/sass/elements/notification.sass +3 -2
  22. data/app/assets/stylesheets/sass/elements/other.sass +22 -101
  23. data/app/assets/stylesheets/sass/elements/progress.sass +1 -1
  24. data/app/assets/stylesheets/sass/elements/table.sass +18 -12
  25. data/app/assets/stylesheets/sass/elements/title.sass +1 -1
  26. data/app/assets/stylesheets/sass/grid/_all.sass +4 -0
  27. data/app/assets/stylesheets/sass/grid/columns.sass +251 -0
  28. data/app/assets/stylesheets/sass/grid/tiles.sass +32 -0
  29. data/app/assets/stylesheets/sass/layout/_all.sass +5 -0
  30. data/app/assets/stylesheets/sass/layout/hero.sass +6 -4
  31. data/app/assets/stylesheets/sass/utilities/_all.sass +6 -0
  32. data/app/assets/stylesheets/sass/utilities/controls.sass +28 -5
  33. data/app/assets/stylesheets/sass/utilities/functions.sass +2 -8
  34. data/app/assets/stylesheets/sass/utilities/mixins.sass +118 -0
  35. data/app/assets/stylesheets/sass/utilities/variables.sass +40 -62
  36. data/bulma-rails.gemspec +1 -1
  37. metadata +11 -2
@@ -1,5 +1,6 @@
1
1
  .content
2
- @extend .block
2
+ +block
3
+ color: $text
3
4
  // Inline
4
5
  a:not(.button)
5
6
  border-bottom: 1px solid $border
@@ -5,7 +5,8 @@
5
5
  &.is-#{$name}
6
6
  border-color: $color
7
7
 
8
- .input
8
+ .input,
9
+ .textarea
9
10
  +form-control
10
11
  box-shadow: inset 0 1px 2px rgba($black, 0.1)
11
12
  max-width: 100%
@@ -28,7 +29,6 @@
28
29
  width: auto
29
30
 
30
31
  .textarea
31
- @extend .input
32
32
  display: block
33
33
  line-height: 1.2
34
34
  max-height: 600px
@@ -38,7 +38,8 @@
38
38
  padding: 10px
39
39
  resize: vertical
40
40
 
41
- %control-with-element
41
+ .checkbox,
42
+ .radio
42
43
  cursor: pointer
43
44
  display: inline-block
44
45
  line-height: 16px
@@ -49,16 +50,12 @@
49
50
  &:hover
50
51
  color: $control-hover
51
52
  &.is-disabled
52
- color: $text-light
53
+ color: $control-disabled
53
54
  pointer-events: none
54
55
  input
55
56
  pointer-events: none
56
57
 
57
- .checkbox
58
- @extend %control-with-element
59
-
60
58
  .radio
61
- @extend %control-with-element
62
59
  & + .radio
63
60
  margin-left: 10px
64
61
 
@@ -82,13 +79,13 @@
82
79
  select
83
80
  width: 100%
84
81
  &:after
85
- +arrow($link)
82
+ +arrow($control-active)
86
83
  margin-top: -6px
87
84
  right: 16px
88
85
  top: 50%
89
86
  &:hover
90
87
  &:after
91
- border-color: $link-hover
88
+ border-color: $control-hover
92
89
  &.is-small
93
90
  height: 24px
94
91
  select
@@ -106,7 +103,7 @@
106
103
  padding-right: 52px
107
104
 
108
105
  .label
109
- color: $text-strong
106
+ color: $control
110
107
  display: block
111
108
  font-weight: bold
112
109
  &:not(:last-child)
@@ -114,7 +111,7 @@
114
111
 
115
112
  .help
116
113
  display: block
117
- font-size: $size-small
114
+ font-size: $control-size-small
118
115
  margin-top: 5px
119
116
  @each $name, $pair in $colors
120
117
  $color: nth($pair, 1)
@@ -127,7 +124,9 @@
127
124
  +mobile
128
125
  margin-bottom: 5px
129
126
  +tablet
127
+ flex-basis: 0
130
128
  flex-grow: 1
129
+ flex-shrink: 0
131
130
  margin-right: 20px
132
131
  padding-top: 7px
133
132
  text-align: right
@@ -153,15 +152,16 @@
153
152
  &:focus
154
153
  z-index: 3
155
154
  &:first-child
156
- border-radius: $radius 0 0 $radius
155
+ border-radius: $control-radius 0 0 $control-radius
157
156
  select
158
- border-radius: $radius 0 0 $radius
157
+ border-radius: $control-radius 0 0 $control-radius
159
158
  &:last-child
160
- border-radius: 0 $radius $radius 0
159
+ border-radius: 0 $control-radius $control-radius 0
161
160
  select
162
- border-radius: 0 $radius $radius 0
161
+ border-radius: 0 $control-radius $control-radius 0
163
162
  &.is-expanded
164
163
  flex-grow: 1
164
+ flex-shrink: 0
165
165
  &.has-addons-centered
166
166
  justify-content: center
167
167
  &.has-addons-right
@@ -171,17 +171,18 @@
171
171
  .input,
172
172
  .select
173
173
  flex-grow: 1
174
+ flex-shrink: 0
174
175
  &.has-icon
175
176
  & > .fa
176
177
  +fa(14px, 24px)
177
- color: $text-light
178
+ color: $control-icon
178
179
  pointer-events: none
179
180
  position: absolute
180
181
  top: 4px
181
182
  z-index: 4
182
183
  .input
183
184
  &:focus + .fa
184
- color: $text-strong
185
+ color: $control-icon-active
185
186
  &.is-small + .fa
186
187
  font-size: 10.5px
187
188
  top: 0
@@ -234,6 +235,7 @@
234
235
  margin-right: 10px
235
236
  &.is-expanded
236
237
  flex-grow: 1
238
+ flex-shrink: 1
237
239
  &.is-grouped-centered
238
240
  justify-content: center
239
241
  &.is-grouped-right
@@ -243,10 +245,12 @@
243
245
  display: flex
244
246
  & > .control
245
247
  display: flex
248
+ flex-basis: 0
246
249
  flex-grow: 5
250
+ flex-shrink: 1
247
251
  &.is-loading
248
252
  &:after
249
- @extend .loader
253
+ +loader
250
254
  position: absolute !important
251
255
  right: 8px
252
256
  top: 8px
@@ -1,5 +1,5 @@
1
1
  .notification
2
- @extend .block
2
+ +block
3
3
  +clearfix
4
4
  background-color: $background
5
5
  border-radius: $radius
@@ -9,8 +9,9 @@
9
9
  border-radius: 0 $radius
10
10
  float: right
11
11
  margin: -16px -20px 0 20px
12
+ .title,
12
13
  .subtitle,
13
- .title
14
+ .content
14
15
  color: inherit
15
16
  // Colors
16
17
  @each $name, $pair in $colors
@@ -1,44 +1,25 @@
1
- .delete
2
- @extend .unselectable
3
- -moz-appearance: none
4
- -webkit-appearance: none
5
- background-color: rgba($black, 0.2)
6
- border: none
7
- border-radius: 290486px
8
- cursor: pointer
9
- display: inline-block
10
- height: 24px
1
+ .block
2
+ +block
3
+
4
+ .container
11
5
  position: relative
6
+ +desktop
7
+ margin: 0 auto
8
+ max-width: 960px
9
+ // Modifiers
10
+ &.is-fluid
11
+ margin: 0 20px
12
+ max-width: none
13
+ +widescreen
14
+ max-width: 1200px
15
+
16
+ .delete
17
+ +delete
18
+
19
+ .fa
20
+ font-size: 21px
21
+ text-align: center
12
22
  vertical-align: top
13
- width: 24px
14
- &:before,
15
- &:after
16
- background-color: $white
17
- content: ""
18
- display: block
19
- height: 2px
20
- left: 50%
21
- margin-left: -25%
22
- margin-top: -1px
23
- position: absolute
24
- top: 50%
25
- width: 50%
26
- &:before
27
- transform: rotate(45deg)
28
- &:after
29
- transform: rotate(-45deg)
30
- &:hover
31
- background-color: rgba($black, 0.5)
32
- // Sizes
33
- &.is-small
34
- height: 16px
35
- width: 16px
36
- &.is-medium
37
- height: 32px
38
- width: 32px
39
- &.is-large
40
- height: 40px
41
- width: 40px
42
23
 
43
24
  .icon
44
25
  +fa(21px, 24px)
@@ -53,46 +34,6 @@
53
34
  &.is-large
54
35
  +fa(42px, 48px)
55
36
 
56
- .hamburger
57
- cursor: pointer
58
- display: block
59
- height: $nav-height
60
- position: relative
61
- width: $nav-height
62
- span
63
- background-color: $text
64
- display: block
65
- height: 1px
66
- left: 50%
67
- margin-left: -7px
68
- position: absolute
69
- top: 50%
70
- transition: none $speed $easing
71
- transition-property: background, left, opacity, transform
72
- width: 15px
73
- &:nth-child(1)
74
- margin-top: -6px
75
- &:nth-child(2)
76
- margin-top: -1px
77
- &:nth-child(3)
78
- margin-top: 4px
79
- &:hover
80
- background-color: $background
81
- // Modifers
82
- &.is-active
83
- span
84
- background-color: $link
85
- &:nth-child(1)
86
- margin-left: -5px
87
- transform: rotate(45deg)
88
- transform-origin: left top
89
- &:nth-child(2)
90
- opacity: 0
91
- &:nth-child(3)
92
- margin-left: -5px
93
- transform: rotate(-45deg)
94
- transform-origin: left bottom
95
-
96
37
  .heading
97
38
  display: block
98
39
  font-size: 11px
@@ -101,7 +42,7 @@
101
42
  text-transform: uppercase
102
43
 
103
44
  .highlight
104
- @extend .block
45
+ +block
105
46
  font-size: 12px
106
47
  font-weight: normal
107
48
  max-width: 100%
@@ -112,16 +53,7 @@
112
53
  max-width: 100%
113
54
 
114
55
  .loader
115
- animation: spin-around 500ms infinite linear
116
- border: 2px solid $border
117
- border-radius: 290486px
118
- border-right-color: transparent
119
- border-top-color: transparent
120
- content: ""
121
- display: block
122
- height: 16px
123
- position: relative
124
- width: 16px
56
+ +loader
125
57
 
126
58
  .number
127
59
  background-color: $background
@@ -147,9 +79,6 @@
147
79
  .delete
148
80
  margin-left: 4px
149
81
  margin-right: -6px
150
- &:not(.is-large)
151
- .delete
152
- @extend .delete.is-small
153
82
  // Colors
154
83
  @each $name, $pair in $colors
155
84
  $color: nth($pair, 1)
@@ -177,11 +106,3 @@
177
106
  .delete
178
107
  margin-left: 4px
179
108
  margin-right: -8px
180
-
181
- .unselectable
182
- -webkit-touch-callout: none
183
- -webkit-user-select: none
184
- -moz-user-select: none
185
- -ms-user-select: none
186
- user-select: none
187
-
@@ -1,5 +1,5 @@
1
1
  .progress
2
- @extend .block
2
+ +block
3
3
  -moz-appearance: none
4
4
  -webkit-appearance: none
5
5
  border: none
@@ -1,11 +1,20 @@
1
+ $table: $text-strong !default
2
+ $table-background: $white !default
3
+ $table-border: $border !default
4
+
5
+ $table-head: $text-light !default
6
+
7
+ $table-row-hover-background: $white-ter !default
8
+ $table-row-even-background: $white-bis !default
9
+
1
10
  .table
2
- background-color: $white
3
- color: $text-strong
11
+ background-color: $table-background
12
+ color: $table
4
13
  margin-bottom: 20px
5
14
  width: 100%
6
15
  td,
7
16
  th
8
- border: 1px solid $border
17
+ border: 1px solid $table-border
9
18
  border-width: 0 0 1px
10
19
  padding: 8px 10px
11
20
  vertical-align: top
@@ -37,13 +46,12 @@
37
46
  text-align: left
38
47
  tr
39
48
  &:hover
40
- background-color: $background
41
- color: $text-strong
49
+ background-color: $table-row-hover-background
42
50
  thead
43
51
  td,
44
52
  th
45
53
  border-width: 0 0 2px
46
- color: $text-light
54
+ color: $table-head
47
55
  tbody
48
56
  tr
49
57
  &:last-child
@@ -54,7 +62,7 @@
54
62
  td,
55
63
  th
56
64
  border-width: 2px 0 0
57
- color: $text-light
65
+ color: $table-head
58
66
  // Modifiers
59
67
  &.is-bordered
60
68
  td,
@@ -83,9 +91,7 @@
83
91
  &.is-striped
84
92
  tbody
85
93
  tr
86
- &:hover
87
- background-color: darken($background, 2%)
88
- &:nth-child(2n)
89
- background-color: $background
94
+ &:nth-child(even)
95
+ background-color: $table-row-even-background
90
96
  &:hover
91
- background-color: darken($background, 2%)
97
+ background-color: $table-row-hover-background
@@ -1,6 +1,6 @@
1
1
  .title,
2
2
  .subtitle
3
- @extend .block
3
+ +block
4
4
  font-weight: $weight-title-normal
5
5
  word-break: break-word
6
6
  em,
@@ -0,0 +1,4 @@
1
+ @charset "utf-8"
2
+
3
+ @import "columns.sass"
4
+ @import "tiles.sass"
@@ -0,0 +1,251 @@
1
+ .column
2
+ display: block
3
+ flex-basis: 0
4
+ flex-grow: 1
5
+ flex-shrink: 1
6
+ padding: 10px
7
+ .columns.is-mobile > &.is-narrow
8
+ flex: none
9
+ .columns.is-mobile > &.is-full
10
+ flex: none
11
+ width: 100%
12
+ .columns.is-mobile > &.is-three-quarters
13
+ flex: none
14
+ width: 75%
15
+ .columns.is-mobile > &.is-two-thirds
16
+ flex: none
17
+ width: 66.6666%
18
+ .columns.is-mobile > &.is-half
19
+ flex: none
20
+ width: 50%
21
+ .columns.is-mobile > &.is-one-third
22
+ flex: none
23
+ width: 33.3333%
24
+ .columns.is-mobile > &.is-one-quarter
25
+ flex: none
26
+ width: 25%
27
+ .columns.is-mobile > &.is-offset-three-quarters
28
+ margin-left: 75%
29
+ .columns.is-mobile > &.is-offset-two-thirds
30
+ margin-left: 66.6666%
31
+ .columns.is-mobile > &.is-offset-half
32
+ margin-left: 50%
33
+ .columns.is-mobile > &.is-offset-one-third
34
+ margin-left: 33.3333%
35
+ .columns.is-mobile > &.is-offset-one-quarter
36
+ margin-left: 25%
37
+ @for $i from 1 through 12
38
+ .columns.is-mobile > &.is-#{$i}
39
+ flex: none
40
+ width: ($i / 12) * 100%
41
+ .columns.is-mobile > &.is-offset-#{$i}
42
+ margin-left: ($i / 12) * 100%
43
+ +mobile
44
+ &.is-narrow-mobile
45
+ flex: none
46
+ &.is-full-mobile
47
+ flex: none
48
+ width: 100%
49
+ &.is-three-quarters-mobile
50
+ flex: none
51
+ width: 75%
52
+ &.is-two-thirds-mobile
53
+ flex: none
54
+ width: 66.6666%
55
+ &.is-half-mobile
56
+ flex: none
57
+ width: 50%
58
+ &.is-one-third-mobile
59
+ flex: none
60
+ width: 33.3333%
61
+ &.is-one-quarter-mobile
62
+ flex: none
63
+ width: 25%
64
+ &.is-offset-three-quarters-mobile
65
+ margin-left: 75%
66
+ &.is-offset-two-thirds-mobile
67
+ margin-left: 66.6666%
68
+ &.is-offset-half-mobile
69
+ margin-left: 50%
70
+ &.is-offset-one-third-mobile
71
+ margin-left: 33.3333%
72
+ &.is-offset-one-quarter-mobile
73
+ margin-left: 25%
74
+ @for $i from 1 through 12
75
+ &.is-#{$i}-mobile
76
+ flex: none
77
+ width: ($i / 12) * 100%
78
+ &.is-offset-#{$i}-mobile
79
+ margin-left: ($i / 12) * 100%
80
+ +tablet
81
+ &.is-narrow,
82
+ &.is-narrow-tablet
83
+ flex: none
84
+ &.is-full,
85
+ &.is-full-tablet
86
+ flex: none
87
+ width: 100%
88
+ &.is-three-quarters,
89
+ &.is-three-quarters-tablet
90
+ flex: none
91
+ width: 75%
92
+ &.is-two-thirds,
93
+ &.is-two-thirds-tablet
94
+ flex: none
95
+ width: 66.6666%
96
+ &.is-half,
97
+ &.is-half-tablet
98
+ flex: none
99
+ width: 50%
100
+ &.is-one-third,
101
+ &.is-one-third-tablet
102
+ flex: none
103
+ width: 33.3333%
104
+ &.is-one-quarter,
105
+ &.is-one-quarter-tablet
106
+ flex: none
107
+ width: 25%
108
+ &.is-offset-three-quarters,
109
+ &.is-offset-three-quarters-tablet
110
+ margin-left: 75%
111
+ &.is-offset-two-thirds,
112
+ &.is-offset-two-thirds-tablet
113
+ margin-left: 66.6666%
114
+ &.is-offset-half,
115
+ &.is-offset-half-tablet
116
+ margin-left: 50%
117
+ &.is-offset-one-third,
118
+ &.is-offset-one-third-tablet
119
+ margin-left: 33.3333%
120
+ &.is-offset-one-quarter,
121
+ &.is-offset-one-quarter-tablet
122
+ margin-left: 25%
123
+ @for $i from 1 through 12
124
+ &.is-#{$i},
125
+ &.is-#{$i}-tablet
126
+ flex: none
127
+ width: ($i / 12) * 100%
128
+ &.is-offset-#{$i},
129
+ &.is-offset-#{$i}-tablet
130
+ margin-left: ($i / 12) * 100%
131
+ +desktop
132
+ &.is-narrow-desktop
133
+ flex: none
134
+ &.is-full-desktop
135
+ flex: none
136
+ width: 100%
137
+ &.is-three-quarters-desktop
138
+ flex: none
139
+ width: 75%
140
+ &.is-two-thirds-desktop
141
+ flex: none
142
+ width: 66.6666%
143
+ &.is-half-desktop
144
+ flex: none
145
+ width: 50%
146
+ &.is-one-third-desktop
147
+ flex: none
148
+ width: 33.3333%
149
+ &.is-one-quarter-desktop
150
+ flex: none
151
+ width: 25%
152
+ &.is-offset-three-quarters-desktop
153
+ margin-left: 75%
154
+ &.is-offset-two-thirds-desktop
155
+ margin-left: 66.6666%
156
+ &.is-offset-half-desktop
157
+ margin-left: 50%
158
+ &.is-offset-one-third-desktop
159
+ margin-left: 33.3333%
160
+ &.is-offset-one-quarter-desktop
161
+ margin-left: 25%
162
+ @for $i from 1 through 12
163
+ &.is-#{$i}-desktop
164
+ flex: none
165
+ width: ($i / 12) * 100%
166
+ &.is-offset-#{$i}-desktop
167
+ margin-left: ($i / 12) * 100%
168
+ +widescreen
169
+ &.is-narrow-widescreen
170
+ flex: none
171
+ &.is-full-widescreen
172
+ flex: none
173
+ width: 100%
174
+ &.is-three-quarters-widescreen
175
+ flex: none
176
+ width: 75%
177
+ &.is-two-thirds-widescreen
178
+ flex: none
179
+ width: 66.6666%
180
+ &.is-half-widescreen
181
+ flex: none
182
+ width: 50%
183
+ &.is-one-third-widescreen
184
+ flex: none
185
+ width: 33.3333%
186
+ &.is-one-quarter-widescreen
187
+ flex: none
188
+ width: 25%
189
+ &.is-offset-three-quarters-widescreen
190
+ margin-left: 75%
191
+ &.is-offset-two-thirds-widescreen
192
+ margin-left: 66.6666%
193
+ &.is-offset-half-widescreen
194
+ margin-left: 50%
195
+ &.is-offset-one-third-widescreen
196
+ margin-left: 33.3333%
197
+ &.is-offset-one-quarter-widescreen
198
+ margin-left: 25%
199
+ @for $i from 1 through 12
200
+ &.is-#{$i}-widescreen
201
+ flex: none
202
+ width: ($i / 12) * 100%
203
+ &.is-offset-#{$i}-widescreen
204
+ margin-left: ($i / 12) * 100%
205
+
206
+ .columns
207
+ margin-left: -10px
208
+ margin-right: -10px
209
+ margin-top: -10px
210
+ &:last-child
211
+ margin-bottom: -10px
212
+ &:not(:last-child)
213
+ margin-bottom: 10px
214
+ // Modifiers
215
+ &.is-centered
216
+ justify-content: center
217
+ &.is-gapless
218
+ margin-left: 0
219
+ margin-right: 0
220
+ margin-top: 0
221
+ &:last-child
222
+ margin-bottom: 0
223
+ &:not(:last-child)
224
+ margin-bottom: 20px
225
+ & > .column
226
+ margin: 0
227
+ padding: 0
228
+ &.is-grid
229
+ // Responsiveness
230
+ +tablet
231
+ flex-wrap: wrap
232
+ & > .column
233
+ max-width: 33.3333%
234
+ padding: 10px
235
+ width: 33.3333%
236
+ & + .column
237
+ margin-left: 0
238
+ &.is-mobile
239
+ display: flex
240
+ &.is-multiline
241
+ flex-wrap: wrap
242
+ &.is-vcentered
243
+ align-items: center
244
+ // Responsiveness
245
+ +tablet
246
+ &:not(.is-desktop)
247
+ display: flex
248
+ +desktop
249
+ // Modifiers
250
+ &.is-desktop
251
+ display: flex