bulma-rails 0.4.3 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/stylesheets/bulma.sass +1 -2
  4. data/app/assets/stylesheets/sass/base/_all.sass +0 -0
  5. data/app/assets/stylesheets/sass/base/generic.sass +39 -19
  6. data/app/assets/stylesheets/sass/base/helpers.sass +132 -54
  7. data/app/assets/stylesheets/sass/base/minireset.sass +0 -0
  8. data/app/assets/stylesheets/sass/components/_all.sass +2 -1
  9. data/app/assets/stylesheets/sass/components/breadcrumb.sass +20 -14
  10. data/app/assets/stylesheets/sass/components/card.sass +24 -10
  11. data/app/assets/stylesheets/sass/components/dropdown.sass +68 -0
  12. data/app/assets/stylesheets/sass/components/level.sass +29 -29
  13. data/app/assets/stylesheets/sass/components/media.sass +18 -18
  14. data/app/assets/stylesheets/sass/components/menu.sass +27 -9
  15. data/app/assets/stylesheets/sass/components/message.sass +41 -18
  16. data/app/assets/stylesheets/sass/components/modal.sass +65 -35
  17. data/app/assets/stylesheets/sass/components/nav.sass +0 -0
  18. data/app/assets/stylesheets/sass/components/navbar.sass +80 -37
  19. data/app/assets/stylesheets/sass/components/pagination.sass +28 -28
  20. data/app/assets/stylesheets/sass/components/panel.sass +47 -22
  21. data/app/assets/stylesheets/sass/components/tabs.sass +58 -24
  22. data/app/assets/stylesheets/sass/elements/_all.sass +1 -0
  23. data/app/assets/stylesheets/sass/elements/box.sass +16 -6
  24. data/app/assets/stylesheets/sass/elements/button.sass +41 -39
  25. data/app/assets/stylesheets/sass/elements/container.sass +27 -0
  26. data/app/assets/stylesheets/sass/elements/content.sass +38 -18
  27. data/app/assets/stylesheets/sass/elements/form.sass +266 -54
  28. data/app/assets/stylesheets/sass/elements/icon.sass +13 -8
  29. data/app/assets/stylesheets/sass/elements/image.sass +1 -1
  30. data/app/assets/stylesheets/sass/elements/notification.sass +10 -4
  31. data/app/assets/stylesheets/sass/elements/other.sass +0 -18
  32. data/app/assets/stylesheets/sass/elements/progress.sass +6 -3
  33. data/app/assets/stylesheets/sass/elements/table.sass +42 -26
  34. data/app/assets/stylesheets/sass/elements/tag.sass +65 -5
  35. data/app/assets/stylesheets/sass/elements/title.sass +17 -15
  36. data/app/assets/stylesheets/sass/grid/_all.sass +0 -0
  37. data/app/assets/stylesheets/sass/grid/columns.sass +0 -0
  38. data/app/assets/stylesheets/sass/grid/tiles.sass +0 -0
  39. data/app/assets/stylesheets/sass/layout/_all.sass +0 -0
  40. data/app/assets/stylesheets/sass/layout/footer.sass +3 -1
  41. data/app/assets/stylesheets/sass/layout/hero.sass +45 -46
  42. data/app/assets/stylesheets/sass/layout/section.sass +7 -4
  43. data/app/assets/stylesheets/sass/utilities/_all.sass +0 -0
  44. data/app/assets/stylesheets/sass/utilities/animations.sass +0 -0
  45. data/app/assets/stylesheets/sass/utilities/controls.sass +0 -0
  46. data/app/assets/stylesheets/sass/utilities/derived-variables.sass +2 -1
  47. data/app/assets/stylesheets/sass/utilities/functions.sass +0 -0
  48. data/app/assets/stylesheets/sass/utilities/initial-variables.sass +10 -12
  49. data/app/assets/stylesheets/sass/utilities/mixins.sass +0 -0
  50. data/app/assets/stylesheets/sass/utilities/variables.sass +1 -1
  51. data/bulma-rails.gemspec +1 -1
  52. metadata +4 -2
@@ -1,24 +1,29 @@
1
+ $icon-dimensions: 1.5rem !default
2
+ $icon-dimensions-small: 1rem !default
3
+ $icon-dimensions-medium: 2rem !default
4
+ $icon-dimensions-large: 3rem !default
5
+
1
6
  .icon
2
7
  align-items: center
3
8
  display: inline-flex
4
9
  justify-content: center
5
- height: 1.5rem
6
- width: 1.5rem
10
+ height: $icon-dimensions
11
+ width: $icon-dimensions
7
12
  .fa
8
13
  font-size: 21px
9
14
  // Sizes
10
15
  &.is-small
11
- height: 1rem
12
- width: 1rem
16
+ height: $icon-dimensions-small
17
+ width: $icon-dimensions-small
13
18
  .fa
14
19
  font-size: 14px
15
20
  &.is-medium
16
- height: 2rem
17
- width: 2rem
21
+ height: $icon-dimensions-medium
22
+ width: $icon-dimensions-medium
18
23
  .fa
19
24
  font-size: 28px
20
25
  &.is-large
21
- height: 3rem
22
- width: 3rem
26
+ height: $icon-dimensions-large
27
+ width: $icon-dimensions-large
23
28
  .fa
24
29
  font-size: 42px
@@ -1,4 +1,4 @@
1
- $dimensions: 16 24 32 48 64 96 128
1
+ $dimensions: 16 24 32 48 64 96 128 !default
2
2
 
3
3
  .image
4
4
  display: block
@@ -1,12 +1,18 @@
1
+ $notification-background-color: $background !default
2
+ $notification-radius: $radius !default
3
+ $notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default
4
+
1
5
  .notification
2
6
  +block
3
- background-color: $background
4
- border-radius: $radius
5
- padding: 1.25rem 2.5rem 1.25rem 1.5rem
7
+ background-color: $notification-background-color
8
+ border-radius: $notification-radius
9
+ padding: $notification-padding
6
10
  position: relative
7
11
  a:not(.button)
8
12
  color: currentColor
9
13
  text-decoration: underline
14
+ strong
15
+ color: currentColor
10
16
  code,
11
17
  pre
12
18
  background: $white
@@ -19,7 +25,7 @@
19
25
  .title,
20
26
  .subtitle,
21
27
  .content
22
- color: inherit
28
+ color: currentColor
23
29
  // Colors
24
30
  @each $name, $pair in $colors
25
31
  $color: nth($pair, 1)
@@ -1,24 +1,6 @@
1
1
  .block
2
2
  +block
3
3
 
4
- .container
5
- position: relative
6
- +desktop
7
- margin: 0 auto
8
- max-width: $desktop - 40px
9
- width: $desktop - 40px
10
- // Modifiers
11
- &.is-fluid
12
- margin: 0 20px
13
- max-width: none
14
- width: auto
15
- +widescreen
16
- max-width: $widescreen - 40px
17
- width: $widescreen - 40px
18
- +fullhd
19
- max-width: $fullhd - 40px
20
- width: $fullhd - 40px
21
-
22
4
  .delete
23
5
  +delete
24
6
 
@@ -1,3 +1,6 @@
1
+ $progress-bar-background-color: $border !default
2
+ $progress-value-background-color: $text !default
3
+
1
4
  .progress
2
5
  +block
3
6
  -moz-appearance: none
@@ -10,11 +13,11 @@
10
13
  padding: 0
11
14
  width: 100%
12
15
  &::-webkit-progress-bar
13
- background-color: $border
16
+ background-color: $progress-bar-background-color
14
17
  &::-webkit-progress-value
15
- background-color: $text
18
+ background-color: $progress-value-background-color
16
19
  &::-moz-progress-bar
17
- background-color: $text
20
+ background-color: $progress-value-background-color
18
21
  // Colors
19
22
  @each $name, $pair in $colors
20
23
  $color: nth($pair, 1)
@@ -1,58 +1,72 @@
1
- $table: $grey-darker !default
2
- $table-background: $white !default
3
- $table-border: $grey-lighter !default
1
+ $table-color: $grey-darker !default
2
+ $table-background-color: $white !default
4
3
 
5
- $table-head: $grey !default
4
+ $table-cell-border: 1px solid $grey-lighter !default
5
+ $table-cell-border-width: 0 0 1px !default
6
+ $table-cell-padding: 0.5em 0.75em !default
7
+ $table-cell-heading-color: $text-strong !default
6
8
 
7
- $table-row-hover-background: $white-bis !default
9
+ $table-head-cell-border-width: 0 0 2px !default
10
+ $table-head-cell-color: $text-strong !default
11
+ $table-foot-cell-border-width: 2px 0 0 !default
12
+ $table-foot-cell-color: $text-strong !default
8
13
 
9
- $table-row-active-background: $primary !default
10
- $table-row-active: $primary-invert !default
14
+ $table-row-hover-background-color: $white-bis !default
11
15
 
12
- $table-row-even-background: $white-bis !default
13
- $table-row-even-hover-background: $white-ter !default
16
+ $table-row-active-background-color: $primary !default
17
+ $table-row-active-color: $primary-invert !default
18
+
19
+ $table-striped-row-even-background-color: $white-bis !default
20
+ $table-striped-row-even-hover-background-color: $white-ter !default
14
21
 
15
22
  .table
16
- background-color: $table-background
17
- color: $table
23
+ background-color: $table-background-color
24
+ color: $table-color
18
25
  margin-bottom: 1.5rem
19
- width: 100%
20
26
  td,
21
27
  th
22
- border: 1px solid $table-border
23
- border-width: 0 0 1px
24
- padding: 0.5em 0.75em
28
+ border: $table-cell-border
29
+ border-width: $table-cell-border-width
30
+ padding: $table-cell-padding
25
31
  vertical-align: top
32
+ // Colors
33
+ @each $name, $pair in $colors
34
+ $color: nth($pair, 1)
35
+ $color-invert: nth($pair, 2)
36
+ &.is-#{$name}
37
+ background-color: $color
38
+ border-color: $color
39
+ color: $color-invert
26
40
  // Modifiers
27
41
  &.is-narrow
28
42
  white-space: nowrap
29
43
  width: 1%
30
44
  th
31
- color: $text-strong
45
+ color: $table-cell-heading-color
32
46
  text-align: left
33
47
  tr
34
48
  &:hover
35
- background-color: $table-row-hover-background
49
+ background-color: $table-row-hover-background-color
36
50
  &.is-selected
37
- background-color: $table-row-active-background
38
- color: $table-row-active
51
+ background-color: $table-row-active-background-color
52
+ color: $table-row-active-color
39
53
  a,
40
54
  strong
41
55
  color: currentColor
42
56
  td,
43
57
  th
44
- border-color: $table-row-active
58
+ border-color: $table-row-active-color
45
59
  color: currentColor
46
60
  thead
47
61
  td,
48
62
  th
49
- border-width: 0 0 2px
50
- color: $table-head
63
+ border-width: $table-head-cell-border-width
64
+ color: $table-head-cell-color
51
65
  tfoot
52
66
  td,
53
67
  th
54
- border-width: 2px 0 0
55
- color: $table-head
68
+ border-width: $table-foot-cell-border-width
69
+ color: $table-foot-cell-color
56
70
  tbody
57
71
  tr
58
72
  &:last-child
@@ -69,6 +83,8 @@ $table-row-even-hover-background: $white-ter !default
69
83
  td,
70
84
  th
71
85
  border-bottom-width: 1px
86
+ &.is-fullwidth
87
+ width: 100%
72
88
  &.is-narrow
73
89
  td,
74
90
  th
@@ -77,6 +93,6 @@ $table-row-even-hover-background: $white-ter !default
77
93
  tbody
78
94
  tr:not(.is-selected)
79
95
  &:nth-child(even)
80
- background-color: $table-row-even-background
96
+ background-color: $table-striped-row-even-background-color
81
97
  &:hover
82
- background-color: $table-row-even-hover-background
98
+ background-color: $table-striped-row-even-hover-background-color
@@ -1,15 +1,42 @@
1
+ $tag-background-color: $background !default
2
+ $tag-color: $text !default
3
+ $tag-radius: $radius !default
4
+
5
+ .tags
6
+ align-items: center
7
+ display: flex
8
+ flex-wrap: wrap
9
+ justify-content: flex-start
10
+ .tag
11
+ margin-bottom: 0.5rem
12
+ &:not(:last-child)
13
+ margin-right: 0.5rem
14
+ &:last-child
15
+ margin-bottom: -0.5rem
16
+ &:not(:last-child)
17
+ margin-bottom: 1rem
18
+ &.has-addons
19
+ .tag
20
+ margin-right: 0
21
+ &:not(:first-child)
22
+ border-bottom-left-radius: 0
23
+ border-top-left-radius: 0
24
+ &:not(:last-child)
25
+ border-bottom-right-radius: 0
26
+ border-top-right-radius: 0
27
+
1
28
  .tag
2
29
  align-items: center
3
- background-color: $background
4
- border-radius: 290486px
5
- color: $text
30
+ background-color: $tag-background-color
31
+ border-radius: $tag-radius
32
+ color: $tag-color
6
33
  display: inline-flex
7
34
  font-size: $size-small
8
35
  height: 2em
9
36
  justify-content: center
10
37
  line-height: 1.5
11
- padding-left: 0.875em
12
- padding-right: 0.875em
38
+ padding-left: 0.75em
39
+ padding-right: 0.75em
13
40
  white-space: nowrap
14
41
  .delete
15
42
  margin-left: 0.25em
@@ -26,3 +53,36 @@
26
53
  font-size: $size-normal
27
54
  &.is-large
28
55
  font-size: $size-medium
56
+ // Modifiers
57
+ &.is-delete
58
+ margin-left: 1px
59
+ padding: 0
60
+ position: relative
61
+ width: 2em
62
+ &:before,
63
+ &:after
64
+ background-color: currentColor
65
+ content: ""
66
+ display: block
67
+ left: 50%
68
+ position: absolute
69
+ top: 50%
70
+ transform: translateX(-50%) translateY(-50%) rotate(45deg)
71
+ transform-origin: center center
72
+ &:before
73
+ height: 1px
74
+ width: 50%
75
+ &:after
76
+ height: 50%
77
+ width: 1px
78
+ &:hover,
79
+ &:focus
80
+ background-color: darken($tag-background-color, 5%)
81
+ &:active
82
+ background-color: darken($tag-background-color, 10%)
83
+ &.is-rounded
84
+ border-radius: 290486px
85
+
86
+ a.tag
87
+ &:hover
88
+ text-decoration: underline
@@ -1,12 +1,14 @@
1
- $title: $grey-darker !default
2
- $title-size: $size-3 !default
3
- $title-weight: $weight-light !default
4
- $title-weight-bold: $weight-semibold !default
1
+ $title-color: $grey-darker !default
2
+ $title-size: $size-3 !default
3
+ $title-weight: $weight-semibold !default
4
+ $title-strong-color: inherit !default
5
+ $title-strong-weight: inherit !default
5
6
 
6
- $subtitle: $grey-dark !default
7
- $subtitle-size: $size-5 !default
8
- $subtitle-strong: $grey-darker !default
9
- $subtitle-weight: $weight-light !default
7
+ $subtitle-color: $grey-dark !default
8
+ $subtitle-size: $size-5 !default
9
+ $subtitle-weight: $weight-normal !default
10
+ $subtitle-strong-color: $grey-darker !default
11
+ $subtitle-strong-weight: $weight-semibold !default
10
12
 
11
13
  .title,
12
14
  .subtitle
@@ -14,19 +16,18 @@ $subtitle-weight: $weight-light !default
14
16
  word-break: break-word
15
17
  em,
16
18
  span
17
- font-weight: $title-weight
18
- strong
19
- font-weight: $title-weight-bold
19
+ font-weight: inherit
20
20
  .tag
21
21
  vertical-align: middle
22
22
 
23
23
  .title
24
- color: $title
24
+ color: $title-color
25
25
  font-size: $title-size
26
26
  font-weight: $title-weight
27
27
  line-height: 1.125
28
28
  strong
29
- color: inherit
29
+ color: $title-strong-color
30
+ font-weight: $title-strong-weight
30
31
  & + .highlight
31
32
  margin-top: -0.75rem
32
33
  &:not(.is-spaced) + .subtitle
@@ -38,12 +39,13 @@ $subtitle-weight: $weight-light !default
38
39
  font-size: $size
39
40
 
40
41
  .subtitle
41
- color: $subtitle
42
+ color: $subtitle-color
42
43
  font-size: $subtitle-size
43
44
  font-weight: $subtitle-weight
44
45
  line-height: 1.25
45
46
  strong
46
- color: $subtitle-strong
47
+ color: $subtitle-strong-color
48
+ font-weight: $subtitle-strong-weight
47
49
  &:not(.is-spaced) + .title
48
50
  margin-top: -1.5rem
49
51
  // Sizes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,5 @@
1
+ $footer-background-color: $background !default
2
+
1
3
  .footer
2
- background-color: $background
4
+ background-color: $footer-background-color
3
5
  padding: 3rem 1.5rem 6rem
@@ -1,53 +1,7 @@
1
- // Components
2
-
3
- .hero-video
4
- +overlay
5
- overflow: hidden
6
- video
7
- left: 50%
8
- min-height: 100%
9
- min-width: 100%
10
- position: absolute
11
- top: 50%
12
- transform: translate3d(-50%, -50%, 0)
13
- // Modifiers
14
- &.is-transparent
15
- opacity: 0.3
16
- // Responsiveness
17
- +mobile
18
- display: none
19
-
20
- .hero-buttons
21
- margin-top: 1.5rem
22
- // Responsiveness
23
- +mobile
24
- .button
25
- display: flex
26
- &:not(:last-child)
27
- margin-bottom: 0.75rem
28
- +tablet
29
- display: flex
30
- justify-content: center
31
- .button:not(:last-child)
32
- margin-right: 1.5rem
33
-
34
- // Containers
35
-
36
- .hero-head,
37
- .hero-foot
38
- flex-grow: 0
39
- flex-shrink: 0
40
-
41
- .hero-body
42
- flex-grow: 1
43
- flex-shrink: 0
44
- padding: 3rem 1.5rem
45
-
46
1
  // Main container
47
2
 
48
3
  .hero
49
4
  align-items: stretch
50
- background-color: $white
51
5
  display: flex
52
6
  flex-direction: column
53
7
  justify-content: space-between
@@ -150,3 +104,48 @@
150
104
  min-height: 50vh
151
105
  &.is-fullheight
152
106
  min-height: 100vh
107
+
108
+ // Components
109
+
110
+ .hero-video
111
+ +overlay
112
+ overflow: hidden
113
+ video
114
+ left: 50%
115
+ min-height: 100%
116
+ min-width: 100%
117
+ position: absolute
118
+ top: 50%
119
+ transform: translate3d(-50%, -50%, 0)
120
+ // Modifiers
121
+ &.is-transparent
122
+ opacity: 0.3
123
+ // Responsiveness
124
+ +mobile
125
+ display: none
126
+
127
+ .hero-buttons
128
+ margin-top: 1.5rem
129
+ // Responsiveness
130
+ +mobile
131
+ .button
132
+ display: flex
133
+ &:not(:last-child)
134
+ margin-bottom: 0.75rem
135
+ +tablet
136
+ display: flex
137
+ justify-content: center
138
+ .button:not(:last-child)
139
+ margin-right: 1.5rem
140
+
141
+ // Containers
142
+
143
+ .hero-head,
144
+ .hero-foot
145
+ flex-grow: 0
146
+ flex-shrink: 0
147
+
148
+ .hero-body
149
+ flex-grow: 1
150
+ flex-shrink: 0
151
+ padding: 3rem 1.5rem