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,10 +1,10 @@
1
+ /* Bulma Components */
1
2
  @charset "utf-8"
2
3
 
3
4
  @import "breadcrumb.sass"
4
5
  @import "card.sass"
5
6
  @import "dropdown.sass"
6
7
  @import "level.sass"
7
- @import "list.sass"
8
8
  @import "media.sass"
9
9
  @import "menu.sass"
10
10
  @import "message.sass"
@@ -5,7 +5,7 @@ $breadcrumb-item-active-color: $text-strong !default
5
5
  $breadcrumb-item-padding-vertical: 0 !default
6
6
  $breadcrumb-item-padding-horizontal: 0.75em !default
7
7
 
8
- $breadcrumb-item-separator-color: $grey-light !default
8
+ $breadcrumb-item-separator-color: $border-hover !default
9
9
 
10
10
  .breadcrumb
11
11
  @extend %block
@@ -24,7 +24,7 @@ $breadcrumb-item-separator-color: $grey-light !default
24
24
  align-items: center
25
25
  display: flex
26
26
  &:first-child a
27
- padding-left: 0
27
+ +ltr-property("padding", 0, false)
28
28
  &.is-active
29
29
  a
30
30
  color: $breadcrumb-item-active-color
@@ -41,9 +41,9 @@ $breadcrumb-item-separator-color: $grey-light !default
41
41
  justify-content: flex-start
42
42
  .icon
43
43
  &:first-child
44
- margin-right: 0.5em
44
+ +ltr-property("margin", 0.5em)
45
45
  &:last-child
46
- margin-left: 0.5em
46
+ +ltr-property("margin", 0.5em, false)
47
47
  // Alignment
48
48
  &.is-centered
49
49
  ol,
@@ -1,22 +1,31 @@
1
1
  $card-color: $text !default
2
- $card-background-color: $white !default
3
- $card-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default
2
+ $card-background-color: $scheme-main !default
3
+ $card-shadow: 0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0px 0 1px rgba($scheme-invert, 0.02) !default
4
+ $card-radius: 0.25rem !default
5
+ $card-overflow: hidden !default
4
6
 
5
7
  $card-header-background-color: transparent !default
6
8
  $card-header-color: $text-strong !default
7
- $card-header-shadow: 0 1px 2px rgba($black, 0.1) !default
9
+ $card-header-padding: 0.75rem 1rem !default
10
+ $card-header-shadow: 0 0.125em 0.25em rgba($scheme-invert, 0.1) !default
8
11
  $card-header-weight: $weight-bold !default
9
12
 
10
13
  $card-content-background-color: transparent !default
14
+ $card-content-padding: 1.5rem !default
11
15
 
12
16
  $card-footer-background-color: transparent !default
13
- $card-footer-border-top: 1px solid $border !default
17
+ $card-footer-border-top: 1px solid $border-light !default
18
+ $card-footer-padding: 0.75rem !default
19
+
20
+ $card-media-margin: $block-spacing !default
14
21
 
15
22
  .card
16
23
  background-color: $card-background-color
24
+ border-radius: $card-radius
17
25
  box-shadow: $card-shadow
18
26
  color: $card-color
19
27
  max-width: 100%
28
+ overflow: $card-overflow
20
29
  position: relative
21
30
 
22
31
  .card-header
@@ -31,7 +40,7 @@ $card-footer-border-top: 1px solid $border !default
31
40
  display: flex
32
41
  flex-grow: 1
33
42
  font-weight: $card-header-weight
34
- padding: 0.75rem
43
+ padding: $card-header-padding
35
44
  &.is-centered
36
45
  justify-content: center
37
46
 
@@ -40,7 +49,7 @@ $card-footer-border-top: 1px solid $border !default
40
49
  cursor: pointer
41
50
  display: flex
42
51
  justify-content: center
43
- padding: 0.75rem
52
+ padding: $card-header-padding
44
53
 
45
54
  .card-image
46
55
  display: block
@@ -48,7 +57,7 @@ $card-footer-border-top: 1px solid $border !default
48
57
 
49
58
  .card-content
50
59
  background-color: $card-content-background-color
51
- padding: 1.5rem
60
+ padding: $card-content-padding
52
61
 
53
62
  .card-footer
54
63
  background-color: $card-footer-background-color
@@ -63,12 +72,12 @@ $card-footer-border-top: 1px solid $border !default
63
72
  flex-grow: 1
64
73
  flex-shrink: 0
65
74
  justify-content: center
66
- padding: 0.75rem
75
+ padding: $card-footer-padding
67
76
  &:not(:last-child)
68
- border-right: $card-footer-border-top
77
+ +ltr-property("border", $card-footer-border-top)
69
78
 
70
79
  // Combinations
71
80
 
72
81
  .card
73
82
  .media:not(:last-child)
74
- margin-bottom: 0.75rem
83
+ margin-bottom: $card-media-margin
@@ -1,17 +1,21 @@
1
- $dropdown-content-background-color: $white !default
1
+ $dropdown-menu-min-width: 12rem !default
2
+
3
+ $dropdown-content-background-color: $scheme-main !default
2
4
  $dropdown-content-arrow: $link !default
3
5
  $dropdown-content-offset: 4px !default
6
+ $dropdown-content-padding-bottom: 0.5rem !default
7
+ $dropdown-content-padding-top: 0.5rem !default
4
8
  $dropdown-content-radius: $radius !default
5
- $dropdown-content-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default
9
+ $dropdown-content-shadow: 0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0px 0 1px rgba($scheme-invert, 0.02) !default
6
10
  $dropdown-content-z: 20 !default
7
11
 
8
- $dropdown-item-color: $grey-dark !default
9
- $dropdown-item-hover-color: $black !default
12
+ $dropdown-item-color: $text !default
13
+ $dropdown-item-hover-color: $scheme-invert !default
10
14
  $dropdown-item-hover-background-color: $background !default
11
15
  $dropdown-item-active-color: $link-invert !default
12
16
  $dropdown-item-active-background-color: $link !default
13
17
 
14
- $dropdown-divider-background-color: $border !default
18
+ $dropdown-divider-background-color: $border-light !default
15
19
 
16
20
  .dropdown
17
21
  display: inline-flex
@@ -34,8 +38,8 @@ $dropdown-divider-background-color: $border !default
34
38
 
35
39
  .dropdown-menu
36
40
  display: none
37
- left: 0
38
- min-width: 12rem
41
+ +ltr-position(0, false)
42
+ min-width: $dropdown-menu-min-width
39
43
  padding-top: $dropdown-content-offset
40
44
  position: absolute
41
45
  top: 100%
@@ -45,8 +49,8 @@ $dropdown-divider-background-color: $border !default
45
49
  background-color: $dropdown-content-background-color
46
50
  border-radius: $dropdown-content-radius
47
51
  box-shadow: $dropdown-content-shadow
48
- padding-bottom: 0.5rem
49
- padding-top: 0.5rem
52
+ padding-bottom: $dropdown-content-padding-bottom
53
+ padding-top: $dropdown-content-padding-top
50
54
 
51
55
  .dropdown-item
52
56
  color: $dropdown-item-color
@@ -58,8 +62,8 @@ $dropdown-divider-background-color: $border !default
58
62
 
59
63
  a.dropdown-item,
60
64
  button.dropdown-item
61
- padding-right: 3rem
62
- text-align: left
65
+ +ltr-property("padding", 3rem)
66
+ text-align: inherit
63
67
  white-space: nowrap
64
68
  width: 100%
65
69
  &:hover
@@ -1,3 +1,5 @@
1
+ $level-item-spacing: ($block-spacing / 2) !default
2
+
1
3
  .level
2
4
  @extend %block
3
5
  align-items: center
@@ -18,7 +20,7 @@
18
20
  .level-item
19
21
  &:not(:last-child)
20
22
  margin-bottom: 0
21
- margin-right: 0.75rem
23
+ +ltr-property("margin", $level-item-spacing)
22
24
  &:not(.is-narrow)
23
25
  flex-grow: 1
24
26
  // Responsiveness
@@ -41,7 +43,7 @@
41
43
  // Responsiveness
42
44
  +mobile
43
45
  &:not(:last-child)
44
- margin-bottom: 0.75rem
46
+ margin-bottom: $level-item-spacing
45
47
 
46
48
  .level-left,
47
49
  .level-right
@@ -55,7 +57,7 @@
55
57
  // Responsiveness
56
58
  +tablet
57
59
  &:not(:last-child)
58
- margin-right: 0.75rem
60
+ +ltr-property("margin", $level-item-spacing)
59
61
 
60
62
  .level-left
61
63
  align-items: center
@@ -1,11 +1,15 @@
1
+ $media-border-color: bulmaRgba($border, 0.5) !default
2
+ $media-spacing: 1rem
3
+ $media-spacing-large: 1.5rem
4
+
1
5
  .media
2
6
  align-items: flex-start
3
7
  display: flex
4
- text-align: left
8
+ text-align: inherit
5
9
  .content:not(:last-child)
6
10
  margin-bottom: 0.75rem
7
11
  .media
8
- border-top: 1px solid rgba($border, 0.5)
12
+ border-top: 1px solid $media-border-color
9
13
  display: flex
10
14
  padding-top: 0.75rem
11
15
  .content:not(:last-child),
@@ -16,14 +20,14 @@
16
20
  & + .media
17
21
  margin-top: 0.5rem
18
22
  & + .media
19
- border-top: 1px solid rgba($border, 0.5)
20
- margin-top: 1rem
21
- padding-top: 1rem
23
+ border-top: 1px solid $media-border-color
24
+ margin-top: $media-spacing
25
+ padding-top: $media-spacing
22
26
  // Sizes
23
27
  &.is-large
24
28
  & + .media
25
- margin-top: 1.5rem
26
- padding-top: 1.5rem
29
+ margin-top: $media-spacing-large
30
+ padding-top: $media-spacing-large
27
31
 
28
32
  .media-left,
29
33
  .media-right
@@ -32,16 +36,16 @@
32
36
  flex-shrink: 0
33
37
 
34
38
  .media-left
35
- margin-right: 1rem
39
+ +ltr-property("margin", $media-spacing)
36
40
 
37
41
  .media-right
38
- margin-left: 1rem
42
+ +ltr-property("margin", $media-spacing, false)
39
43
 
40
44
  .media-content
41
45
  flex-basis: auto
42
46
  flex-grow: 1
43
47
  flex-shrink: 1
44
- text-align: left
48
+ text-align: inherit
45
49
 
46
50
  +mobile
47
51
  .media-content
@@ -6,8 +6,15 @@ $menu-item-active-color: $link-invert !default
6
6
  $menu-item-active-background-color: $link !default
7
7
 
8
8
  $menu-list-border-left: 1px solid $border !default
9
+ $menu-list-line-height: 1.25 !default
10
+ $menu-list-link-padding: 0.5em 0.75em !default
11
+ $menu-nested-list-margin: 0.75em !default
12
+ $menu-nested-list-padding-left: 0.75em !default
9
13
 
10
14
  $menu-label-color: $text-light !default
15
+ $menu-label-font-size: 0.75em !default
16
+ $menu-label-letter-spacing: 0.1em !default
17
+ $menu-label-spacing: 1em !default
11
18
 
12
19
  .menu
13
20
  font-size: $size-normal
@@ -20,12 +27,12 @@ $menu-label-color: $text-light !default
20
27
  font-size: $size-large
21
28
 
22
29
  .menu-list
23
- line-height: 1.25
30
+ line-height: $menu-list-line-height
24
31
  a
25
32
  border-radius: $menu-item-radius
26
33
  color: $menu-item-color
27
34
  display: block
28
- padding: 0.5em 0.75em
35
+ padding: $menu-list-link-padding
29
36
  &:hover
30
37
  background-color: $menu-item-hover-background-color
31
38
  color: $menu-item-hover-color
@@ -35,16 +42,16 @@ $menu-label-color: $text-light !default
35
42
  color: $menu-item-active-color
36
43
  li
37
44
  ul
38
- border-left: $menu-list-border-left
39
- margin: 0.75em
40
- padding-left: 0.75em
45
+ +ltr-property("border", $menu-list-border-left, false)
46
+ margin: $menu-nested-list-margin
47
+ +ltr-property("padding", $menu-nested-list-padding-left, false)
41
48
 
42
49
  .menu-label
43
50
  color: $menu-label-color
44
- font-size: 0.75em
45
- letter-spacing: 0.1em
51
+ font-size: $menu-label-font-size
52
+ letter-spacing: $menu-label-letter-spacing
46
53
  text-transform: uppercase
47
54
  &:not(:first-child)
48
- margin-top: 1em
55
+ margin-top: $menu-label-spacing
49
56
  &:not(:last-child)
50
- margin-bottom: 1em
57
+ margin-bottom: $menu-label-spacing
@@ -13,10 +13,11 @@ $message-body-color: $text !default
13
13
  $message-body-padding: 1.25em 1.5em !default
14
14
  $message-body-radius: $radius !default
15
15
 
16
- $message-body-pre-background-color: $white !default
16
+ $message-body-pre-background-color: $scheme-main !default
17
17
  $message-body-pre-code-background-color: transparent !default
18
18
 
19
19
  $message-header-body-border-width: 0 !default
20
+ $message-colors: $colors !default
20
21
 
21
22
  .message
22
23
  @extend %block
@@ -36,21 +37,33 @@ $message-header-body-border-width: 0 !default
36
37
  &.is-large
37
38
  font-size: $size-large
38
39
  // Colors
39
- @each $name, $pair in $colors
40
- $color: nth($pair, 1)
41
- $color-invert: nth($pair, 2)
42
- $color-lightning: max((100% - lightness($color)) - 2%, 0%)
43
- $color-luminance: colorLuminance($color)
44
- $darken-percentage: $color-luminance * 70%
45
- $desaturate-percentage: $color-luminance * 30%
40
+ @each $name, $components in $message-colors
41
+ $color: nth($components, 1)
42
+ $color-invert: nth($components, 2)
43
+ $color-light: null
44
+ $color-dark: null
45
+
46
+ @if length($components) >= 3
47
+ $color-light: nth($components, 3)
48
+ @if length($components) >= 4
49
+ $color-dark: nth($components, 4)
50
+ @else
51
+ $color-luminance: colorLuminance($color)
52
+ $darken-percentage: $color-luminance * 70%
53
+ $desaturate-percentage: $color-luminance * 30%
54
+ $color-dark: desaturate(darken($color, $darken-percentage), $desaturate-percentage)
55
+ @else
56
+ $color-lightning: max((100% - lightness($color)) - 2%, 0%)
57
+ $color-light: lighten($color, $color-lightning)
58
+
46
59
  &.is-#{$name}
47
- background-color: lighten($color, $color-lightning)
60
+ background-color: $color-light
48
61
  .message-header
49
62
  background-color: $color
50
63
  color: $color-invert
51
64
  .message-body
52
65
  border-color: $color
53
- color: desaturate(darken($color, $darken-percentage), $desaturate-percentage)
66
+ color: $color-dark
54
67
 
55
68
  .message-header
56
69
  align-items: center
@@ -66,7 +79,7 @@ $message-header-body-border-width: 0 !default
66
79
  .delete
67
80
  flex-grow: 0
68
81
  flex-shrink: 0
69
- margin-left: 0.75em
82
+ +ltr-property("margin", 0.75em, false)
70
83
  & + .message-body
71
84
  border-width: $message-header-body-border-width
72
85
  border-top-left-radius: 0
@@ -1,6 +1,6 @@
1
1
  $modal-z: 40 !default
2
2
 
3
- $modal-background-background-color: rgba($black, 0.86) !default
3
+ $modal-background-background-color: bulmaRgba($scheme-invert, 0.86) !default
4
4
 
5
5
  $modal-content-width: 640px !default
6
6
  $modal-content-margin-mobile: 20px !default
@@ -25,9 +25,11 @@ $modal-card-title-size: $size-4 !default
25
25
  $modal-card-foot-radius: $radius-large !default
26
26
  $modal-card-foot-border-top: 1px solid $border !default
27
27
 
28
- $modal-card-body-background-color: $white !default
28
+ $modal-card-body-background-color: $scheme-main !default
29
29
  $modal-card-body-padding: 20px !default
30
30
 
31
+ $modal-breakpoint: $tablet !default
32
+
31
33
  .modal
32
34
  @extend %overlay
33
35
  align-items: center
@@ -53,7 +55,7 @@ $modal-card-body-padding: 20px !default
53
55
  position: relative
54
56
  width: 100%
55
57
  // Responsiveness
56
- +tablet
58
+ +from($modal-breakpoint)
57
59
  margin: 0 auto
58
60
  max-height: calc(100vh - #{$modal-content-spacing-tablet})
59
61
  width: $modal-content-width
@@ -63,7 +65,7 @@ $modal-card-body-padding: 20px !default
63
65
  background: none
64
66
  height: $modal-close-dimensions
65
67
  position: fixed
66
- right: $modal-close-right
68
+ +ltr-position($modal-close-right)
67
69
  top: $modal-close-top
68
70
  width: $modal-close-dimensions
69
71
 
@@ -102,7 +104,7 @@ $modal-card-body-padding: 20px !default
102
104
  border-top: $modal-card-foot-border-top
103
105
  .button
104
106
  &:not(:last-child)
105
- margin-right: 10px
107
+ +ltr-property("margin", 0.5em)
106
108
 
107
109
  .modal-card-body
108
110
  +overflow-touch
@@ -1,4 +1,4 @@
1
- $navbar-background-color: $white !default
1
+ $navbar-background-color: $scheme-main !default
2
2
  $navbar-box-shadow-size: 0 2px 0 0 !default
3
3
  $navbar-box-shadow-color: $background !default
4
4
  $navbar-height: 3.25rem !default
@@ -7,10 +7,10 @@ $navbar-padding-horizontal: 2rem !default
7
7
  $navbar-z: 30 !default
8
8
  $navbar-fixed-z: 30 !default
9
9
 
10
- $navbar-item-color: $grey-dark !default
10
+ $navbar-item-color: $text !default
11
11
  $navbar-item-hover-color: $link !default
12
- $navbar-item-hover-background-color: $white-bis !default
13
- $navbar-item-active-color: $black !default
12
+ $navbar-item-hover-background-color: $scheme-main-bis !default
13
+ $navbar-item-active-color: $scheme-invert !default
14
14
  $navbar-item-active-background-color: transparent !default
15
15
  $navbar-item-img-max-height: 1.75rem !default
16
16
 
@@ -24,7 +24,7 @@ $navbar-tab-active-border-bottom-color: $link !default
24
24
  $navbar-tab-active-border-bottom-style: solid !default
25
25
  $navbar-tab-active-border-bottom-width: 3px !default
26
26
 
27
- $navbar-dropdown-background-color: $white !default
27
+ $navbar-dropdown-background-color: $scheme-main !default
28
28
  $navbar-dropdown-border-top: 2px solid $border !default
29
29
  $navbar-dropdown-offset: -4px !default
30
30
  $navbar-dropdown-arrow: $link !default
@@ -32,9 +32,9 @@ $navbar-dropdown-radius: $radius-large !default
32
32
  $navbar-dropdown-z: 20 !default
33
33
 
34
34
  $navbar-dropdown-boxed-radius: $radius-large !default
35
- $navbar-dropdown-boxed-shadow: 0 8px 8px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default
35
+ $navbar-dropdown-boxed-shadow: 0 8px 8px bulmaRgba($scheme-invert, 0.1), 0 0 0 1px bulmaRgba($scheme-invert, 0.1) !default
36
36
 
37
- $navbar-dropdown-item-hover-color: $black !default
37
+ $navbar-dropdown-item-hover-color: $scheme-invert !default
38
38
  $navbar-dropdown-item-hover-background-color: $background !default
39
39
  $navbar-dropdown-item-active-color: $link !default
40
40
  $navbar-dropdown-item-active-background-color: $background !default
@@ -46,6 +46,8 @@ $navbar-bottom-box-shadow-size: 0 -2px 0 0 !default
46
46
 
47
47
  $navbar-breakpoint: $desktop !default
48
48
 
49
+ $navbar-colors: $colors !default
50
+
49
51
  =navbar-fixed
50
52
  left: 0
51
53
  position: fixed
@@ -57,7 +59,7 @@ $navbar-breakpoint: $desktop !default
57
59
  min-height: $navbar-height
58
60
  position: relative
59
61
  z-index: $navbar-z
60
- @each $name, $pair in $colors
62
+ @each $name, $pair in $navbar-colors
61
63
  $color: nth($pair, 1)
62
64
  $color-invert: nth($pair, 2)
63
65
  &.is-#{$name}
@@ -69,9 +71,10 @@ $navbar-breakpoint: $desktop !default
69
71
  color: $color-invert
70
72
  & > a.navbar-item,
71
73
  .navbar-link
74
+ &:focus,
72
75
  &:hover,
73
76
  &.is-active
74
- background-color: darken($color, 5%)
77
+ background-color: bulmaDarken($color, 5%)
75
78
  color: $color-invert
76
79
  .navbar-link
77
80
  &::after
@@ -86,16 +89,18 @@ $navbar-breakpoint: $desktop !default
86
89
  color: $color-invert
87
90
  & > a.navbar-item,
88
91
  .navbar-link
92
+ &:focus,
89
93
  &:hover,
90
94
  &.is-active
91
- background-color: darken($color, 5%)
95
+ background-color: bulmaDarken($color, 5%)
92
96
  color: $color-invert
93
97
  .navbar-link
94
98
  &::after
95
99
  border-color: $color-invert
100
+ .navbar-item.has-dropdown:focus .navbar-link,
96
101
  .navbar-item.has-dropdown:hover .navbar-link,
97
102
  .navbar-item.has-dropdown.is-active .navbar-link
98
- background-color: darken($color, 5%)
103
+ background-color: bulmaDarken($color, 5%)
99
104
  color: $color-invert
100
105
  .navbar-dropdown
101
106
  a.navbar-item
@@ -135,6 +140,7 @@ body
135
140
 
136
141
  .navbar-brand
137
142
  a.navbar-item
143
+ &:focus,
138
144
  &:hover
139
145
  background-color: transparent
140
146
 
@@ -147,7 +153,7 @@ body
147
153
  .navbar-burger
148
154
  color: $navbar-burger-color
149
155
  +hamburger($navbar-height)
150
- margin-left: auto
156
+ +ltr-property("margin", auto, false)
151
157
 
152
158
  .navbar-menu
153
159
  display: none
@@ -167,13 +173,14 @@ body
167
173
  a.navbar-item,
168
174
  .navbar-link
169
175
  cursor: pointer
176
+ &:focus,
177
+ &:focus-within,
170
178
  &:hover,
171
179
  &.is-active
172
180
  background-color: $navbar-item-hover-background-color
173
181
  color: $navbar-item-hover-color
174
182
 
175
183
  .navbar-item
176
- display: block
177
184
  flex-grow: 0
178
185
  flex-shrink: 0
179
186
  img
@@ -187,6 +194,7 @@ a.navbar-item,
187
194
  border-bottom: 1px solid transparent
188
195
  min-height: $navbar-height
189
196
  padding-bottom: calc(0.5rem - 1px)
197
+ &:focus,
190
198
  &:hover
191
199
  background-color: $navbar-tab-hover-background-color
192
200
  border-bottom-color: $navbar-tab-hover-border-bottom-color
@@ -203,12 +211,12 @@ a.navbar-item,
203
211
  flex-shrink: 1
204
212
 
205
213
  .navbar-link:not(.is-arrowless)
206
- padding-right: 2.5em
214
+ +ltr-property("padding", 2.5em)
207
215
  &::after
208
216
  @extend %arrow
209
217
  border-color: $navbar-dropdown-arrow
210
218
  margin-top: -0.375em
211
- right: 1.125em
219
+ +ltr-position(1.125em)
212
220
 
213
221
  .navbar-dropdown
214
222
  font-size: 0.875rem
@@ -238,7 +246,7 @@ a.navbar-item,
238
246
  display: none
239
247
  .navbar-menu
240
248
  background-color: $navbar-background-color
241
- box-shadow: 0 8px 16px rgba($black, 0.1)
249
+ box-shadow: 0 8px 16px bulmaRgba($scheme-invert, 0.1)
242
250
  padding: 0.5rem 0
243
251
  &.is-active
244
252
  display: block
@@ -250,7 +258,7 @@ a.navbar-item,
250
258
  &.is-fixed-bottom-touch
251
259
  bottom: 0
252
260
  &.has-shadow
253
- box-shadow: 0 -2px 3px rgba($black, 0.1)
261
+ box-shadow: 0 -2px 3px bulmaRgba($scheme-invert, 0.1)
254
262
  &.is-fixed-top-touch
255
263
  top: 0
256
264
  &.is-fixed-top,
@@ -286,16 +294,20 @@ a.navbar-item,
286
294
  &.is-transparent
287
295
  a.navbar-item,
288
296
  .navbar-link
297
+ &:focus,
289
298
  &:hover,
290
299
  &.is-active
291
300
  background-color: transparent !important
292
301
  .navbar-item.has-dropdown
293
302
  &.is-active,
303
+ &.is-hoverable:focus,
304
+ &.is-hoverable:focus-within,
294
305
  &.is-hoverable:hover
295
306
  .navbar-link
296
307
  background-color: transparent !important
297
308
  .navbar-dropdown
298
309
  a.navbar-item
310
+ &:focus,
299
311
  &:hover
300
312
  background-color: $navbar-dropdown-item-hover-background-color
301
313
  color: $navbar-dropdown-item-hover-color
@@ -309,7 +321,6 @@ a.navbar-item,
309
321
  align-items: center
310
322
  display: flex
311
323
  .navbar-item
312
- display: flex
313
324
  &.has-dropdown
314
325
  align-items: stretch
315
326
  &.has-dropdown-up
@@ -320,9 +331,11 @@ a.navbar-item,
320
331
  border-radius: $navbar-dropdown-radius $navbar-dropdown-radius 0 0
321
332
  border-top: none
322
333
  bottom: 100%
323
- box-shadow: 0 -8px 8px rgba($black, 0.1)
334
+ box-shadow: 0 -8px 8px bulmaRgba($scheme-invert, 0.1)
324
335
  top: auto
325
336
  &.is-active,
337
+ &.is-hoverable:focus,
338
+ &.is-hoverable:focus-within,
326
339
  &.is-hoverable:hover
327
340
  .navbar-dropdown
328
341
  display: block
@@ -336,19 +349,19 @@ a.navbar-item,
336
349
  flex-shrink: 0
337
350
  .navbar-start
338
351
  justify-content: flex-start
339
- margin-right: auto
352
+ +ltr-property("margin", auto)
340
353
  .navbar-end
341
354
  justify-content: flex-end
342
- margin-left: auto
355
+ +ltr-property("margin", auto, false)
343
356
  .navbar-dropdown
344
357
  background-color: $navbar-dropdown-background-color
345
358
  border-bottom-left-radius: $navbar-dropdown-radius
346
359
  border-bottom-right-radius: $navbar-dropdown-radius
347
360
  border-top: $navbar-dropdown-border-top
348
- box-shadow: 0 8px 8px rgba($black, 0.1)
361
+ box-shadow: 0 8px 8px bulmaRgba($scheme-invert, 0.1)
349
362
  display: none
350
363
  font-size: 0.875rem
351
- left: 0
364
+ +ltr-position(0, false)
352
365
  min-width: 100%
353
366
  position: absolute
354
367
  top: 100%
@@ -357,7 +370,8 @@ a.navbar-item,
357
370
  padding: 0.375rem 1rem
358
371
  white-space: nowrap
359
372
  a.navbar-item
360
- padding-right: 3rem
373
+ +ltr-property("padding", 3rem)
374
+ &:focus,
361
375
  &:hover
362
376
  background-color: $navbar-dropdown-item-hover-background-color
363
377
  color: $navbar-dropdown-item-hover-color
@@ -384,9 +398,9 @@ a.navbar-item,
384
398
  .navbar > .container,
385
399
  .container > .navbar
386
400
  .navbar-brand
387
- margin-left: -.75rem
401
+ +ltr-property("margin", -.75rem, false)
388
402
  .navbar-menu
389
- margin-right: -.75rem
403
+ +ltr-property("margin", -.75rem)
390
404
  // Fixed navbar
391
405
  .navbar
392
406
  &.is-fixed-bottom-desktop,
@@ -395,7 +409,7 @@ a.navbar-item,
395
409
  &.is-fixed-bottom-desktop
396
410
  bottom: 0
397
411
  &.has-shadow
398
- box-shadow: 0 -2px 3px rgba($black, 0.1)
412
+ box-shadow: 0 -2px 3px bulmaRgba($scheme-invert, 0.1)
399
413
  &.is-fixed-top-desktop
400
414
  top: 0
401
415
  html,
@@ -413,9 +427,10 @@ a.navbar-item,
413
427
  .navbar-link
414
428
  &.is-active
415
429
  color: $navbar-item-active-color
416
- &.is-active:not(:hover)
430
+ &.is-active:not(:focus):not(:hover)
417
431
  background-color: $navbar-item-active-background-color
418
432
  .navbar-item.has-dropdown
433
+ &:focus,
419
434
  &:hover,
420
435
  &.is-active
421
436
  .navbar-link