bulma-rails 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/stylesheets/bulma.sass +1 -1
  4. data/app/assets/stylesheets/sass/base/generic.sass +2 -2
  5. data/app/assets/stylesheets/sass/base/helpers.sass +4 -0
  6. data/app/assets/stylesheets/sass/base/minireset.sass +5 -6
  7. data/app/assets/stylesheets/sass/components/breadcrumb.sass +13 -12
  8. data/app/assets/stylesheets/sass/components/card.sass +7 -0
  9. data/app/assets/stylesheets/sass/components/dropdown.sass +1 -1
  10. data/app/assets/stylesheets/sass/components/media.sass +0 -1
  11. data/app/assets/stylesheets/sass/components/message.sass +12 -5
  12. data/app/assets/stylesheets/sass/components/navbar.sass +67 -32
  13. data/app/assets/stylesheets/sass/elements/button.sass +19 -9
  14. data/app/assets/stylesheets/sass/elements/container.sass +6 -6
  15. data/app/assets/stylesheets/sass/elements/content.sass +1 -5
  16. data/app/assets/stylesheets/sass/elements/form.sass +17 -12
  17. data/app/assets/stylesheets/sass/elements/image.sass +31 -1
  18. data/app/assets/stylesheets/sass/elements/table.sass +8 -1
  19. data/app/assets/stylesheets/sass/elements/tag.sass +6 -6
  20. data/app/assets/stylesheets/sass/elements/title.sass +7 -4
  21. data/app/assets/stylesheets/sass/grid/columns.sass +14 -14
  22. data/app/assets/stylesheets/sass/layout/footer.sass +1 -1
  23. data/app/assets/stylesheets/sass/utilities/controls.sass +9 -4
  24. data/app/assets/stylesheets/sass/utilities/derived-variables.sass +4 -2
  25. data/app/assets/stylesheets/sass/utilities/functions.sass +34 -0
  26. data/app/assets/stylesheets/sass/utilities/initial-variables.sass +5 -3
  27. data/app/assets/stylesheets/sass/utilities/mixins.sass +160 -117
  28. data/bulma-rails.gemspec +1 -1
  29. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29fc7a8a059b5386cf420352a77aefc14f7cdc36
4
- data.tar.gz: 56b6346030bd4ef37052c23ac038199fb513633f
3
+ metadata.gz: de58dd9b24b5d0508cb8e580ae1a6dcafd18f6c9
4
+ data.tar.gz: e34d98f8bbdfdbd1248c51788a05c97ff8d25d27
5
5
  SHA512:
6
- metadata.gz: '0986b424dab51f4c2a32e64ec1fb24e88c423220dc5d62018173593aab07bde271f6dcfa0783e39e196378fd9736dd381d66595509098a79f64372a686ff451f'
7
- data.tar.gz: a9e32c0f692c614e0cfdadbc7f9bfb0cba744b3b52a1c66eda1a12dff887c5364b18a599e2871100d9d9b70eccb71802216ee08f5222fdfb0ad43372790a2daf
6
+ metadata.gz: 83b22b23cf7d3131070f4cdf187c91b79a96d2b60fb9213064fd92d6731f97b8733f4c0af28b55a9470f1cb4d58d557fd17d57d2650addf8f913aab99daca7b0
7
+ data.tar.gz: b6bd81f94cb54e0694b4722cff5259a35290855480a28a18ca99c66febb80a7adb66f0bd574292d405db75f6c49656f6463d7863c27a1326314fc315bb06b473
data/README.md CHANGED
@@ -8,7 +8,7 @@ A modern CSS framework based on Flexbox.
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
- gem "bulma-rails", "~> 0.6.2"
11
+ gem "bulma-rails", "~> 0.7.0"
12
12
 
13
13
  And then execute:
14
14
 
@@ -1,5 +1,5 @@
1
1
  @charset "utf-8"
2
- /*! bulma.io v0.6.2 | MIT License | github.com/jgthms/bulma */
2
+ /*! bulma.io v0.7.0 | MIT License | github.com/jgthms/bulma */
3
3
  @import "sass/utilities/_all"
4
4
  @import "sass/base/_all"
5
5
  @import "sass/elements/_all"
@@ -11,8 +11,8 @@ $code-padding: 0.25em 0.5em 0.25em !default
11
11
  $code-weight: normal !default
12
12
  $code-size: 0.875em !default
13
13
 
14
- $hr-background-color: $border !default
15
- $hr-height: 1px !default
14
+ $hr-background-color: $background !default
15
+ $hr-height: 2px !default
16
16
  $hr-margin: 1.5rem 0 !default
17
17
 
18
18
  $strong-color: $text-strong !default
@@ -52,6 +52,8 @@ $alignments: ('centered': 'center', 'justified': 'justify', 'left': 'left', 'rig
52
52
  @each $alignment, $text-align in $alignments
53
53
  .has-text-#{$alignment}
54
54
  text-align: #{$text-align} !important
55
+
56
+ @each $alignment, $text-align in $alignments
55
57
  +mobile
56
58
  .has-text-#{$alignment}-mobile
57
59
  text-align: #{$text-align} !important
@@ -100,6 +102,8 @@ $alignments: ('centered': 'center', 'justified': 'justify', 'left': 'left', 'rig
100
102
  &:hover,
101
103
  &:focus
102
104
  color: darken($color, 10%) !important
105
+ .has-background-#{$name}
106
+ background-color: $color !important
103
107
 
104
108
  @each $name, $shade in $shades
105
109
  .has-text-#{$name}
@@ -1,4 +1,4 @@
1
- /*! minireset.css v0.0.2 | MIT License | github.com/jgthms/minireset.css */
1
+ /*! minireset.css v0.0.3 | MIT License | github.com/jgthms/minireset.css */
2
2
  // Blocks
3
3
  html,
4
4
  body,
@@ -52,17 +52,16 @@ html
52
52
  box-sizing: border-box
53
53
 
54
54
  *
55
- box-sizing: inherit
56
- &:before,
57
- &:after
55
+ &,
56
+ &::before,
57
+ &::after
58
58
  box-sizing: inherit
59
59
 
60
60
  // Media
61
61
  img,
62
- embed,
63
- object,
64
62
  audio,
65
63
  video
64
+ height: auto
66
65
  max-width: 100%
67
66
 
68
67
  // Iframe
@@ -2,23 +2,22 @@ $breadcrumb-item-color: $link !default
2
2
  $breadcrumb-item-hover-color: $link-hover !default
3
3
  $breadcrumb-item-active-color: $text-strong !default
4
4
 
5
- $breadcrumb-item-separator-color: $text !default
5
+ $breadcrumb-item-padding-vertical: 0 !default
6
+ $breadcrumb-item-padding-horizontal: 0.75em !default
7
+
8
+ $breadcrumb-item-separator-color: $grey-light !default
6
9
 
7
10
  .breadcrumb
8
11
  +block
9
12
  +unselectable
10
- align-items: stretch
11
- display: flex
12
13
  font-size: $size-normal
13
- overflow: hidden
14
- overflow-x: auto
15
14
  white-space: nowrap
16
15
  a
17
16
  align-items: center
18
17
  color: $breadcrumb-item-color
19
18
  display: flex
20
19
  justify-content: center
21
- padding: 0.5em 0.75em
20
+ padding: $breadcrumb-item-padding-vertical $breadcrumb-item-padding-horizontal
22
21
  &:hover
23
22
  color: $breadcrumb-item-hover-color
24
23
  li
@@ -34,11 +33,11 @@ $breadcrumb-item-separator-color: $text !default
34
33
  & + li::before
35
34
  color: $breadcrumb-item-separator-color
36
35
  content: "\0002f"
37
- ul, ol
38
- align-items: center
36
+ ul,
37
+ ol
38
+ align-items: flex-start
39
39
  display: flex
40
- flex-grow: 1
41
- flex-shrink: 0
40
+ flex-wrap: wrap
42
41
  justify-content: flex-start
43
42
  .icon
44
43
  &:first-child
@@ -47,10 +46,12 @@ $breadcrumb-item-separator-color: $text !default
47
46
  margin-left: 0.5em
48
47
  // Alignment
49
48
  &.is-centered
50
- ol, ul
49
+ ol,
50
+ ul
51
51
  justify-content: center
52
52
  &.is-right
53
- ol, ul
53
+ ol,
54
+ ul
54
55
  justify-content: flex-end
55
56
  // Sizes
56
57
  &.is-small
@@ -2,10 +2,14 @@ $card-color: $text !default
2
2
  $card-background-color: $white !default
3
3
  $card-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default
4
4
 
5
+ $card-header-background-color: none !default
5
6
  $card-header-color: $text-strong !default
6
7
  $card-header-shadow: 0 1px 2px rgba($black, 0.1) !default
7
8
  $card-header-weight: $weight-bold !default
8
9
 
10
+ $card-content-background-color: none !default
11
+
12
+ $card-footer-background-color: none !default
9
13
  $card-footer-border-top: 1px solid $border !default
10
14
 
11
15
  .card
@@ -16,6 +20,7 @@ $card-footer-border-top: 1px solid $border !default
16
20
  position: relative
17
21
 
18
22
  .card-header
23
+ background-color: $card-header-background-color
19
24
  align-items: stretch
20
25
  box-shadow: $card-header-shadow
21
26
  display: flex
@@ -42,9 +47,11 @@ $card-footer-border-top: 1px solid $border !default
42
47
  position: relative
43
48
 
44
49
  .card-content
50
+ background-color: $card-content-background-color
45
51
  padding: 1.5rem
46
52
 
47
53
  .card-footer
54
+ background-color: $card-footer-background-color
48
55
  border-top: $card-footer-border-top
49
56
  align-items: stretch
50
57
  display: flex
@@ -29,7 +29,7 @@ $dropdown-divider-background-color: $border !default
29
29
  .dropdown-menu
30
30
  bottom: 100%
31
31
  padding-bottom: $dropdown-content-offset
32
- padding-top: unset
32
+ padding-top: initial
33
33
  top: auto
34
34
 
35
35
  .dropdown-menu
@@ -41,5 +41,4 @@
41
41
  flex-basis: auto
42
42
  flex-grow: 1
43
43
  flex-shrink: 1
44
- overflow: auto
45
44
  text-align: left
@@ -3,17 +3,21 @@ $message-radius: $radius !default
3
3
 
4
4
  $message-header-background-color: $text !default
5
5
  $message-header-color: $text-invert !default
6
- $message-header-padding: 0.5em 0.75em !default
6
+ $message-header-weight: $weight-bold !default
7
+ $message-header-padding: 0.75em 1em !default
7
8
  $message-header-radius: $radius !default
8
9
 
9
- $message-body-border: 1px solid $border !default
10
+ $message-body-border-color: $border !default
11
+ $message-body-border-width: 0 0 0 4px !default
10
12
  $message-body-color: $text !default
11
- $message-body-padding: 1em 1.25em !default
13
+ $message-body-padding: 1.25em 1.5em !default
12
14
  $message-body-radius: $radius !default
13
15
 
14
16
  $message-body-pre-background-color: $white !default
15
17
  $message-body-pre-code-background-color: transparent !default
16
18
 
19
+ $message-header-body-border-width: 0 !default
20
+
17
21
  .message
18
22
  +block
19
23
  background-color: $message-background-color
@@ -54,6 +58,7 @@ $message-body-pre-code-background-color: transparent !default
54
58
  border-radius: $message-header-radius $message-header-radius 0 0
55
59
  color: $message-header-color
56
60
  display: flex
61
+ font-weight: $message-header-weight
57
62
  justify-content: space-between
58
63
  line-height: 1.25
59
64
  padding: $message-header-padding
@@ -63,13 +68,15 @@ $message-body-pre-code-background-color: transparent !default
63
68
  flex-shrink: 0
64
69
  margin-left: 0.75em
65
70
  & + .message-body
71
+ border-width: $message-header-body-border-width
66
72
  border-top-left-radius: 0
67
73
  border-top-right-radius: 0
68
- border-top: none
69
74
 
70
75
  .message-body
71
- border: $message-body-border
76
+ border-color: $message-body-border-color
72
77
  border-radius: $message-body-radius
78
+ border-style: solid
79
+ border-width: $message-body-border-width
73
80
  color: $message-body-color
74
81
  padding: $message-body-padding
75
82
  code,
@@ -1,10 +1,15 @@
1
1
  $navbar-background-color: $white !default
2
+ $navbar-box-shadow-size: 0 2px 0 0 !default
3
+ $navbar-box-shadow-color: $background !default
2
4
  $navbar-height: 3.25rem !default
5
+ $navbar-padding-vertical: 1rem !default
6
+ $navbar-padding-horizontal: 2rem !default
7
+ $navbar-z: 30 !default
3
8
  $navbar-fixed-z: 30 !default
4
9
 
5
10
  $navbar-item-color: $grey-dark !default
6
11
  $navbar-item-hover-color: $link !default
7
- $navbar-item-hover-background-color: $background !default
12
+ $navbar-item-hover-background-color: $white-bis !default
8
13
  $navbar-item-active-color: $black !default
9
14
  $navbar-item-active-background-color: transparent !default
10
15
  $navbar-item-img-max-height: 1.75rem !default
@@ -18,7 +23,7 @@ $navbar-tab-active-border-bottom-style: solid !default
18
23
  $navbar-tab-active-border-bottom-width: 3px !default
19
24
 
20
25
  $navbar-dropdown-background-color: $white !default
21
- $navbar-dropdown-border-top: 1px solid $border !default
26
+ $navbar-dropdown-border-top: 2px solid $border !default
22
27
  $navbar-dropdown-offset: -4px !default
23
28
  $navbar-dropdown-arrow: $link !default
24
29
  $navbar-dropdown-radius: $radius-large !default
@@ -32,7 +37,8 @@ $navbar-dropdown-item-hover-background-color: $background !default
32
37
  $navbar-dropdown-item-active-color: $link !default
33
38
  $navbar-dropdown-item-active-background-color: $background !default
34
39
 
35
- $navbar-divider-background-color: $border !default
40
+ $navbar-divider-background-color: $background !default
41
+ $navbar-divider-height: 2px !default
36
42
 
37
43
  =navbar-fixed
38
44
  left: 0
@@ -40,15 +46,12 @@ $navbar-divider-background-color: $border !default
40
46
  right: 0
41
47
  z-index: $navbar-fixed-z
42
48
 
43
- =navbar-fixed-html
44
- left: 0
45
- position: fixed
46
- right: 0
47
-
48
49
  .navbar
49
50
  background-color: $navbar-background-color
51
+ box-shadow: $navbar-box-shadow-size $navbar-box-shadow-color
50
52
  min-height: $navbar-height
51
53
  position: relative
54
+ z-index: $navbar-z
52
55
  @each $name, $pair in $colors
53
56
  $color: nth($pair, 1)
54
57
  $color-invert: nth($pair, 2)
@@ -109,11 +112,12 @@ $navbar-divider-background-color: $border !default
109
112
  &.is-fixed-top
110
113
  top: 0
111
114
 
112
- html.has-navbar-fixed-top
113
- padding-top: $navbar-height
114
-
115
- html.has-navbar-fixed-bottom
116
- padding-bottom: $navbar-height
115
+ html,
116
+ body
117
+ &.has-navbar-fixed-top
118
+ padding-top: $navbar-height
119
+ &.has-navbar-fixed-bottom
120
+ padding-bottom: $navbar-height
117
121
 
118
122
  .navbar-brand,
119
123
  .navbar-tabs
@@ -122,6 +126,11 @@ html.has-navbar-fixed-bottom
122
126
  flex-shrink: 0
123
127
  min-height: $navbar-height
124
128
 
129
+ .navbar-brand
130
+ a.navbar-item
131
+ &:hover
132
+ background-color: transparent
133
+
125
134
  .navbar-tabs
126
135
  +overflow-touch
127
136
  max-width: 100vw
@@ -140,17 +149,23 @@ html.has-navbar-fixed-bottom
140
149
  color: $navbar-item-color
141
150
  display: block
142
151
  line-height: 1.5
143
- padding: 0.5rem 1rem
152
+ padding: 0.5rem 0.75rem
144
153
  position: relative
154
+ .icon
155
+ &:only-child
156
+ margin-left: -0.25rem
157
+ margin-right: -0.25rem
145
158
 
146
159
  a.navbar-item,
147
- a.navbar-link
160
+ .navbar-link
161
+ cursor: pointer
148
162
  &:hover,
149
163
  &.is-active
150
164
  background-color: $navbar-item-hover-background-color
151
165
  color: $navbar-item-hover-color
152
166
 
153
167
  .navbar-item
168
+ display: block
154
169
  flex-grow: 0
155
170
  flex-shrink: 0
156
171
  img
@@ -181,6 +196,10 @@ a.navbar-link
181
196
 
182
197
  .navbar-link
183
198
  padding-right: 2.5em
199
+ &::after
200
+ +arrow($navbar-dropdown-arrow)
201
+ margin-top: -0.375em
202
+ right: 1.125em
184
203
 
185
204
  .navbar-dropdown
186
205
  font-size: 0.875rem
@@ -194,7 +213,7 @@ a.navbar-link
194
213
  background-color: $navbar-divider-background-color
195
214
  border: none
196
215
  display: none
197
- height: 1px
216
+ height: $navbar-divider-height
198
217
  margin: 0.5rem 0
199
218
 
200
219
  +touch
@@ -205,6 +224,9 @@ a.navbar-link
205
224
  .navbar-item
206
225
  align-items: center
207
226
  display: flex
227
+ .navbar-link
228
+ &::after
229
+ display: none
208
230
  .navbar-menu
209
231
  background-color: $navbar-background-color
210
232
  box-shadow: 0 8px 16px rgba($black, 0.1)
@@ -228,10 +250,12 @@ a.navbar-link
228
250
  +overflow-touch
229
251
  max-height: calc(100vh - #{$navbar-height})
230
252
  overflow: auto
231
- html.has-navbar-fixed-top-touch
232
- padding-top: $navbar-height
233
- html.has-navbar-fixed-bottom-touch
234
- padding-bottom: $navbar-height
253
+ html,
254
+ body
255
+ &.has-navbar-fixed-top-touch
256
+ padding-top: $navbar-height
257
+ &.has-navbar-fixed-bottom-touch
258
+ padding-bottom: $navbar-height
235
259
 
236
260
  +desktop
237
261
  .navbar,
@@ -242,9 +266,17 @@ a.navbar-link
242
266
  display: flex
243
267
  .navbar
244
268
  min-height: $navbar-height
269
+ &.is-spaced
270
+ padding: $navbar-padding-vertical $navbar-padding-horizontal
271
+ .navbar-start,
272
+ .navbar-end
273
+ align-items: center
274
+ a.navbar-item,
275
+ .navbar-link
276
+ border-radius: $radius
245
277
  &.is-transparent
246
278
  a.navbar-item,
247
- a.navbar-link
279
+ .navbar-link
248
280
  &:hover,
249
281
  &.is-active
250
282
  background-color: transparent !important
@@ -268,6 +300,7 @@ a.navbar-link
268
300
  align-items: center
269
301
  display: flex
270
302
  .navbar-item
303
+ display: flex
271
304
  &.has-dropdown
272
305
  align-items: stretch
273
306
  &.has-dropdown-up
@@ -284,16 +317,11 @@ a.navbar-link
284
317
  &.is-hoverable:hover
285
318
  .navbar-dropdown
286
319
  display: block
320
+ .navbar.is-spaced &,
287
321
  &.is-boxed
288
322
  opacity: 1
289
323
  pointer-events: auto
290
324
  transform: translateY(0)
291
- .navbar-link
292
- &::after
293
- +arrow($navbar-dropdown-arrow)
294
- margin-top: -0.375em
295
- right: 1.125em
296
- top: 50%
297
325
  .navbar-menu
298
326
  flex-grow: 1
299
327
  flex-shrink: 0
@@ -327,6 +355,7 @@ a.navbar-link
327
355
  &.is-active
328
356
  background-color: $navbar-dropdown-item-active-background-color
329
357
  color: $navbar-dropdown-item-active-color
358
+ .navbar.is-spaced &,
330
359
  &.is-boxed
331
360
  border-radius: $navbar-dropdown-boxed-radius
332
361
  border-top: none
@@ -360,13 +389,19 @@ a.navbar-link
360
389
  box-shadow: 0 -2px 3px rgba($black, 0.1)
361
390
  &.is-fixed-top-desktop
362
391
  top: 0
363
- html.has-navbar-fixed-top-desktop
364
- padding-top: $navbar-height
365
- html.has-navbar-fixed-bottom-desktop
366
- padding-bottom: $navbar-height
392
+ html,
393
+ body
394
+ &.has-navbar-fixed-top-desktop
395
+ padding-top: $navbar-height
396
+ &.has-navbar-fixed-bottom-desktop
397
+ padding-bottom: $navbar-height
398
+ &.has-spaced-navbar-fixed-top
399
+ padding-top: $navbar-height + ($navbar-padding-vertical * 2)
400
+ &.has-spaced-navbar-fixed-bottom
401
+ padding-bottom: $navbar-height + ($navbar-padding-vertical * 2)
367
402
  // Hover/Active states
368
403
  a.navbar-item,
369
- a.navbar-link
404
+ .navbar-link
370
405
  &.is-active
371
406
  color: $navbar-item-active-color
372
407
  &.is-active:not(:hover)