bulma-rails 0.0.24 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/README.md +2 -2
  4. data/app/assets/stylesheets/sass/base/classes.sass +2 -0
  5. data/app/assets/stylesheets/sass/base/generic.sass +4 -3
  6. data/app/assets/stylesheets/sass/base/helpers.sass +44 -3
  7. data/app/assets/stylesheets/sass/components/card.sass +3 -4
  8. data/app/assets/stylesheets/sass/components/components.sass +2 -1
  9. data/app/assets/stylesheets/sass/components/grid.sass +0 -13
  10. data/app/assets/stylesheets/sass/components/level.sass +57 -0
  11. data/app/assets/stylesheets/sass/components/message.sass +1 -1
  12. data/app/assets/stylesheets/sass/components/modal.sass +40 -1
  13. data/app/assets/stylesheets/sass/components/nav.sass +120 -0
  14. data/app/assets/stylesheets/sass/components/navbar.sass +10 -2
  15. data/app/assets/stylesheets/sass/components/panel.sass +4 -2
  16. data/app/assets/stylesheets/sass/components/tabs.sass +68 -43
  17. data/app/assets/stylesheets/sass/elements/box.sass +4 -4
  18. data/app/assets/stylesheets/sass/elements/button.sass +14 -19
  19. data/app/assets/stylesheets/sass/elements/content.sass +6 -0
  20. data/app/assets/stylesheets/sass/elements/elements.sass +1 -2
  21. data/app/assets/stylesheets/sass/elements/{controls.sass → form.sass} +2 -50
  22. data/app/assets/stylesheets/sass/elements/other.sass +22 -16
  23. data/app/assets/stylesheets/sass/elements/table.sass +4 -2
  24. data/app/assets/stylesheets/sass/layout/footer.sass +8 -6
  25. data/app/assets/stylesheets/sass/layout/header.sass +7 -10
  26. data/app/assets/stylesheets/sass/layout/hero.sass +57 -62
  27. data/app/assets/stylesheets/sass/layout/layout.sass +0 -1
  28. data/app/assets/stylesheets/sass/layout/section.sass +1 -3
  29. data/app/assets/stylesheets/sass/utilities/controls.sass +51 -0
  30. data/app/assets/stylesheets/sass/utilities/functions.sass +1 -1
  31. data/app/assets/stylesheets/sass/utilities/mixins.sass +8 -7
  32. data/app/assets/stylesheets/sass/utilities/utilities.sass +1 -0
  33. data/app/assets/stylesheets/sass/utilities/variables.sass +8 -4
  34. data/bulma-rails.gemspec +1 -1
  35. metadata +6 -3
@@ -34,16 +34,24 @@
34
34
 
35
35
  .navbar
36
36
  @extend .block
37
+ align-items: center
38
+ justify-content: space-between
37
39
  code
38
40
  border-radius: $radius
39
41
  img
40
42
  display: inline-block
41
43
  vertical-align: top
44
+ // Modifiers
45
+ &.is-mobile
46
+ display: flex
47
+ & > .navbar-item
48
+ &:not(:last-child)
49
+ margin-bottom: 0
50
+ &:not(.is-narrow)
51
+ flex: 1
42
52
  // Responsiveness
43
53
  +tablet
44
- align-items: center
45
54
  display: flex
46
- justify-content: space-between
47
55
  & > .navbar-item
48
56
  &:not(.is-narrow)
49
57
  flex: 1
@@ -43,11 +43,13 @@
43
43
  display: block
44
44
  line-height: 16px
45
45
  padding: 10px
46
- &:hover
47
- background: $background
48
46
  &:not(:last-child)
49
47
  border-bottom: 1px solid $border
50
48
 
49
+ a.panel-block
50
+ &:hover
51
+ background: $background
52
+
51
53
  .panel
52
54
  border: 1px solid $border
53
55
  border-radius: 5px
@@ -1,86 +1,84 @@
1
1
  .tabs
2
2
  @extend .block
3
+ @extend .unselectable
4
+ align-items: stretch
5
+ display: flex
6
+ justify-content: space-between
3
7
  line-height: 24px
4
8
  overflow: hidden
5
9
  overflow-x: auto
6
10
  white-space: nowrap
7
11
  a
12
+ align-items: center
8
13
  border-bottom: 1px solid $border
9
14
  color: $text
10
- display: block
15
+ display: flex
16
+ justify-content: center
11
17
  margin-bottom: -1px
12
- padding: 5px 0
18
+ padding: 6px 12px
13
19
  vertical-align: top
14
20
  &:hover
15
21
  border-bottom-color: $text-strong
16
22
  color: $text-strong
17
23
  li
18
24
  display: block
19
- vertical-align: top
20
- & + li
21
- margin-left: 20px
22
- // Modifiers
23
25
  &.is-active
24
26
  a
25
27
  border-bottom-color: $link
26
28
  color: $link
27
29
  ul
30
+ align-items: center
28
31
  border-bottom: 1px solid $border
29
32
  display: flex
30
- .fa
31
- font-size: 14px
32
- line-height: 20px
33
- margin: 2px -2px
34
- width: 20px
35
- // Modifiers
33
+ flex: 1
34
+ justify-content: flex-start
35
+ &.is-left
36
+ padding-right: 10px
37
+ &.is-center
38
+ flex: none
39
+ justify-content: center
40
+ padding-left: 10px
41
+ padding-right: 10px
42
+ &.is-right
43
+ justify-content: flex-end
44
+ padding-left: 10px
45
+ .icon
46
+ &:first-child
47
+ margin-right: 8px
48
+ &:last-child
49
+ margin-left: 8px
50
+ // Alignment
51
+ &.is-centered
52
+ ul
53
+ justify-content: center
54
+ &.is-right
55
+ ul
56
+ justify-content: flex-end
57
+ // Styles
36
58
  &.is-boxed
37
59
  a
38
60
  border: 1px solid transparent
39
61
  border-radius: $radius $radius 0 0
40
- padding: 5px 15px
62
+ padding-bottom: 5px
63
+ padding-top: 5px
41
64
  &:hover
42
65
  background: $background
43
66
  border-bottom-color: $border
44
67
  li
45
- & + li
46
- margin-left: 5px
47
- // Modifiers
48
68
  &.is-active
49
69
  a
50
- background: white
70
+ background: $white
51
71
  border-color: $border
52
- border-bottom-color: transparent
53
- // Modifiers
54
- &.is-centered
55
- li
56
- &,
57
- & + li
58
- margin: 0 2px
59
- &.is-centered
60
- a
61
- padding: 5px 10px
62
- li
63
- & + li
64
- margin-left: 0
65
- ul
66
- justify-content: center
67
- text-align: center
72
+ border-bottom-color: transparent !important
68
73
  &.is-fullwidth
69
74
  li
70
75
  flex: 1
71
- & + li
72
- margin-left: 0
73
- ul
74
- justify-content: center
75
- text-align: center
76
- &.is-right
77
- ul
78
- justify-content: flex-end
79
76
  &.is-toggle
80
77
  a
81
78
  border: 1px solid $border
82
79
  margin-bottom: 0
83
- padding: 5px 10px
80
+ padding-bottom: 5px
81
+ padding-top: 5px
84
82
  position: relative
85
83
  &:hover
86
84
  background: $background
@@ -93,7 +91,6 @@
93
91
  border-radius: $radius 0 0 $radius
94
92
  &:last-child a
95
93
  border-radius: 0 $radius $radius 0
96
- // Modifiers
97
94
  &.is-active
98
95
  a
99
96
  background: $primary
@@ -102,3 +99,31 @@
102
99
  z-index: 1
103
100
  ul
104
101
  border-bottom: none
102
+ // Sizes
103
+ &.is-small
104
+ font-size: $size-small
105
+ a
106
+ padding: 2px 8px
107
+ &.is-boxed,
108
+ &.is-toggle
109
+ a
110
+ padding-bottom: 1px
111
+ padding-top: 1px
112
+ &.is-medium
113
+ font-size: $size-medium
114
+ a
115
+ padding: 10px 16px
116
+ &.is-boxed,
117
+ &.is-toggle
118
+ a
119
+ padding-bottom: 9px
120
+ padding-top: 9px
121
+ &.is-large
122
+ font-size: $size-large
123
+ a
124
+ padding: 14px 20px
125
+ &.is-boxed,
126
+ &.is-toggle
127
+ a
128
+ padding-bottom: 13px
129
+ padding-top: 13px
@@ -1,14 +1,14 @@
1
1
  .box
2
2
  @extend .block
3
- background: white
3
+ background: $white
4
4
  border-radius: 5px
5
- box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px rgba(black, 0.1)
5
+ box-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1)
6
6
  display: block
7
7
  padding: 20px
8
8
 
9
9
  a.box
10
10
  &:hover,
11
11
  &:focus
12
- box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px $link
12
+ box-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px $link
13
13
  &:active
14
- box-shadow: inset 0 1px 2px rgba(black, 0.2), 0 0 0 1px $link
14
+ box-shadow: inset 0 1px 2px rgba($black, 0.2), 0 0 0 1px $link
@@ -3,21 +3,25 @@
3
3
  font-size: 11px
4
4
  height: 24px
5
5
  line-height: 16px
6
- padding: 3px 6px
6
+ padding-left: 6px
7
+ padding-right: 6px
7
8
  =button-medium
8
9
  font-size: 18px
9
10
  height: 40px
10
- padding: 7px 14px
11
+ padding-left: 14px
12
+ padding-right: 14px
11
13
  =button-large
12
14
  font-size: 22px
13
15
  height: 48px
14
- padding: 11px 20px
16
+ padding-left: 20px
17
+ padding-right: 20px
15
18
 
16
19
  .button
17
20
  +control
18
- +unselectable
21
+ @extend .unselectable
19
22
  justify-content: center
20
- padding: 3px 10px
23
+ padding-left: 10px
24
+ padding-right: 10px
21
25
  text-align: center
22
26
  white-space: nowrap
23
27
  strong
@@ -38,7 +42,7 @@
38
42
  &:hover
39
43
  color: $control-hover
40
44
  &:active
41
- box-shadow: inset 0 1px 2px rgba(black, 0.2)
45
+ box-shadow: inset 0 1px 2px rgba($black, 0.2)
42
46
  // Colors
43
47
  @each $name, $pair in $colors
44
48
  $color: nth($pair, 1)
@@ -59,14 +63,6 @@
59
63
  color: $color
60
64
  &:hover
61
65
  background: darken($color-invert, 5%)
62
- &.is-outlined
63
- background-color: transparent
64
- border-color: $color-invert
65
- color: $color-invert
66
- &:hover
67
- background: rgba(black, 0.05)
68
- border-color: $color-invert
69
- color: $color-invert
70
66
  &.is-loading
71
67
  &:after
72
68
  border-color: transparent transparent $color-invert $color-invert !important
@@ -76,8 +72,9 @@
76
72
  color: $color
77
73
  &:hover,
78
74
  &:focus
79
- border-color: darken($color, 10%)
80
- color: darken($color, 10%)
75
+ background: $color
76
+ border-color: $color
77
+ color: $color-invert
81
78
  &.is-link
82
79
  background: transparent
83
80
  border-color: transparent
@@ -98,13 +95,11 @@
98
95
  &[disabled],
99
96
  &.is-disabled
100
97
  opacity: 0.5
101
- &.is-flexible
102
- height: auto
103
98
  &.is-fullwidth
104
99
  display: block
105
100
  width: 100%
106
101
  &.is-loading
107
- color: transparent
102
+ color: transparent !important
108
103
  pointer-events: none
109
104
  &:after
110
105
  @extend .loader
@@ -1,6 +1,12 @@
1
1
  .content
2
2
  @extend .block
3
3
  // Inline
4
+ a
5
+ border-bottom: 1px solid $border
6
+ &:visited
7
+ color: $link-visited
8
+ &:hover
9
+ border-bottom-color: $link
4
10
  li + li
5
11
  margin-top: 0.25em
6
12
  // Block
@@ -1,10 +1,9 @@
1
1
  @charset "utf-8"
2
2
 
3
- @import "controls"
4
-
5
3
  @import "box"
6
4
  @import "button"
7
5
  @import "content"
6
+ @import "form"
8
7
  @import "image"
9
8
  @import "notification"
10
9
  @import "progress"
@@ -1,33 +1,3 @@
1
- =control
2
- -moz-appearance: none
3
- -webkit-appearance: none
4
- align-items: center
5
- background: $control-background
6
- border: 1px solid $control-border
7
- border-radius: $radius
8
- color: $control
9
- display: inline-flex
10
- font-size: $size-normal
11
- height: 32px
12
- line-height: 24px
13
- padding: 3px 8px
14
- position: relative
15
- vertical-align: top
16
- &:hover
17
- border-color: $control-hover-border
18
- &:active,
19
- &:focus
20
- border-color: $control-active-border
21
- outline: none
22
- &[disabled],
23
- &.is-disabled
24
- background: $background
25
- border-color: $control-border
26
- cursor: not-allowed
27
- pointer-events: none
28
- +placeholder
29
- color: rgba($control, 0.3)
30
-
31
1
  =form-control
32
2
  +control
33
3
  @each $name, $pair in $colors
@@ -35,27 +5,9 @@
35
5
  &.is-#{$name}
36
6
  border-color: $color
37
7
 
38
- =control-small
39
- border-radius: 2px
40
- font-size: 11px
41
- height: 24px
42
- line-height: 16px
43
- padding: 3px 6px
44
- =control-medium
45
- font-size: 18px
46
- height: 40px
47
- line-height: 32px
48
- padding: 3px 10px
49
- =control-large
50
- font-size: 24px
51
- height: 48px
52
- line-height: 40px
53
- padding: 3px 12px
54
-
55
8
  .input
56
9
  +form-control
57
- box-shadow: inset 0 1px 2px rgba(black, 0.1)
58
- display: block
10
+ box-shadow: inset 0 1px 2px rgba($black, 0.1)
59
11
  max-width: 100%
60
12
  width: 100%
61
13
  &[type="search"]
@@ -77,7 +29,6 @@
77
29
  &.is-flat
78
30
  border: none
79
31
  box-shadow: none
80
- padding: 4px 8px
81
32
  &.is-fullwidth
82
33
  display: block
83
34
  width: 100%
@@ -87,6 +38,7 @@
87
38
 
88
39
  .textarea
89
40
  @extend .input
41
+ display: block
90
42
  line-height: 1.2
91
43
  max-height: 600px
92
44
  max-width: 100%
@@ -1,8 +1,8 @@
1
1
  .delete
2
- +unselectable
2
+ @extend .unselectable
3
3
  -moz-appearance: none
4
4
  -webkit-appearance: none
5
- background: rgba(black, 0.2)
5
+ background: rgba($black, 0.2)
6
6
  border: none
7
7
  border-radius: 290486px
8
8
  cursor: pointer
@@ -13,7 +13,7 @@
13
13
  width: 24px
14
14
  &:before,
15
15
  &:after
16
- background: white
16
+ background: $white
17
17
  content: ""
18
18
  display: block
19
19
  height: 2px
@@ -28,7 +28,7 @@
28
28
  &:after
29
29
  transform: rotate(-45deg)
30
30
  &:hover
31
- background: rgba(black, 0.5)
31
+ background: rgba($black, 0.5)
32
32
  // Sizes
33
33
  &.is-small
34
34
  height: 16px
@@ -56,9 +56,9 @@
56
56
  .hamburger
57
57
  cursor: pointer
58
58
  display: block
59
- height: 50px
59
+ height: $nav-height
60
60
  position: relative
61
- width: 50px
61
+ width: $nav-height
62
62
  span
63
63
  background: $text
64
64
  display: block
@@ -92,9 +92,6 @@
92
92
  margin-left: -5px
93
93
  transform: rotate(-45deg)
94
94
  transform-origin: left bottom
95
- +tablet
96
- height: $header-height
97
- width: $header-height
98
95
 
99
96
  .heading
100
97
  display: block
@@ -143,7 +140,8 @@
143
140
  height: 24px
144
141
  justify-content: center
145
142
  line-height: 16px
146
- padding: 4px 10px
143
+ padding-left: 10px
144
+ padding-right: 10px
147
145
  vertical-align: top
148
146
  white-space: nowrap
149
147
  .delete
@@ -159,23 +157,31 @@
159
157
  &.is-#{$name}
160
158
  background: $color
161
159
  color: $color-invert
162
- &.is-dark
163
- background: $text
164
- color: $text-invert
165
160
  // Sizes
166
161
  &.is-small
167
162
  font-size: $size-small
168
163
  height: 20px
169
- padding: 2px 8px
164
+ padding-left: 8px
165
+ padding-right: 8px
170
166
  &.is-medium
171
167
  font-size: $size-normal
172
168
  height: 32px
173
- padding: 8px 14px
169
+ padding-left: 14px
170
+ padding-right: 14px
174
171
  &.is-large
175
172
  font-size: $size-5
176
173
  height: 40px
177
174
  line-height: 24px
178
- padding: 8px 18px
175
+ padding-left: 18px
176
+ padding-right: 18px
179
177
  .delete
180
178
  margin-left: 4px
181
179
  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
+