bulma-rails 0.7.4 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) 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 +1 -1
  6. data/app/assets/stylesheets/sass/base/generic.sass +23 -10
  7. data/app/assets/stylesheets/sass/base/helpers.sass +1 -276
  8. data/app/assets/stylesheets/sass/base/minireset.sass +3 -8
  9. data/app/assets/stylesheets/sass/components/_all.sass +1 -1
  10. data/app/assets/stylesheets/sass/components/breadcrumb.sass +4 -4
  11. data/app/assets/stylesheets/sass/components/card.sass +19 -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 +7 -5
  18. data/app/assets/stylesheets/sass/components/navbar.sass +43 -28
  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 +1 -1
  23. data/app/assets/stylesheets/sass/elements/box.sass +4 -4
  24. data/app/assets/stylesheets/sass/elements/button.sass +82 -32
  25. data/app/assets/stylesheets/sass/elements/container.sass +19 -17
  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 +19 -4
  30. data/app/assets/stylesheets/sass/elements/progress.sass +20 -14
  31. data/app/assets/stylesheets/sass/elements/table.sass +13 -8
  32. data/app/assets/stylesheets/sass/elements/tag.sass +34 -26
  33. data/app/assets/stylesheets/sass/elements/title.sass +9 -3
  34. data/app/assets/stylesheets/sass/form/_all.sass +9 -0
  35. data/app/assets/stylesheets/sass/form/checkbox-radio.sass +22 -0
  36. data/app/assets/stylesheets/sass/form/file.sass +182 -0
  37. data/app/assets/stylesheets/sass/form/input-textarea.sass +66 -0
  38. data/app/assets/stylesheets/sass/form/select.sass +87 -0
  39. data/app/assets/stylesheets/sass/form/shared.sass +57 -0
  40. data/app/assets/stylesheets/sass/form/tools.sass +215 -0
  41. data/app/assets/stylesheets/sass/grid/_all.sass +1 -0
  42. data/app/assets/stylesheets/sass/grid/columns.sass +7 -7
  43. data/app/assets/stylesheets/sass/grid/tiles.sass +8 -6
  44. data/app/assets/stylesheets/sass/helpers/_all.sass +12 -0
  45. data/app/assets/stylesheets/sass/helpers/color.sass +37 -0
  46. data/app/assets/stylesheets/sass/helpers/flexbox.sass +35 -0
  47. data/app/assets/stylesheets/sass/helpers/float.sass +8 -0
  48. data/app/assets/stylesheets/sass/helpers/other.sass +11 -0
  49. data/app/assets/stylesheets/sass/helpers/overflow.sass +2 -0
  50. data/app/assets/stylesheets/sass/helpers/position.sass +5 -0
  51. data/app/assets/stylesheets/sass/helpers/spacing.sass +31 -0
  52. data/app/assets/stylesheets/sass/helpers/typography.sass +98 -0
  53. data/app/assets/stylesheets/sass/helpers/visibility.sass +122 -0
  54. data/app/assets/stylesheets/sass/layout/_all.sass +1 -0
  55. data/app/assets/stylesheets/sass/layout/footer.sass +4 -1
  56. data/app/assets/stylesheets/sass/layout/hero.sass +26 -35
  57. data/app/assets/stylesheets/sass/utilities/_all.sass +1 -0
  58. data/app/assets/stylesheets/sass/utilities/controls.sass +3 -3
  59. data/app/assets/stylesheets/sass/utilities/derived-variables.sass +32 -10
  60. data/app/assets/stylesheets/sass/utilities/functions.sass +68 -15
  61. data/app/assets/stylesheets/sass/utilities/initial-variables.sass +10 -4
  62. data/app/assets/stylesheets/sass/utilities/mixins.sass +31 -7
  63. data/bulma-rails.gemspec +2 -2
  64. metadata +23 -7
  65. data/app/assets/stylesheets/sass/components/list.sass +0 -39
@@ -1,8 +1,13 @@
1
- $pagination-color: $grey-darker !default
2
- $pagination-border-color: $grey-lighter !default
1
+ $pagination-color: $text-strong !default
2
+ $pagination-border-color: $border !default
3
3
  $pagination-margin: -0.25rem !default
4
4
  $pagination-min-width: $control-height !default
5
5
 
6
+ $pagination-item-font-size: 1em !default
7
+ $pagination-item-margin: 0.25rem !default
8
+ $pagination-item-padding-left: 0.5em !default
9
+ $pagination-item-padding-right: 0.5em !default
10
+
6
11
  $pagination-hover-color: $link-hover !default
7
12
  $pagination-hover-border-color: $link-hover-border !default
8
13
 
@@ -12,9 +17,9 @@ $pagination-focus-border-color: $link-focus-border !default
12
17
  $pagination-active-color: $link-active !default
13
18
  $pagination-active-border-color: $link-active-border !default
14
19
 
15
- $pagination-disabled-color: $grey !default
16
- $pagination-disabled-background-color: $grey-lighter !default
17
- $pagination-disabled-border-color: $grey-lighter !default
20
+ $pagination-disabled-color: $text-light !default
21
+ $pagination-disabled-background-color: $border !default
22
+ $pagination-disabled-border-color: $border !default
18
23
 
19
24
  $pagination-current-color: $link-invert !default
20
25
  $pagination-current-background-color: $link !default
@@ -22,9 +27,10 @@ $pagination-current-border-color: $link !default
22
27
 
23
28
  $pagination-ellipsis-color: $grey-light !default
24
29
 
25
- $pagination-shadow-inset: inset 0 1px 2px rgba($black, 0.2)
30
+ $pagination-shadow-inset: inset 0 1px 2px rgba($scheme-invert, 0.2)
26
31
 
27
32
  .pagination
33
+ @extend %block
28
34
  font-size: $size-normal
29
35
  margin: $pagination-margin
30
36
  // Sizes
@@ -56,11 +62,11 @@ $pagination-shadow-inset: inset 0 1px 2px rgba($black, 0.2)
56
62
  .pagination-ellipsis
57
63
  @extend %control
58
64
  @extend %unselectable
59
- font-size: 1em
60
- padding-left: 0.5em
61
- padding-right: 0.5em
65
+ font-size: $pagination-item-font-size
62
66
  justify-content: center
63
- margin: 0.25rem
67
+ margin: $pagination-item-margin
68
+ padding-left: $pagination-item-padding-left
69
+ padding-right: $pagination-item-padding-right
64
70
  text-align: center
65
71
 
66
72
  .pagination-previous,
@@ -1,13 +1,17 @@
1
- $panel-item-border: 1px solid $border !default
1
+ $panel-margin: $block-spacing !default
2
+ $panel-item-border: 1px solid $border-light !default
3
+ $panel-radius: $radius-large !default
4
+ $panel-shadow: 0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0px 0 1px rgba($scheme-invert, 0.02) !default
2
5
 
3
- $panel-heading-background-color: $background !default
6
+ $panel-heading-background-color: $border-light !default
4
7
  $panel-heading-color: $text-strong !default
5
8
  $panel-heading-line-height: 1.25 !default
6
- $panel-heading-padding: 0.5em 0.75em !default
9
+ $panel-heading-padding: 0.75em 1em !default
7
10
  $panel-heading-radius: $radius !default
8
11
  $panel-heading-size: 1.25em !default
9
- $panel-heading-weight: $weight-light !default
12
+ $panel-heading-weight: $weight-bold !default
10
13
 
14
+ $panel-tabs-font-size: 0.875em !default
11
15
  $panel-tab-border-bottom: 1px solid $border !default
12
16
  $panel-tab-active-border-bottom-color: $link-active-border !default
13
17
  $panel-tab-active-color: $link-active !default
@@ -22,24 +26,35 @@ $panel-block-active-color: $link-active !default
22
26
  $panel-block-active-icon-color: $link !default
23
27
 
24
28
  $panel-icon-color: $text-light !default
29
+ $panel-colors: $colors !default
25
30
 
26
31
  .panel
32
+ border-radius: $panel-radius
33
+ box-shadow: $panel-shadow
27
34
  font-size: $size-normal
28
35
  &:not(:last-child)
29
- margin-bottom: 1.5rem
36
+ margin-bottom: $panel-margin
37
+ // Colors
38
+ @each $name, $components in $panel-colors
39
+ $color: nth($components, 1)
40
+ $color-invert: nth($components, 2)
41
+ &.is-#{$name}
42
+ .panel-heading
43
+ background-color: $color
44
+ color: $color-invert
45
+ .panel-tabs a.is-active
46
+ border-bottom-color: $color
47
+ .panel-block.is-active .panel-icon
48
+ color: $color
30
49
 
31
- .panel-heading,
32
50
  .panel-tabs,
33
51
  .panel-block
34
- border-bottom: $panel-item-border
35
- border-left: $panel-item-border
36
- border-right: $panel-item-border
37
- &:first-child
38
- border-top: $panel-item-border
52
+ &:not(:last-child)
53
+ border-bottom: $panel-item-border
39
54
 
40
55
  .panel-heading
41
56
  background-color: $panel-heading-background-color
42
- border-radius: $panel-heading-radius $panel-heading-radius 0 0
57
+ border-radius: $panel-radius $panel-radius 0 0
43
58
  color: $panel-heading-color
44
59
  font-size: $panel-heading-size
45
60
  font-weight: $panel-heading-weight
@@ -49,7 +64,7 @@ $panel-icon-color: $text-light !default
49
64
  .panel-tabs
50
65
  align-items: flex-end
51
66
  display: flex
52
- font-size: 0.875em
67
+ font-size: $panel-tabs-font-size
53
68
  justify-content: center
54
69
  a
55
70
  border-bottom: $panel-tab-border-bottom
@@ -73,7 +88,7 @@ $panel-icon-color: $text-light !default
73
88
  justify-content: flex-start
74
89
  padding: 0.5em 0.75em
75
90
  input[type="checkbox"]
76
- margin-right: 0.75em
91
+ +ltr-property("margin", 0.75em)
77
92
  & > .control
78
93
  flex-grow: 1
79
94
  flex-shrink: 1
@@ -85,6 +100,9 @@ $panel-icon-color: $text-light !default
85
100
  color: $panel-block-active-color
86
101
  .panel-icon
87
102
  color: $panel-block-active-icon-color
103
+ &:last-child
104
+ border-bottom-left-radius: $panel-radius
105
+ border-bottom-right-radius: $panel-radius
88
106
 
89
107
  a.panel-block,
90
108
  label.panel-block
@@ -95,7 +113,7 @@ label.panel-block
95
113
  .panel-icon
96
114
  +fa(14px, 1em)
97
115
  color: $panel-icon-color
98
- margin-right: 0.75em
116
+ +ltr-property("margin", 0.75em)
99
117
  .fa
100
118
  font-size: inherit
101
119
  line-height: inherit
@@ -12,7 +12,7 @@ $tabs-boxed-link-radius: $radius !default
12
12
  $tabs-boxed-link-hover-background-color: $background !default
13
13
  $tabs-boxed-link-hover-border-bottom-color: $border !default
14
14
 
15
- $tabs-boxed-link-active-background-color: $white !default
15
+ $tabs-boxed-link-active-background-color: $scheme-main !default
16
16
  $tabs-boxed-link-active-border-color: $border !default
17
17
  $tabs-boxed-link-active-border-bottom-color: transparent !default
18
18
 
@@ -78,9 +78,9 @@ $tabs-toggle-link-active-color: $link-invert !default
78
78
  padding-left: 0.75em
79
79
  .icon
80
80
  &:first-child
81
- margin-right: 0.5em
81
+ +ltr-property("margin", 0.5em)
82
82
  &:last-child
83
- margin-left: 0.5em
83
+ +ltr-property("margin", 0.5em, false)
84
84
  // Alignment
85
85
  &.is-centered
86
86
  ul
@@ -92,7 +92,10 @@ $tabs-toggle-link-active-color: $link-invert !default
92
92
  &.is-boxed
93
93
  a
94
94
  border: 1px solid transparent
95
- border-radius: $tabs-boxed-link-radius $tabs-boxed-link-radius 0 0
95
+ +ltr
96
+ border-radius: $tabs-boxed-link-radius $tabs-boxed-link-radius 0 0
97
+ +rtl
98
+ border-radius: 0 0 $tabs-boxed-link-radius $tabs-boxed-link-radius
96
99
  &:hover
97
100
  background-color: $tabs-boxed-link-hover-background-color
98
101
  border-bottom-color: $tabs-boxed-link-hover-border-bottom-color
@@ -119,11 +122,21 @@ $tabs-toggle-link-active-color: $link-invert !default
119
122
  z-index: 2
120
123
  li
121
124
  & + li
122
- margin-left: -#{$tabs-toggle-link-border-width}
125
+ +ltr-property("margin", -#{$tabs-toggle-link-border-width}, false)
123
126
  &:first-child a
124
- border-radius: $tabs-toggle-link-radius 0 0 $tabs-toggle-link-radius
127
+ +ltr
128
+ border-top-left-radius: $tabs-toggle-link-radius
129
+ border-bottom-left-radius: $tabs-toggle-link-radius
130
+ +rtl
131
+ border-top-right-radius: $tabs-toggle-link-radius
132
+ border-bottom-right-radius: $tabs-toggle-link-radius
125
133
  &:last-child a
126
- border-radius: 0 $tabs-toggle-link-radius $tabs-toggle-link-radius 0
134
+ +ltr
135
+ border-top-right-radius: $tabs-toggle-link-radius
136
+ border-bottom-right-radius: $tabs-toggle-link-radius
137
+ +rtl
138
+ border-top-left-radius: $tabs-toggle-link-radius
139
+ border-bottom-left-radius: $tabs-toggle-link-radius
127
140
  &.is-active
128
141
  a
129
142
  background-color: $tabs-toggle-link-active-background-color
@@ -135,13 +148,23 @@ $tabs-toggle-link-active-color: $link-invert !default
135
148
  &.is-toggle-rounded
136
149
  li
137
150
  &:first-child a
138
- border-bottom-left-radius: $radius-rounded
139
- border-top-left-radius: $radius-rounded
140
- padding-left: 1.25em
151
+ +ltr
152
+ border-bottom-left-radius: $radius-rounded
153
+ border-top-left-radius: $radius-rounded
154
+ padding-left: 1.25em
155
+ +rtl
156
+ border-bottom-right-radius: $radius-rounded
157
+ border-top-right-radius: $radius-rounded
158
+ padding-right: 1.25em
141
159
  &:last-child a
142
- border-bottom-right-radius: $radius-rounded
143
- border-top-right-radius: $radius-rounded
144
- padding-right: 1.25em
160
+ +ltr
161
+ border-bottom-right-radius: $radius-rounded
162
+ border-top-right-radius: $radius-rounded
163
+ padding-right: 1.25em
164
+ +rtl
165
+ border-bottom-left-radius: $radius-rounded
166
+ border-top-left-radius: $radius-rounded
167
+ padding-left: 1.25em
145
168
  // Sizes
146
169
  &.is-small
147
170
  font-size: $size-small
@@ -1,10 +1,10 @@
1
+ /* Bulma Elements */
1
2
  @charset "utf-8"
2
3
 
3
4
  @import "box.sass"
4
5
  @import "button.sass"
5
6
  @import "container.sass"
6
7
  @import "content.sass"
7
- @import "form.sass"
8
8
  @import "icon.sass"
9
9
  @import "image.sass"
10
10
  @import "notification.sass"
@@ -1,11 +1,11 @@
1
1
  $box-color: $text !default
2
- $box-background-color: $white !default
2
+ $box-background-color: $scheme-main !default
3
3
  $box-radius: $radius-large !default
4
- $box-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default
4
+ $box-shadow: 0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0px 0 1px rgba($scheme-invert, 0.02) !default
5
5
  $box-padding: 1.25rem !default
6
6
 
7
- $box-link-hover-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px $link !default
8
- $box-link-active-shadow: inset 0 1px 2px rgba($black, 0.2), 0 0 0 1px $link !default
7
+ $box-link-hover-shadow: 0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0 0 1px $link !default
8
+ $box-link-active-shadow: inset 0 1px 2px rgba($scheme-invert, 0.2), 0 0 0 1px $link !default
9
9
 
10
10
  .box
11
11
  @extend %block
@@ -1,11 +1,12 @@
1
- $button-color: $grey-darker !default
2
- $button-background-color: $white !default
1
+ $button-color: $text-strong !default
2
+ $button-background-color: $scheme-main !default
3
+ $button-family: false !default
3
4
 
4
- $button-border-color: $grey-lighter !default
5
+ $button-border-color: $border !default
5
6
  $button-border-width: $control-border-width !default
6
7
 
7
- $button-padding-vertical: calc(0.375em - #{$button-border-width}) !default
8
- $button-padding-horizontal: 0.75em !default
8
+ $button-padding-vertical: calc(0.5em - #{$button-border-width}) !default
9
+ $button-padding-horizontal: 1em !default
9
10
 
10
11
  $button-hover-color: $link-hover !default
11
12
  $button-hover-border-color: $link-hover-border !default
@@ -13,23 +14,26 @@ $button-hover-border-color: $link-hover-border !default
13
14
  $button-focus-color: $link-focus !default
14
15
  $button-focus-border-color: $link-focus-border !default
15
16
  $button-focus-box-shadow-size: 0 0 0 0.125em !default
16
- $button-focus-box-shadow-color: rgba($link, 0.25) !default
17
+ $button-focus-box-shadow-color: bulmaRgba($link, 0.25) !default
17
18
 
18
19
  $button-active-color: $link-active !default
19
20
  $button-active-border-color: $link-active-border !default
20
21
 
21
22
  $button-text-color: $text !default
23
+ $button-text-decoration: underline !default
22
24
  $button-text-hover-background-color: $background !default
23
25
  $button-text-hover-color: $text-strong !default
24
26
 
25
- $button-disabled-background-color: $white !default
26
- $button-disabled-border-color: $grey-lighter !default
27
+ $button-disabled-background-color: $scheme-main !default
28
+ $button-disabled-border-color: $border !default
27
29
  $button-disabled-shadow: none !default
28
30
  $button-disabled-opacity: 0.5 !default
29
31
 
30
- $button-static-color: $grey !default
31
- $button-static-background-color: $white-ter !default
32
- $button-static-border-color: $grey-lighter !default
32
+ $button-static-color: $text-light !default
33
+ $button-static-background-color: $scheme-main-ter !default
34
+ $button-static-border-color: $border !default
35
+
36
+ $button-colors: $colors !default
33
37
 
34
38
  // The button sizes use mixins so they can be used at different breakpoints
35
39
  =button-small
@@ -50,6 +54,8 @@ $button-static-border-color: $grey-lighter !default
50
54
  border-width: $button-border-width
51
55
  color: $button-color
52
56
  cursor: pointer
57
+ @if $button-family
58
+ font-family: $button-family
53
59
  justify-content: center
54
60
  padding-bottom: $button-padding-vertical
55
61
  padding-left: $button-padding-horizontal
@@ -67,14 +73,14 @@ $button-static-border-color: $grey-lighter !default
67
73
  height: 1.5em
68
74
  width: 1.5em
69
75
  &:first-child:not(:last-child)
70
- margin-left: calc(-0.375em - #{$button-border-width})
71
- margin-right: 0.1875em
76
+ +ltr-property("margin", calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width}), false)
77
+ +ltr-property("margin", $button-padding-horizontal / 4)
72
78
  &:last-child:not(:first-child)
73
- margin-left: 0.1875em
74
- margin-right: calc(-0.375em - #{$button-border-width})
79
+ +ltr-property("margin", $button-padding-horizontal / 4, false)
80
+ +ltr-property("margin", calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width}))
75
81
  &:first-child:last-child
76
- margin-left: calc(-0.375em - #{$button-border-width})
77
- margin-right: calc(-0.375em - #{$button-border-width})
82
+ margin-left: calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width})
83
+ margin-right: calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width})
78
84
  // States
79
85
  &:hover,
80
86
  &.is-hovered
@@ -95,7 +101,7 @@ $button-static-border-color: $grey-lighter !default
95
101
  background-color: transparent
96
102
  border-color: transparent
97
103
  color: $button-text-color
98
- text-decoration: underline
104
+ text-decoration: $button-text-decoration
99
105
  &:hover,
100
106
  &.is-hovered,
101
107
  &:focus,
@@ -104,14 +110,14 @@ $button-static-border-color: $grey-lighter !default
104
110
  color: $button-text-hover-color
105
111
  &:active,
106
112
  &.is-active
107
- background-color: darken($button-text-hover-background-color, 5%)
113
+ background-color: bulmaDarken($button-text-hover-background-color, 5%)
108
114
  color: $button-text-hover-color
109
115
  &[disabled],
110
116
  fieldset[disabled] &
111
117
  background-color: transparent
112
118
  border-color: transparent
113
119
  box-shadow: none
114
- @each $name, $pair in $colors
120
+ @each $name, $pair in $button-colors
115
121
  $color: nth($pair, 1)
116
122
  $color-invert: nth($pair, 2)
117
123
  &.is-#{$name}
@@ -120,7 +126,7 @@ $button-static-border-color: $grey-lighter !default
120
126
  color: $color-invert
121
127
  &:hover,
122
128
  &.is-hovered
123
- background-color: darken($color, 2.5%)
129
+ background-color: bulmaDarken($color, 2.5%)
124
130
  border-color: transparent
125
131
  color: $color-invert
126
132
  &:focus,
@@ -128,10 +134,10 @@ $button-static-border-color: $grey-lighter !default
128
134
  border-color: transparent
129
135
  color: $color-invert
130
136
  &:not(:active)
131
- box-shadow: $button-focus-box-shadow-size rgba($color, 0.25)
137
+ box-shadow: $button-focus-box-shadow-size bulmaRgba($color, 0.25)
132
138
  &:active,
133
139
  &.is-active
134
- background-color: darken($color, 5%)
140
+ background-color: bulmaDarken($color, 5%)
135
141
  border-color: transparent
136
142
  color: $color-invert
137
143
  &[disabled],
@@ -142,8 +148,9 @@ $button-static-border-color: $grey-lighter !default
142
148
  &.is-inverted
143
149
  background-color: $color-invert
144
150
  color: $color
145
- &:hover
146
- background-color: darken($color-invert, 5%)
151
+ &:hover,
152
+ &.is-hovered
153
+ background-color: bulmaDarken($color-invert, 5%)
147
154
  &[disabled],
148
155
  fieldset[disabled] &
149
156
  background-color: $color-invert
@@ -158,13 +165,21 @@ $button-static-border-color: $grey-lighter !default
158
165
  border-color: $color
159
166
  color: $color
160
167
  &:hover,
161
- &:focus
168
+ &.is-hovered,
169
+ &:focus,
170
+ &.is-focused
162
171
  background-color: $color
163
172
  border-color: $color
164
173
  color: $color-invert
165
174
  &.is-loading
166
175
  &::after
167
176
  border-color: transparent transparent $color $color !important
177
+ &:hover,
178
+ &.is-hovered,
179
+ &:focus,
180
+ &.is-focused
181
+ &::after
182
+ border-color: transparent transparent $color-invert $color-invert !important
168
183
  &[disabled],
169
184
  fieldset[disabled] &
170
185
  background-color: transparent
@@ -176,15 +191,41 @@ $button-static-border-color: $grey-lighter !default
176
191
  border-color: $color-invert
177
192
  color: $color-invert
178
193
  &:hover,
179
- &:focus
194
+ &.is-hovered,
195
+ &:focus,
196
+ &.is-focused
180
197
  background-color: $color-invert
181
198
  color: $color
199
+ &.is-loading
200
+ &:hover,
201
+ &.is-hovered,
202
+ &:focus,
203
+ &.is-focused
204
+ &::after
205
+ border-color: transparent transparent $color $color !important
182
206
  &[disabled],
183
207
  fieldset[disabled] &
184
208
  background-color: transparent
185
209
  border-color: $color-invert
186
210
  box-shadow: none
187
211
  color: $color-invert
212
+ // If light and dark colors are provided
213
+ @if length($pair) >= 4
214
+ $color-light: nth($pair, 3)
215
+ $color-dark: nth($pair, 4)
216
+ &.is-light
217
+ background-color: $color-light
218
+ color: $color-dark
219
+ &:hover,
220
+ &.is-hovered
221
+ background-color: bulmaDarken($color-light, 2.5%)
222
+ border-color: transparent
223
+ color: $color-dark
224
+ &:active,
225
+ &.is-active
226
+ background-color: bulmaDarken($color-light, 5%)
227
+ border-color: transparent
228
+ color: $color-dark
188
229
  // Sizes
189
230
  &.is-small
190
231
  +button-small
@@ -219,8 +260,8 @@ $button-static-border-color: $grey-lighter !default
219
260
  pointer-events: none
220
261
  &.is-rounded
221
262
  border-radius: $radius-rounded
222
- padding-left: 1em
223
- padding-right: 1em
263
+ padding-left: calc(#{$button-padding-horizontal} + 0.25em)
264
+ padding-right: calc(#{$button-padding-horizontal} + 0.25em)
224
265
 
225
266
  .buttons
226
267
  align-items: center
@@ -230,7 +271,7 @@ $button-static-border-color: $grey-lighter !default
230
271
  .button
231
272
  margin-bottom: 0.5rem
232
273
  &:not(:last-child):not(.is-fullwidth)
233
- margin-right: 0.5rem
274
+ +ltr-property("margin", 0.5rem)
234
275
  &:last-child
235
276
  margin-bottom: -0.5rem
236
277
  &:not(:last-child)
@@ -253,9 +294,9 @@ $button-static-border-color: $grey-lighter !default
253
294
  &:not(:last-child)
254
295
  border-bottom-right-radius: 0
255
296
  border-top-right-radius: 0
256
- margin-right: -1px
297
+ +ltr-property("margin", -1px)
257
298
  &:last-child
258
- margin-right: 0
299
+ +ltr-property("margin", 0)
259
300
  &:hover,
260
301
  &.is-hovered
261
302
  z-index: 2
@@ -269,7 +310,16 @@ $button-static-border-color: $grey-lighter !default
269
310
  z-index: 4
270
311
  &.is-expanded
271
312
  flex-grow: 1
313
+ flex-shrink: 1
272
314
  &.is-centered
273
315
  justify-content: center
316
+ &:not(.has-addons)
317
+ .button:not(.is-fullwidth)
318
+ margin-left: 0.25rem
319
+ margin-right: 0.25rem
274
320
  &.is-right
275
321
  justify-content: flex-end
322
+ &:not(.has-addons)
323
+ .button:not(.is-fullwidth)
324
+ margin-left: 0.25rem
325
+ margin-right: 0.25rem