bulma-sass 0.7.5 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/bulma.sass +2 -1
  3. data/app/assets/stylesheets/sass/base/_all.sass +0 -1
  4. data/app/assets/stylesheets/sass/base/generic.sass +2 -2
  5. data/app/assets/stylesheets/sass/base/helpers.sass +1 -281
  6. data/app/assets/stylesheets/sass/base/minireset.sass +2 -8
  7. data/app/assets/stylesheets/sass/components/_all.sass +0 -1
  8. data/app/assets/stylesheets/sass/components/breadcrumb.sass +4 -4
  9. data/app/assets/stylesheets/sass/components/card.sass +6 -6
  10. data/app/assets/stylesheets/sass/components/dropdown.sass +8 -8
  11. data/app/assets/stylesheets/sass/components/level.sass +2 -2
  12. data/app/assets/stylesheets/sass/components/media.sass +14 -10
  13. data/app/assets/stylesheets/sass/components/menu.sass +2 -2
  14. data/app/assets/stylesheets/sass/components/message.sass +23 -11
  15. data/app/assets/stylesheets/sass/components/modal.sass +4 -4
  16. data/app/assets/stylesheets/sass/components/navbar.sass +24 -26
  17. data/app/assets/stylesheets/sass/components/pagination.sass +7 -6
  18. data/app/assets/stylesheets/sass/components/panel.sass +29 -13
  19. data/app/assets/stylesheets/sass/components/tabs.sass +36 -13
  20. data/app/assets/stylesheets/sass/elements/box.sass +4 -4
  21. data/app/assets/stylesheets/sass/elements/button.sass +46 -28
  22. data/app/assets/stylesheets/sass/elements/container.sass +5 -4
  23. data/app/assets/stylesheets/sass/elements/content.sass +5 -5
  24. data/app/assets/stylesheets/sass/elements/image.sass +2 -0
  25. data/app/assets/stylesheets/sass/elements/notification.sass +16 -3
  26. data/app/assets/stylesheets/sass/elements/progress.sass +1 -1
  27. data/app/assets/stylesheets/sass/elements/table.sass +9 -7
  28. data/app/assets/stylesheets/sass/elements/tag.sass +31 -16
  29. data/app/assets/stylesheets/sass/elements/title.sass +3 -3
  30. data/app/assets/stylesheets/sass/form/_all.sass +8 -0
  31. data/app/assets/stylesheets/sass/form/checkbox-radio.sass +21 -0
  32. data/app/assets/stylesheets/sass/form/file.sass +180 -0
  33. data/app/assets/stylesheets/sass/form/input-textarea.sass +64 -0
  34. data/app/assets/stylesheets/sass/form/select.sass +85 -0
  35. data/app/assets/stylesheets/sass/form/shared.sass +55 -0
  36. data/app/assets/stylesheets/sass/form/tools.sass +213 -0
  37. data/app/assets/stylesheets/sass/helpers/_all.sass +10 -0
  38. data/app/assets/stylesheets/sass/helpers/color.sass +37 -0
  39. data/app/assets/stylesheets/sass/helpers/float.sass +8 -0
  40. data/app/assets/stylesheets/sass/helpers/other.sass +8 -0
  41. data/app/assets/stylesheets/sass/helpers/overflow.sass +2 -0
  42. data/app/assets/stylesheets/sass/helpers/position.sass +5 -0
  43. data/app/assets/stylesheets/sass/helpers/spacing.sass +28 -0
  44. data/app/assets/stylesheets/sass/helpers/typography.sass +98 -0
  45. data/app/assets/stylesheets/sass/helpers/visibility.sass +122 -0
  46. data/app/assets/stylesheets/sass/layout/footer.sass +1 -1
  47. data/app/assets/stylesheets/sass/layout/hero.sass +22 -20
  48. data/app/assets/stylesheets/sass/utilities/_all.sass +1 -1
  49. data/app/assets/stylesheets/sass/utilities/controls.sass +3 -3
  50. data/app/assets/stylesheets/sass/utilities/derived-variables.scss +132 -0
  51. data/app/assets/stylesheets/sass/utilities/functions.sass +68 -15
  52. data/app/assets/stylesheets/sass/utilities/initial-variables.sass +5 -3
  53. data/app/assets/stylesheets/sass/utilities/mixins.sass +29 -5
  54. data/bulma-sass.gemspec +2 -2
  55. data/lib/bulma/sass/version.rb +1 -1
  56. data/release.sh +2 -2
  57. metadata +24 -10
  58. data/app/assets/stylesheets/sass/components/list.sass +0 -39
  59. data/app/assets/stylesheets/sass/utilities/derived-variables.sass +0 -85
@@ -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,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,12 +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
3
  $button-family: false !default
4
4
 
5
- $button-border-color: $grey-lighter !default
5
+ $button-border-color: $border !default
6
6
  $button-border-width: $control-border-width !default
7
7
 
8
- $button-padding-vertical: calc(0.375em - #{$button-border-width}) !default
9
- $button-padding-horizontal: 0.75em !default
8
+ $button-padding-vertical: calc(0.5em - #{$button-border-width}) !default
9
+ $button-padding-horizontal: 1em !default
10
10
 
11
11
  $button-hover-color: $link-hover !default
12
12
  $button-hover-border-color: $link-hover-border !default
@@ -14,23 +14,24 @@ $button-hover-border-color: $link-hover-border !default
14
14
  $button-focus-color: $link-focus !default
15
15
  $button-focus-border-color: $link-focus-border !default
16
16
  $button-focus-box-shadow-size: 0 0 0 0.125em !default
17
- $button-focus-box-shadow-color: rgba($link, 0.25) !default
17
+ $button-focus-box-shadow-color: bulmaRgba($link, 0.25) !default
18
18
 
19
19
  $button-active-color: $link-active !default
20
20
  $button-active-border-color: $link-active-border !default
21
21
 
22
22
  $button-text-color: $text !default
23
+ $button-text-decoration: underline !default
23
24
  $button-text-hover-background-color: $background !default
24
25
  $button-text-hover-color: $text-strong !default
25
26
 
26
- $button-disabled-background-color: $white !default
27
- $button-disabled-border-color: $grey-lighter !default
27
+ $button-disabled-background-color: $scheme-main !default
28
+ $button-disabled-border-color: $border !default
28
29
  $button-disabled-shadow: none !default
29
30
  $button-disabled-opacity: 0.5 !default
30
31
 
31
- $button-static-color: $grey !default
32
- $button-static-background-color: $white-ter !default
33
- $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
34
35
 
35
36
  // The button sizes use mixins so they can be used at different breakpoints
36
37
  =button-small
@@ -70,14 +71,14 @@ $button-static-border-color: $grey-lighter !default
70
71
  height: 1.5em
71
72
  width: 1.5em
72
73
  &:first-child:not(:last-child)
73
- margin-left: calc(-0.375em - #{$button-border-width})
74
- margin-right: 0.1875em
74
+ +ltr-property("margin", calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width}), false)
75
+ +ltr-property("margin", $button-padding-horizontal / 4)
75
76
  &:last-child:not(:first-child)
76
- margin-left: 0.1875em
77
- margin-right: calc(-0.375em - #{$button-border-width})
77
+ +ltr-property("margin", $button-padding-horizontal / 4, false)
78
+ +ltr-property("margin", calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width}))
78
79
  &:first-child:last-child
79
- margin-left: calc(-0.375em - #{$button-border-width})
80
- margin-right: calc(-0.375em - #{$button-border-width})
80
+ margin-left: calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width})
81
+ margin-right: calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width})
81
82
  // States
82
83
  &:hover,
83
84
  &.is-hovered
@@ -98,7 +99,7 @@ $button-static-border-color: $grey-lighter !default
98
99
  background-color: transparent
99
100
  border-color: transparent
100
101
  color: $button-text-color
101
- text-decoration: underline
102
+ text-decoration: $button-text-decoration
102
103
  &:hover,
103
104
  &.is-hovered,
104
105
  &:focus,
@@ -107,7 +108,7 @@ $button-static-border-color: $grey-lighter !default
107
108
  color: $button-text-hover-color
108
109
  &:active,
109
110
  &.is-active
110
- background-color: darken($button-text-hover-background-color, 5%)
111
+ background-color: bulmaDarken($button-text-hover-background-color, 5%)
111
112
  color: $button-text-hover-color
112
113
  &[disabled],
113
114
  fieldset[disabled] &
@@ -123,7 +124,7 @@ $button-static-border-color: $grey-lighter !default
123
124
  color: $color-invert
124
125
  &:hover,
125
126
  &.is-hovered
126
- background-color: darken($color, 2.5%)
127
+ background-color: bulmaDarken($color, 2.5%)
127
128
  border-color: transparent
128
129
  color: $color-invert
129
130
  &:focus,
@@ -131,10 +132,10 @@ $button-static-border-color: $grey-lighter !default
131
132
  border-color: transparent
132
133
  color: $color-invert
133
134
  &:not(:active)
134
- box-shadow: $button-focus-box-shadow-size rgba($color, 0.25)
135
+ box-shadow: $button-focus-box-shadow-size bulmaRgba($color, 0.25)
135
136
  &:active,
136
137
  &.is-active
137
- background-color: darken($color, 5%)
138
+ background-color: bulmaDarken($color, 5%)
138
139
  border-color: transparent
139
140
  color: $color-invert
140
141
  &[disabled],
@@ -147,7 +148,7 @@ $button-static-border-color: $grey-lighter !default
147
148
  color: $color
148
149
  &:hover,
149
150
  &.is-hovered
150
- background-color: darken($color-invert, 5%)
151
+ background-color: bulmaDarken($color-invert, 5%)
151
152
  &[disabled],
152
153
  fieldset[disabled] &
153
154
  background-color: $color-invert
@@ -206,6 +207,23 @@ $button-static-border-color: $grey-lighter !default
206
207
  border-color: $color-invert
207
208
  box-shadow: none
208
209
  color: $color-invert
210
+ // If light and dark colors are provided
211
+ @if length($pair) >= 4
212
+ $color-light: nth($pair, 3)
213
+ $color-dark: nth($pair, 4)
214
+ &.is-light
215
+ background-color: $color-light
216
+ color: $color-dark
217
+ &:hover,
218
+ &.is-hovered
219
+ background-color: bulmaDarken($color-light, 2.5%)
220
+ border-color: transparent
221
+ color: $color-dark
222
+ &:active,
223
+ &.is-active
224
+ background-color: bulmaDarken($color-light, 5%)
225
+ border-color: transparent
226
+ color: $color-dark
209
227
  // Sizes
210
228
  &.is-small
211
229
  +button-small
@@ -240,8 +258,8 @@ $button-static-border-color: $grey-lighter !default
240
258
  pointer-events: none
241
259
  &.is-rounded
242
260
  border-radius: $radius-rounded
243
- padding-left: 1em
244
- padding-right: 1em
261
+ padding-left: calc(#{$button-padding-horizontal} + 0.25em)
262
+ padding-right: calc(#{$button-padding-horizontal} + 0.25em)
245
263
 
246
264
  .buttons
247
265
  align-items: center
@@ -251,7 +269,7 @@ $button-static-border-color: $grey-lighter !default
251
269
  .button
252
270
  margin-bottom: 0.5rem
253
271
  &:not(:last-child):not(.is-fullwidth)
254
- margin-right: 0.5rem
272
+ +ltr-property("margin", 0.5rem)
255
273
  &:last-child
256
274
  margin-bottom: -0.5rem
257
275
  &:not(:last-child)
@@ -274,9 +292,9 @@ $button-static-border-color: $grey-lighter !default
274
292
  &:not(:last-child)
275
293
  border-bottom-right-radius: 0
276
294
  border-top-right-radius: 0
277
- margin-right: -1px
295
+ +ltr-property("margin", -1px)
278
296
  &:last-child
279
- margin-right: 0
297
+ +ltr-property("margin", 0)
280
298
  &:hover,
281
299
  &.is-hovered
282
300
  z-index: 2
@@ -5,12 +5,13 @@ $container-offset: (2 * $gap) !default
5
5
  margin: 0 auto
6
6
  position: relative
7
7
  width: auto
8
+ &.is-fluid
9
+ max-width: none
10
+ padding-left: $gap
11
+ padding-right: $gap
12
+ width: 100%
8
13
  +desktop
9
14
  max-width: $desktop - $container-offset
10
- &.is-fluid
11
- margin-left: $gap
12
- margin-right: $gap
13
- max-width: none
14
15
  +until-widescreen
15
16
  &.is-widescreen
16
17
  max-width: $widescreen - $container-offset
@@ -67,11 +67,11 @@ $content-table-foot-cell-color: $text-strong !default
67
67
  margin-bottom: 1em
68
68
  blockquote
69
69
  background-color: $content-blockquote-background-color
70
- border-left: $content-blockquote-border-left
70
+ +ltr-property("border", $content-blockquote-border-left, false)
71
71
  padding: $content-blockquote-padding
72
72
  ol
73
73
  list-style-position: outside
74
- margin-left: 2em
74
+ +ltr-property("margin", 2em, false)
75
75
  margin-top: 1em
76
76
  &:not([type])
77
77
  list-style-type: decimal
@@ -85,7 +85,7 @@ $content-table-foot-cell-color: $text-strong !default
85
85
  list-style-type: upper-roman
86
86
  ul
87
87
  list-style: disc outside
88
- margin-left: 2em
88
+ +ltr-property("margin", 2em, false)
89
89
  margin-top: 1em
90
90
  ul
91
91
  list-style-type: circle
@@ -93,7 +93,7 @@ $content-table-foot-cell-color: $text-strong !default
93
93
  ul
94
94
  list-style-type: square
95
95
  dd
96
- margin-left: 2em
96
+ +ltr-property("margin", 2em, false)
97
97
  figure
98
98
  margin-left: 2em
99
99
  margin-right: 2em
@@ -126,7 +126,7 @@ $content-table-foot-cell-color: $text-strong !default
126
126
  th
127
127
  color: $content-table-cell-heading-color
128
128
  &:not([align])
129
- text-align: left
129
+ text-align: inherit
130
130
  thead
131
131
  td,
132
132
  th
@@ -9,6 +9,8 @@ $dimensions: 16 24 32 48 64 96 128 !default
9
9
  width: 100%
10
10
  &.is-rounded
11
11
  border-radius: $radius-rounded
12
+ &.is-fullwidth
13
+ width: 100%
12
14
  // Ratio
13
15
  &.is-square,
14
16
  &.is-1by1,
@@ -1,13 +1,19 @@
1
1
  $notification-background-color: $background !default
2
+ $notification-code-background-color: $scheme-main !default
2
3
  $notification-radius: $radius !default
3
4
  $notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default
5
+ $notification-padding-ltr: 1.25rem 2.5rem 1.25rem 1.5rem !default
6
+ $notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default
4
7
 
5
8
  .notification
6
9
  @extend %block
7
10
  background-color: $notification-background-color
8
11
  border-radius: $notification-radius
9
- padding: $notification-padding
10
12
  position: relative
13
+ +ltr
14
+ padding: $notification-padding-ltr
15
+ +rtl
16
+ padding: $notification-padding-rtl
11
17
  a:not(.button):not(.dropdown-item)
12
18
  color: currentColor
13
19
  text-decoration: underline
@@ -15,12 +21,12 @@ $notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default
15
21
  color: currentColor
16
22
  code,
17
23
  pre
18
- background: $white
24
+ background: $notification-code-background-color
19
25
  pre code
20
26
  background: transparent
21
27
  & > .delete
28
+ +ltr-position(0.5rem)
22
29
  position: absolute
23
- right: 0.5rem
24
30
  top: 0.5rem
25
31
  .title,
26
32
  .subtitle,
@@ -33,3 +39,10 @@ $notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default
33
39
  &.is-#{$name}
34
40
  background-color: $color
35
41
  color: $color-invert
42
+ // If light and dark colors are provided
43
+ @if length($pair) >= 4
44
+ $color-light: nth($pair, 3)
45
+ $color-dark: nth($pair, 4)
46
+ &.is-light
47
+ background-color: $color-light
48
+ color: $color-dark
@@ -1,4 +1,4 @@
1
- $progress-bar-background-color: $border !default
1
+ $progress-bar-background-color: $border-light !default
2
2
  $progress-value-background-color: $text !default
3
3
  $progress-border-radius: $radius-rounded !default
4
4
 
@@ -1,7 +1,7 @@
1
- $table-color: $grey-darker !default
2
- $table-background-color: $white !default
1
+ $table-color: $text-strong !default
2
+ $table-background-color: $scheme-main !default
3
3
 
4
- $table-cell-border: 1px solid $grey-lighter !default
4
+ $table-cell-border: 1px solid $border !default
5
5
  $table-cell-border-width: 0 0 1px !default
6
6
  $table-cell-padding: 0.5em 0.75em !default
7
7
  $table-cell-heading-color: $text-strong !default
@@ -15,13 +15,13 @@ $table-head-background-color: transparent !default
15
15
  $table-body-background-color: transparent !default
16
16
  $table-foot-background-color: transparent !default
17
17
 
18
- $table-row-hover-background-color: $white-bis !default
18
+ $table-row-hover-background-color: $scheme-main-bis !default
19
19
 
20
20
  $table-row-active-background-color: $primary !default
21
21
  $table-row-active-color: $primary-invert !default
22
22
 
23
- $table-striped-row-even-background-color: $white-bis !default
24
- $table-striped-row-even-hover-background-color: $white-ter !default
23
+ $table-striped-row-even-background-color: $scheme-main-bis !default
24
+ $table-striped-row-even-hover-background-color: $scheme-main-ter !default
25
25
 
26
26
  .table
27
27
  @extend %block
@@ -51,10 +51,12 @@ $table-striped-row-even-hover-background-color: $white-ter !default
51
51
  a,
52
52
  strong
53
53
  color: currentColor
54
+ &.is-vcentered
55
+ vertical-align: middle
54
56
  th
55
57
  color: $table-cell-heading-color
56
58
  &:not([align])
57
- text-align: left
59
+ text-align: inherit
58
60
  tr
59
61
  &.is-selected
60
62
  background-color: $table-row-active-background-color
@@ -11,7 +11,7 @@ $tag-delete-margin: 1px !default
11
11
  .tag
12
12
  margin-bottom: 0.5rem
13
13
  &:not(:last-child)
14
- margin-right: 0.5rem
14
+ +ltr-property("margin", 0.5rem)
15
15
  &:last-child
16
16
  margin-bottom: -0.5rem
17
17
  &:not(:last-child)
@@ -37,14 +37,22 @@ $tag-delete-margin: 1px !default
37
37
  margin-right: 0
38
38
  &.has-addons
39
39
  .tag
40
- margin-right: 0
40
+ +ltr-property("margin", 0)
41
41
  &:not(:first-child)
42
- margin-left: 0
43
- border-bottom-left-radius: 0
44
- border-top-left-radius: 0
42
+ +ltr-property("margin", 0, false)
43
+ +ltr
44
+ border-top-left-radius: 0
45
+ border-bottom-left-radius: 0
46
+ +rtl
47
+ border-top-right-radius: 0
48
+ border-bottom-right-radius: 0
45
49
  &:not(:last-child)
46
- border-bottom-right-radius: 0
47
- border-top-right-radius: 0
50
+ +ltr
51
+ border-top-right-radius: 0
52
+ border-bottom-right-radius: 0
53
+ +rtl
54
+ border-top-left-radius: 0
55
+ border-bottom-left-radius: 0
48
56
 
49
57
  .tag:not(body)
50
58
  align-items: center
@@ -60,8 +68,8 @@ $tag-delete-margin: 1px !default
60
68
  padding-right: 0.75em
61
69
  white-space: nowrap
62
70
  .delete
63
- margin-left: 0.25rem
64
- margin-right: -0.375rem
71
+ +ltr-property("margin", 0.25rem, false)
72
+ +ltr-property("margin", -0.375rem)
65
73
  // Colors
66
74
  @each $name, $pair in $colors
67
75
  $color: nth($pair, 1)
@@ -69,6 +77,13 @@ $tag-delete-margin: 1px !default
69
77
  &.is-#{$name}
70
78
  background-color: $color
71
79
  color: $color-invert
80
+ // If a light and dark colors are provided
81
+ @if length($pair) > 3
82
+ $color-light: nth($pair, 3)
83
+ $color-dark: nth($pair, 4)
84
+ &.is-light
85
+ background-color: $color-light
86
+ color: $color-dark
72
87
  // Sizes
73
88
  &.is-normal
74
89
  font-size: $size-small
@@ -78,17 +93,17 @@ $tag-delete-margin: 1px !default
78
93
  font-size: $size-medium
79
94
  .icon
80
95
  &:first-child:not(:last-child)
81
- margin-left: -0.375em
82
- margin-right: 0.1875em
96
+ +ltr-property("margin", -0.375em, false)
97
+ +ltr-property("margin", 0.1875em)
83
98
  &:last-child:not(:first-child)
84
- margin-left: 0.1875em
85
- margin-right: -0.375em
99
+ +ltr-property("margin", 0.1875em, false)
100
+ +ltr-property("margin", -0.375em)
86
101
  &:first-child:last-child
87
- margin-left: -0.375em
88
- margin-right: -0.375em
102
+ +ltr-property("margin", -0.375em, false)
103
+ +ltr-property("margin", -0.375em)
89
104
  // Modifiers
90
105
  &.is-delete
91
- margin-left: $tag-delete-margin
106
+ +ltr-property("margin", $tag-delete-margin, false)
92
107
  padding: 0
93
108
  position: relative
94
109
  width: 2em