bulma-rails 0.7.3 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/README.md +1 -1
  4. data/app/assets/stylesheets/bulma.sass +3 -1
  5. data/app/assets/stylesheets/sass/base/_all.sass +0 -1
  6. data/app/assets/stylesheets/sass/base/generic.sass +22 -10
  7. data/app/assets/stylesheets/sass/base/helpers.sass +1 -276
  8. data/app/assets/stylesheets/sass/base/minireset.sass +3 -3
  9. data/app/assets/stylesheets/sass/components/_all.sass +0 -1
  10. data/app/assets/stylesheets/sass/components/breadcrumb.sass +4 -4
  11. data/app/assets/stylesheets/sass/components/card.sass +15 -10
  12. data/app/assets/stylesheets/sass/components/dropdown.sass +15 -11
  13. data/app/assets/stylesheets/sass/components/level.sass +5 -3
  14. data/app/assets/stylesheets/sass/components/media.sass +14 -10
  15. data/app/assets/stylesheets/sass/components/menu.sass +16 -9
  16. data/app/assets/stylesheets/sass/components/message.sass +24 -11
  17. data/app/assets/stylesheets/sass/components/modal.sass +4 -4
  18. data/app/assets/stylesheets/sass/components/navbar.sass +40 -27
  19. data/app/assets/stylesheets/sass/components/pagination.sass +16 -10
  20. data/app/assets/stylesheets/sass/components/panel.sass +33 -15
  21. data/app/assets/stylesheets/sass/components/tabs.sass +36 -13
  22. data/app/assets/stylesheets/sass/elements/_all.sass +0 -1
  23. data/app/assets/stylesheets/sass/elements/box.sass +4 -4
  24. data/app/assets/stylesheets/sass/elements/button.sass +79 -31
  25. data/app/assets/stylesheets/sass/elements/container.sass +14 -15
  26. data/app/assets/stylesheets/sass/elements/content.sass +9 -5
  27. data/app/assets/stylesheets/sass/elements/form.sass +1 -602
  28. data/app/assets/stylesheets/sass/elements/image.sass +2 -0
  29. data/app/assets/stylesheets/sass/elements/notification.sass +16 -3
  30. data/app/assets/stylesheets/sass/elements/progress.sass +16 -14
  31. data/app/assets/stylesheets/sass/elements/table.sass +10 -7
  32. data/app/assets/stylesheets/sass/elements/tag.sass +31 -25
  33. data/app/assets/stylesheets/sass/elements/title.sass +9 -3
  34. data/app/assets/stylesheets/sass/form/_all.sass +8 -0
  35. data/app/assets/stylesheets/sass/form/checkbox-radio.sass +21 -0
  36. data/app/assets/stylesheets/sass/form/file.sass +180 -0
  37. data/app/assets/stylesheets/sass/form/input-textarea.sass +64 -0
  38. data/app/assets/stylesheets/sass/form/select.sass +85 -0
  39. data/app/assets/stylesheets/sass/form/shared.sass +55 -0
  40. data/app/assets/stylesheets/sass/form/tools.sass +213 -0
  41. data/app/assets/stylesheets/sass/grid/columns.sass +7 -7
  42. data/app/assets/stylesheets/sass/grid/tiles.sass +8 -6
  43. data/app/assets/stylesheets/sass/helpers/_all.sass +10 -0
  44. data/app/assets/stylesheets/sass/helpers/color.sass +37 -0
  45. data/app/assets/stylesheets/sass/helpers/float.sass +8 -0
  46. data/app/assets/stylesheets/sass/helpers/other.sass +8 -0
  47. data/app/assets/stylesheets/sass/helpers/overflow.sass +2 -0
  48. data/app/assets/stylesheets/sass/helpers/position.sass +5 -0
  49. data/app/assets/stylesheets/sass/helpers/spacing.sass +28 -0
  50. data/app/assets/stylesheets/sass/helpers/typography.sass +98 -0
  51. data/app/assets/stylesheets/sass/helpers/visibility.sass +122 -0
  52. data/app/assets/stylesheets/sass/layout/footer.sass +4 -1
  53. data/app/assets/stylesheets/sass/layout/hero.sass +23 -34
  54. data/app/assets/stylesheets/sass/utilities/_all.sass +1 -1
  55. data/app/assets/stylesheets/sass/utilities/controls.sass +3 -3
  56. data/app/assets/stylesheets/sass/utilities/derived-variables.scss +132 -0
  57. data/app/assets/stylesheets/sass/utilities/functions.sass +68 -15
  58. data/app/assets/stylesheets/sass/utilities/initial-variables.sass +10 -4
  59. data/app/assets/stylesheets/sass/utilities/mixins.sass +31 -7
  60. data/bulma-rails.gemspec +2 -2
  61. metadata +23 -8
  62. data/app/assets/stylesheets/sass/components/list.sass +0 -39
  63. data/app/assets/stylesheets/sass/utilities/derived-variables.sass +0 -85
@@ -0,0 +1,64 @@
1
+ $textarea-padding: $control-padding-horizontal !default
2
+ $textarea-max-height: 40em !default
3
+ $textarea-min-height: 8em !default
4
+
5
+ %input-textarea
6
+ @extend %input
7
+ box-shadow: $input-shadow
8
+ max-width: 100%
9
+ width: 100%
10
+ &[readonly]
11
+ box-shadow: none
12
+ // Colors
13
+ @each $name, $pair in $colors
14
+ $color: nth($pair, 1)
15
+ &.is-#{$name}
16
+ border-color: $color
17
+ &:focus,
18
+ &.is-focused,
19
+ &:active,
20
+ &.is-active
21
+ box-shadow: $input-focus-box-shadow-size bulmaRgba($color, 0.25)
22
+ // Sizes
23
+ &.is-small
24
+ +control-small
25
+ &.is-medium
26
+ +control-medium
27
+ &.is-large
28
+ +control-large
29
+ // Modifiers
30
+ &.is-fullwidth
31
+ display: block
32
+ width: 100%
33
+ &.is-inline
34
+ display: inline
35
+ width: auto
36
+
37
+ .input
38
+ @extend %input-textarea
39
+ &.is-rounded
40
+ border-radius: $radius-rounded
41
+ padding-left: calc(#{$control-padding-horizontal} + 0.375em)
42
+ padding-right: calc(#{$control-padding-horizontal} + 0.375em)
43
+ &.is-static
44
+ background-color: transparent
45
+ border-color: transparent
46
+ box-shadow: none
47
+ padding-left: 0
48
+ padding-right: 0
49
+
50
+ .textarea
51
+ @extend %input-textarea
52
+ display: block
53
+ max-width: 100%
54
+ min-width: 100%
55
+ padding: $textarea-padding
56
+ resize: vertical
57
+ &:not([rows])
58
+ max-height: $textarea-max-height
59
+ min-height: $textarea-min-height
60
+ &[rows]
61
+ height: initial
62
+ // Modifiers
63
+ &.has-fixed-size
64
+ resize: none
@@ -0,0 +1,85 @@
1
+ .select
2
+ display: inline-block
3
+ max-width: 100%
4
+ position: relative
5
+ vertical-align: top
6
+ &:not(.is-multiple)
7
+ height: $input-height
8
+ &:not(.is-multiple):not(.is-loading)
9
+ &::after
10
+ @extend %arrow
11
+ border-color: $input-arrow
12
+ +ltr-position(1.125em)
13
+ z-index: 4
14
+ &.is-rounded
15
+ select
16
+ border-radius: $radius-rounded
17
+ +ltr-property("padding", 1em, false)
18
+ select
19
+ @extend %input
20
+ cursor: pointer
21
+ display: block
22
+ font-size: 1em
23
+ max-width: 100%
24
+ outline: none
25
+ &::-ms-expand
26
+ display: none
27
+ &[disabled]:hover,
28
+ fieldset[disabled] &:hover
29
+ border-color: $input-disabled-border-color
30
+ &:not([multiple])
31
+ +ltr-property("padding", 2.5em)
32
+ &[multiple]
33
+ height: auto
34
+ padding: 0
35
+ option
36
+ padding: 0.5em 1em
37
+ // States
38
+ &:not(.is-multiple):not(.is-loading):hover
39
+ &::after
40
+ border-color: $input-hover-color
41
+ // Colors
42
+ @each $name, $pair in $colors
43
+ $color: nth($pair, 1)
44
+ &.is-#{$name}
45
+ &:not(:hover)::after
46
+ border-color: $color
47
+ select
48
+ border-color: $color
49
+ &:hover,
50
+ &.is-hovered
51
+ border-color: bulmaDarken($color, 5%)
52
+ &:focus,
53
+ &.is-focused,
54
+ &:active,
55
+ &.is-active
56
+ box-shadow: $input-focus-box-shadow-size bulmaRgba($color, 0.25)
57
+ // Sizes
58
+ &.is-small
59
+ +control-small
60
+ &.is-medium
61
+ +control-medium
62
+ &.is-large
63
+ +control-large
64
+ // Modifiers
65
+ &.is-disabled
66
+ &::after
67
+ border-color: $input-disabled-color
68
+ &.is-fullwidth
69
+ width: 100%
70
+ select
71
+ width: 100%
72
+ &.is-loading
73
+ &::after
74
+ @extend %loader
75
+ margin-top: 0
76
+ position: absolute
77
+ +ltr-position(0.625em)
78
+ top: 0.625em
79
+ transform: none
80
+ &.is-small:after
81
+ font-size: $size-small
82
+ &.is-medium:after
83
+ font-size: $size-medium
84
+ &.is-large:after
85
+ font-size: $size-large
@@ -0,0 +1,55 @@
1
+ $input-color: $text-strong !default
2
+ $input-background-color: $scheme-main !default
3
+ $input-border-color: $border !default
4
+ $input-height: $control-height !default
5
+ $input-shadow: inset 0 0.0625em 0.125em rgba($scheme-invert, 0.05) !default
6
+ $input-placeholder-color: bulmaRgba($input-color, 0.3) !default
7
+
8
+ $input-hover-color: $text-strong !default
9
+ $input-hover-border-color: $border-hover !default
10
+
11
+ $input-focus-color: $text-strong !default
12
+ $input-focus-border-color: $link !default
13
+ $input-focus-box-shadow-size: 0 0 0 0.125em !default
14
+ $input-focus-box-shadow-color: bulmaRgba($link, 0.25) !default
15
+
16
+ $input-disabled-color: $text-light !default
17
+ $input-disabled-background-color: $background !default
18
+ $input-disabled-border-color: $background !default
19
+ $input-disabled-placeholder-color: bulmaRgba($input-disabled-color, 0.3) !default
20
+
21
+ $input-arrow: $link !default
22
+
23
+ $input-icon-color: $border !default
24
+ $input-icon-active-color: $text !default
25
+
26
+ $input-radius: $radius !default
27
+
28
+ =input
29
+ @extend %control
30
+ background-color: $input-background-color
31
+ border-color: $input-border-color
32
+ border-radius: $input-radius
33
+ color: $input-color
34
+ +placeholder
35
+ color: $input-placeholder-color
36
+ &:hover,
37
+ &.is-hovered
38
+ border-color: $input-hover-border-color
39
+ &:focus,
40
+ &.is-focused,
41
+ &:active,
42
+ &.is-active
43
+ border-color: $input-focus-border-color
44
+ box-shadow: $input-focus-box-shadow-size $input-focus-box-shadow-color
45
+ &[disabled],
46
+ fieldset[disabled] &
47
+ background-color: $input-disabled-background-color
48
+ border-color: $input-disabled-border-color
49
+ box-shadow: none
50
+ color: $input-disabled-color
51
+ +placeholder
52
+ color: $input-disabled-placeholder-color
53
+
54
+ %input
55
+ +input
@@ -0,0 +1,213 @@
1
+ $label-color: $text-strong !default
2
+ $label-weight: $weight-bold !default
3
+
4
+ $help-size: $size-small !default
5
+
6
+ .label
7
+ color: $label-color
8
+ display: block
9
+ font-size: $size-normal
10
+ font-weight: $label-weight
11
+ &:not(:last-child)
12
+ margin-bottom: 0.5em
13
+ // Sizes
14
+ &.is-small
15
+ font-size: $size-small
16
+ &.is-medium
17
+ font-size: $size-medium
18
+ &.is-large
19
+ font-size: $size-large
20
+
21
+ .help
22
+ display: block
23
+ font-size: $help-size
24
+ margin-top: 0.25rem
25
+ @each $name, $pair in $colors
26
+ $color: nth($pair, 1)
27
+ &.is-#{$name}
28
+ color: $color
29
+
30
+ // Containers
31
+
32
+ .field
33
+ &:not(:last-child)
34
+ margin-bottom: 0.75rem
35
+ // Modifiers
36
+ &.has-addons
37
+ display: flex
38
+ justify-content: flex-start
39
+ .control
40
+ &:not(:last-child)
41
+ +ltr-property("margin", -1px)
42
+ &:not(:first-child):not(:last-child)
43
+ .button,
44
+ .input,
45
+ .select select
46
+ border-radius: 0
47
+ &:first-child:not(:only-child)
48
+ .button,
49
+ .input,
50
+ .select select
51
+ +ltr
52
+ border-bottom-right-radius: 0
53
+ border-top-right-radius: 0
54
+ +rtl
55
+ border-bottom-left-radius: 0
56
+ border-top-left-radius: 0
57
+ &:last-child:not(:only-child)
58
+ .button,
59
+ .input,
60
+ .select select
61
+ +ltr
62
+ border-bottom-left-radius: 0
63
+ border-top-left-radius: 0
64
+ +rtl
65
+ border-bottom-right-radius: 0
66
+ border-top-right-radius: 0
67
+ .button,
68
+ .input,
69
+ .select select
70
+ &:not([disabled])
71
+ &:hover,
72
+ &.is-hovered
73
+ z-index: 2
74
+ &:focus,
75
+ &.is-focused,
76
+ &:active,
77
+ &.is-active
78
+ z-index: 3
79
+ &:hover
80
+ z-index: 4
81
+ &.is-expanded
82
+ flex-grow: 1
83
+ flex-shrink: 1
84
+ &.has-addons-centered
85
+ justify-content: center
86
+ &.has-addons-right
87
+ justify-content: flex-end
88
+ &.has-addons-fullwidth
89
+ .control
90
+ flex-grow: 1
91
+ flex-shrink: 0
92
+ &.is-grouped
93
+ display: flex
94
+ justify-content: flex-start
95
+ & > .control
96
+ flex-shrink: 0
97
+ &:not(:last-child)
98
+ margin-bottom: 0
99
+ +ltr-property("margin", 0.75rem)
100
+ &.is-expanded
101
+ flex-grow: 1
102
+ flex-shrink: 1
103
+ &.is-grouped-centered
104
+ justify-content: center
105
+ &.is-grouped-right
106
+ justify-content: flex-end
107
+ &.is-grouped-multiline
108
+ flex-wrap: wrap
109
+ & > .control
110
+ &:last-child,
111
+ &:not(:last-child)
112
+ margin-bottom: 0.75rem
113
+ &:last-child
114
+ margin-bottom: -0.75rem
115
+ &:not(:last-child)
116
+ margin-bottom: 0
117
+ &.is-horizontal
118
+ +tablet
119
+ display: flex
120
+
121
+ .field-label
122
+ .label
123
+ font-size: inherit
124
+ +mobile
125
+ margin-bottom: 0.5rem
126
+ +tablet
127
+ flex-basis: 0
128
+ flex-grow: 1
129
+ flex-shrink: 0
130
+ +ltr-property("margin", 1.5rem)
131
+ text-align: right
132
+ &.is-small
133
+ font-size: $size-small
134
+ padding-top: 0.375em
135
+ &.is-normal
136
+ padding-top: 0.375em
137
+ &.is-medium
138
+ font-size: $size-medium
139
+ padding-top: 0.375em
140
+ &.is-large
141
+ font-size: $size-large
142
+ padding-top: 0.375em
143
+
144
+ .field-body
145
+ .field .field
146
+ margin-bottom: 0
147
+ +tablet
148
+ display: flex
149
+ flex-basis: 0
150
+ flex-grow: 5
151
+ flex-shrink: 1
152
+ .field
153
+ margin-bottom: 0
154
+ & > .field
155
+ flex-shrink: 1
156
+ &:not(.is-narrow)
157
+ flex-grow: 1
158
+ &:not(:last-child)
159
+ +ltr-property("margin", 0.75rem)
160
+
161
+ .control
162
+ box-sizing: border-box
163
+ clear: both
164
+ font-size: $size-normal
165
+ position: relative
166
+ text-align: inherit
167
+ // Modifiers
168
+ &.has-icons-left,
169
+ &.has-icons-right
170
+ .input,
171
+ .select
172
+ &:focus
173
+ & ~ .icon
174
+ color: $input-icon-active-color
175
+ &.is-small ~ .icon
176
+ font-size: $size-small
177
+ &.is-medium ~ .icon
178
+ font-size: $size-medium
179
+ &.is-large ~ .icon
180
+ font-size: $size-large
181
+ .icon
182
+ color: $input-icon-color
183
+ height: $input-height
184
+ pointer-events: none
185
+ position: absolute
186
+ top: 0
187
+ width: $input-height
188
+ z-index: 4
189
+ &.has-icons-left
190
+ .input,
191
+ .select select
192
+ padding-left: $input-height
193
+ .icon.is-left
194
+ left: 0
195
+ &.has-icons-right
196
+ .input,
197
+ .select select
198
+ padding-right: $input-height
199
+ .icon.is-right
200
+ right: 0
201
+ &.is-loading
202
+ &::after
203
+ @extend %loader
204
+ position: absolute !important
205
+ +ltr-position(0.625em)
206
+ top: 0.625em
207
+ z-index: 4
208
+ &.is-small:after
209
+ font-size: $size-small
210
+ &.is-medium:after
211
+ font-size: $size-medium
212
+ &.is-large:after
213
+ font-size: $size-large
@@ -56,7 +56,7 @@ $column-gap: 0.75rem !default
56
56
  margin-left: 60%
57
57
  .columns.is-mobile > &.is-offset-four-fifths
58
58
  margin-left: 80%
59
- @for $i from 1 through 12
59
+ @for $i from 0 through 12
60
60
  .columns.is-mobile > &.is-#{$i}
61
61
  flex: none
62
62
  width: percentage($i / 12)
@@ -113,7 +113,7 @@ $column-gap: 0.75rem !default
113
113
  margin-left: 60%
114
114
  &.is-offset-four-fifths-mobile
115
115
  margin-left: 80%
116
- @for $i from 1 through 12
116
+ @for $i from 0 through 12
117
117
  &.is-#{$i}-mobile
118
118
  flex: none
119
119
  width: percentage($i / 12)
@@ -190,7 +190,7 @@ $column-gap: 0.75rem !default
190
190
  &.is-offset-four-fifths,
191
191
  &.is-offset-four-fifths-tablet
192
192
  margin-left: 80%
193
- @for $i from 1 through 12
193
+ @for $i from 0 through 12
194
194
  &.is-#{$i},
195
195
  &.is-#{$i}-tablet
196
196
  flex: none
@@ -249,7 +249,7 @@ $column-gap: 0.75rem !default
249
249
  margin-left: 60%
250
250
  &.is-offset-four-fifths-touch
251
251
  margin-left: 80%
252
- @for $i from 1 through 12
252
+ @for $i from 0 through 12
253
253
  &.is-#{$i}-touch
254
254
  flex: none
255
255
  width: percentage($i / 12)
@@ -306,7 +306,7 @@ $column-gap: 0.75rem !default
306
306
  margin-left: 60%
307
307
  &.is-offset-four-fifths-desktop
308
308
  margin-left: 80%
309
- @for $i from 1 through 12
309
+ @for $i from 0 through 12
310
310
  &.is-#{$i}-desktop
311
311
  flex: none
312
312
  width: percentage($i / 12)
@@ -363,7 +363,7 @@ $column-gap: 0.75rem !default
363
363
  margin-left: 60%
364
364
  &.is-offset-four-fifths-widescreen
365
365
  margin-left: 80%
366
- @for $i from 1 through 12
366
+ @for $i from 0 through 12
367
367
  &.is-#{$i}-widescreen
368
368
  flex: none
369
369
  width: percentage($i / 12)
@@ -420,7 +420,7 @@ $column-gap: 0.75rem !default
420
420
  margin-left: 60%
421
421
  &.is-offset-four-fifths-fullhd
422
422
  margin-left: 80%
423
- @for $i from 1 through 12
423
+ @for $i from 0 through 12
424
424
  &.is-#{$i}-fullhd
425
425
  flex: none
426
426
  width: percentage($i / 12)