bulma-sass-rails 0.9.3

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 (74) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/README.md +43 -0
  4. data/app/assets/stylesheets/bulma-rtl.sass +3 -0
  5. data/app/assets/stylesheets/bulma.sass +10 -0
  6. data/app/assets/stylesheets/sass/base/_all.sass +6 -0
  7. data/app/assets/stylesheets/sass/base/animations.sass +5 -0
  8. data/app/assets/stylesheets/sass/base/generic.sass +145 -0
  9. data/app/assets/stylesheets/sass/base/helpers.sass +1 -0
  10. data/app/assets/stylesheets/sass/base/minireset.sass +79 -0
  11. data/app/assets/stylesheets/sass/components/_all.sass +15 -0
  12. data/app/assets/stylesheets/sass/components/breadcrumb.sass +77 -0
  13. data/app/assets/stylesheets/sass/components/card.sass +103 -0
  14. data/app/assets/stylesheets/sass/components/dropdown.sass +83 -0
  15. data/app/assets/stylesheets/sass/components/level.sass +79 -0
  16. data/app/assets/stylesheets/sass/components/media.sass +59 -0
  17. data/app/assets/stylesheets/sass/components/menu.sass +59 -0
  18. data/app/assets/stylesheets/sass/components/message.sass +101 -0
  19. data/app/assets/stylesheets/sass/components/modal.sass +117 -0
  20. data/app/assets/stylesheets/sass/components/navbar.sass +446 -0
  21. data/app/assets/stylesheets/sass/components/pagination.sass +167 -0
  22. data/app/assets/stylesheets/sass/components/panel.sass +121 -0
  23. data/app/assets/stylesheets/sass/components/tabs.sass +176 -0
  24. data/app/assets/stylesheets/sass/elements/_all.sass +16 -0
  25. data/app/assets/stylesheets/sass/elements/box.sass +26 -0
  26. data/app/assets/stylesheets/sass/elements/button.sass +345 -0
  27. data/app/assets/stylesheets/sass/elements/container.sass +29 -0
  28. data/app/assets/stylesheets/sass/elements/content.sass +159 -0
  29. data/app/assets/stylesheets/sass/elements/form.sass +1 -0
  30. data/app/assets/stylesheets/sass/elements/icon.sass +46 -0
  31. data/app/assets/stylesheets/sass/elements/image.sass +73 -0
  32. data/app/assets/stylesheets/sass/elements/notification.sass +52 -0
  33. data/app/assets/stylesheets/sass/elements/other.sass +31 -0
  34. data/app/assets/stylesheets/sass/elements/progress.sass +73 -0
  35. data/app/assets/stylesheets/sass/elements/table.sass +133 -0
  36. data/app/assets/stylesheets/sass/elements/tag.sass +140 -0
  37. data/app/assets/stylesheets/sass/elements/title.sass +70 -0
  38. data/app/assets/stylesheets/sass/form/_all.sass +9 -0
  39. data/app/assets/stylesheets/sass/form/checkbox-radio.sass +22 -0
  40. data/app/assets/stylesheets/sass/form/file.sass +184 -0
  41. data/app/assets/stylesheets/sass/form/input-textarea.sass +66 -0
  42. data/app/assets/stylesheets/sass/form/select.sass +87 -0
  43. data/app/assets/stylesheets/sass/form/shared.sass +60 -0
  44. data/app/assets/stylesheets/sass/form/tools.sass +215 -0
  45. data/app/assets/stylesheets/sass/grid/_all.sass +5 -0
  46. data/app/assets/stylesheets/sass/grid/columns.sass +513 -0
  47. data/app/assets/stylesheets/sass/grid/tiles.sass +36 -0
  48. data/app/assets/stylesheets/sass/helpers/_all.sass +12 -0
  49. data/app/assets/stylesheets/sass/helpers/color.sass +39 -0
  50. data/app/assets/stylesheets/sass/helpers/flexbox.sass +35 -0
  51. data/app/assets/stylesheets/sass/helpers/float.sass +10 -0
  52. data/app/assets/stylesheets/sass/helpers/other.sass +14 -0
  53. data/app/assets/stylesheets/sass/helpers/overflow.sass +2 -0
  54. data/app/assets/stylesheets/sass/helpers/position.sass +7 -0
  55. data/app/assets/stylesheets/sass/helpers/spacing.sass +31 -0
  56. data/app/assets/stylesheets/sass/helpers/typography.sass +103 -0
  57. data/app/assets/stylesheets/sass/helpers/visibility.sass +122 -0
  58. data/app/assets/stylesheets/sass/layout/_all.sass +6 -0
  59. data/app/assets/stylesheets/sass/layout/footer.sass +11 -0
  60. data/app/assets/stylesheets/sass/layout/hero.sass +153 -0
  61. data/app/assets/stylesheets/sass/layout/section.sass +17 -0
  62. data/app/assets/stylesheets/sass/utilities/_all.sass +9 -0
  63. data/app/assets/stylesheets/sass/utilities/animations.sass +1 -0
  64. data/app/assets/stylesheets/sass/utilities/controls.sass +49 -0
  65. data/app/assets/stylesheets/sass/utilities/derived-variables.sass +114 -0
  66. data/app/assets/stylesheets/sass/utilities/extends.sass +25 -0
  67. data/app/assets/stylesheets/sass/utilities/functions.sass +135 -0
  68. data/app/assets/stylesheets/sass/utilities/initial-variables.sass +78 -0
  69. data/app/assets/stylesheets/sass/utilities/mixins.sass +284 -0
  70. data/bulma-sass-rails.gemspec +18 -0
  71. data/lib/bulma/engine.rb +4 -0
  72. data/lib/bulma/version.rb +3 -0
  73. data/lib/bulma-sass-rails.rb +5 -0
  74. metadata +130 -0
@@ -0,0 +1,159 @@
1
+ @import "../utilities/mixins"
2
+
3
+ $content-heading-color: $text-strong !default
4
+ $content-heading-weight: $weight-semibold !default
5
+ $content-heading-line-height: 1.125 !default
6
+
7
+ $content-blockquote-background-color: $background !default
8
+ $content-blockquote-border-left: 5px solid $border !default
9
+ $content-blockquote-padding: 1.25em 1.5em !default
10
+
11
+ $content-pre-padding: 1.25em 1.5em !default
12
+
13
+ $content-table-cell-border: 1px solid $border !default
14
+ $content-table-cell-border-width: 0 0 1px !default
15
+ $content-table-cell-padding: 0.5em 0.75em !default
16
+ $content-table-cell-heading-color: $text-strong !default
17
+ $content-table-head-cell-border-width: 0 0 2px !default
18
+ $content-table-head-cell-color: $text-strong !default
19
+ $content-table-foot-cell-border-width: 2px 0 0 !default
20
+ $content-table-foot-cell-color: $text-strong !default
21
+
22
+ .content
23
+ @extend %block
24
+ // Inline
25
+ li + li
26
+ margin-top: 0.25em
27
+ // Block
28
+ p,
29
+ dl,
30
+ ol,
31
+ ul,
32
+ blockquote,
33
+ pre,
34
+ table
35
+ &:not(:last-child)
36
+ margin-bottom: 1em
37
+ h1,
38
+ h2,
39
+ h3,
40
+ h4,
41
+ h5,
42
+ h6
43
+ color: $content-heading-color
44
+ font-weight: $content-heading-weight
45
+ line-height: $content-heading-line-height
46
+ h1
47
+ font-size: 2em
48
+ margin-bottom: 0.5em
49
+ &:not(:first-child)
50
+ margin-top: 1em
51
+ h2
52
+ font-size: 1.75em
53
+ margin-bottom: 0.5714em
54
+ &:not(:first-child)
55
+ margin-top: 1.1428em
56
+ h3
57
+ font-size: 1.5em
58
+ margin-bottom: 0.6666em
59
+ &:not(:first-child)
60
+ margin-top: 1.3333em
61
+ h4
62
+ font-size: 1.25em
63
+ margin-bottom: 0.8em
64
+ h5
65
+ font-size: 1.125em
66
+ margin-bottom: 0.8888em
67
+ h6
68
+ font-size: 1em
69
+ margin-bottom: 1em
70
+ blockquote
71
+ background-color: $content-blockquote-background-color
72
+ +ltr-property("border", $content-blockquote-border-left, false)
73
+ padding: $content-blockquote-padding
74
+ ol
75
+ list-style-position: outside
76
+ +ltr-property("margin", 2em, false)
77
+ margin-top: 1em
78
+ &:not([type])
79
+ list-style-type: decimal
80
+ &.is-lower-alpha
81
+ list-style-type: lower-alpha
82
+ &.is-lower-roman
83
+ list-style-type: lower-roman
84
+ &.is-upper-alpha
85
+ list-style-type: upper-alpha
86
+ &.is-upper-roman
87
+ list-style-type: upper-roman
88
+ ul
89
+ list-style: disc outside
90
+ +ltr-property("margin", 2em, false)
91
+ margin-top: 1em
92
+ ul
93
+ list-style-type: circle
94
+ margin-top: 0.5em
95
+ ul
96
+ list-style-type: square
97
+ dd
98
+ +ltr-property("margin", 2em, false)
99
+ figure
100
+ margin-left: 2em
101
+ margin-right: 2em
102
+ text-align: center
103
+ &:not(:first-child)
104
+ margin-top: 2em
105
+ &:not(:last-child)
106
+ margin-bottom: 2em
107
+ img
108
+ display: inline-block
109
+ figcaption
110
+ font-style: italic
111
+ pre
112
+ +overflow-touch
113
+ overflow-x: auto
114
+ padding: $content-pre-padding
115
+ white-space: pre
116
+ word-wrap: normal
117
+ sup,
118
+ sub
119
+ font-size: 75%
120
+ table
121
+ width: 100%
122
+ td,
123
+ th
124
+ border: $content-table-cell-border
125
+ border-width: $content-table-cell-border-width
126
+ padding: $content-table-cell-padding
127
+ vertical-align: top
128
+ th
129
+ color: $content-table-cell-heading-color
130
+ &:not([align])
131
+ text-align: inherit
132
+ thead
133
+ td,
134
+ th
135
+ border-width: $content-table-head-cell-border-width
136
+ color: $content-table-head-cell-color
137
+ tfoot
138
+ td,
139
+ th
140
+ border-width: $content-table-foot-cell-border-width
141
+ color: $content-table-foot-cell-color
142
+ tbody
143
+ tr
144
+ &:last-child
145
+ td,
146
+ th
147
+ border-bottom-width: 0
148
+ .tabs
149
+ li + li
150
+ margin-top: 0
151
+ // Sizes
152
+ &.is-small
153
+ font-size: $size-small
154
+ &.is-normal
155
+ font-size: $size-normal
156
+ &.is-medium
157
+ font-size: $size-medium
158
+ &.is-large
159
+ font-size: $size-large
@@ -0,0 +1 @@
1
+ @warn "The form.sass file is DEPRECATED. It has moved into its own /form folder. Please import sass/form/_all instead."
@@ -0,0 +1,46 @@
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
+ $icon-text-spacing: 0.25em !default
6
+
7
+ .icon
8
+ align-items: center
9
+ display: inline-flex
10
+ justify-content: center
11
+ height: $icon-dimensions
12
+ width: $icon-dimensions
13
+ // Sizes
14
+ &.is-small
15
+ height: $icon-dimensions-small
16
+ width: $icon-dimensions-small
17
+ &.is-medium
18
+ height: $icon-dimensions-medium
19
+ width: $icon-dimensions-medium
20
+ &.is-large
21
+ height: $icon-dimensions-large
22
+ width: $icon-dimensions-large
23
+
24
+ .icon-text
25
+ align-items: flex-start
26
+ color: inherit
27
+ display: inline-flex
28
+ flex-wrap: wrap
29
+ line-height: $icon-dimensions
30
+ vertical-align: top
31
+ .icon
32
+ flex-grow: 0
33
+ flex-shrink: 0
34
+ &:not(:last-child)
35
+ +ltr
36
+ margin-right: $icon-text-spacing
37
+ +rtl
38
+ margin-left: $icon-text-spacing
39
+ &:not(:first-child)
40
+ +ltr
41
+ margin-left: $icon-text-spacing
42
+ +rtl
43
+ margin-right: $icon-text-spacing
44
+
45
+ div.icon-text
46
+ display: flex
@@ -0,0 +1,73 @@
1
+ @import "../utilities/mixins"
2
+
3
+ $dimensions: 16 24 32 48 64 96 128 !default
4
+
5
+ .image
6
+ display: block
7
+ position: relative
8
+ img
9
+ display: block
10
+ height: auto
11
+ width: 100%
12
+ &.is-rounded
13
+ border-radius: $radius-rounded
14
+ &.is-fullwidth
15
+ width: 100%
16
+ // Ratio
17
+ &.is-square,
18
+ &.is-1by1,
19
+ &.is-5by4,
20
+ &.is-4by3,
21
+ &.is-3by2,
22
+ &.is-5by3,
23
+ &.is-16by9,
24
+ &.is-2by1,
25
+ &.is-3by1,
26
+ &.is-4by5,
27
+ &.is-3by4,
28
+ &.is-2by3,
29
+ &.is-3by5,
30
+ &.is-9by16,
31
+ &.is-1by2,
32
+ &.is-1by3
33
+ img,
34
+ .has-ratio
35
+ @extend %overlay
36
+ height: 100%
37
+ width: 100%
38
+ &.is-square,
39
+ &.is-1by1
40
+ padding-top: 100%
41
+ &.is-5by4
42
+ padding-top: 80%
43
+ &.is-4by3
44
+ padding-top: 75%
45
+ &.is-3by2
46
+ padding-top: 66.6666%
47
+ &.is-5by3
48
+ padding-top: 60%
49
+ &.is-16by9
50
+ padding-top: 56.25%
51
+ &.is-2by1
52
+ padding-top: 50%
53
+ &.is-3by1
54
+ padding-top: 33.3333%
55
+ &.is-4by5
56
+ padding-top: 125%
57
+ &.is-3by4
58
+ padding-top: 133.3333%
59
+ &.is-2by3
60
+ padding-top: 150%
61
+ &.is-3by5
62
+ padding-top: 166.6666%
63
+ &.is-9by16
64
+ padding-top: 177.7777%
65
+ &.is-1by2
66
+ padding-top: 200%
67
+ &.is-1by3
68
+ padding-top: 300%
69
+ // Sizes
70
+ @each $dimension in $dimensions
71
+ &.is-#{$dimension}x#{$dimension}
72
+ height: $dimension * 1px
73
+ width: $dimension * 1px
@@ -0,0 +1,52 @@
1
+ @import "../utilities/mixins"
2
+
3
+ $notification-background-color: $background !default
4
+ $notification-code-background-color: $scheme-main !default
5
+ $notification-radius: $radius !default
6
+ $notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default
7
+ $notification-padding-ltr: 1.25rem 2.5rem 1.25rem 1.5rem !default
8
+ $notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default
9
+
10
+ $notification-colors: $colors !default
11
+
12
+ .notification
13
+ @extend %block
14
+ background-color: $notification-background-color
15
+ border-radius: $notification-radius
16
+ position: relative
17
+ +ltr
18
+ padding: $notification-padding-ltr
19
+ +rtl
20
+ padding: $notification-padding-rtl
21
+ a:not(.button):not(.dropdown-item)
22
+ color: currentColor
23
+ text-decoration: underline
24
+ strong
25
+ color: currentColor
26
+ code,
27
+ pre
28
+ background: $notification-code-background-color
29
+ pre code
30
+ background: transparent
31
+ & > .delete
32
+ +ltr-position(0.5rem)
33
+ position: absolute
34
+ top: 0.5rem
35
+ .title,
36
+ .subtitle,
37
+ .content
38
+ color: currentColor
39
+ // Colors
40
+ @each $name, $pair in $notification-colors
41
+ $color: nth($pair, 1)
42
+ $color-invert: nth($pair, 2)
43
+ &.is-#{$name}
44
+ background-color: $color
45
+ color: $color-invert
46
+ // If light and dark colors are provided
47
+ @if length($pair) >= 4
48
+ $color-light: nth($pair, 3)
49
+ $color-dark: nth($pair, 4)
50
+ &.is-light
51
+ background-color: $color-light
52
+ color: $color-dark
@@ -0,0 +1,31 @@
1
+ @import "../utilities/mixins"
2
+
3
+ .block
4
+ @extend %block
5
+
6
+ .delete
7
+ @extend %delete
8
+
9
+ .heading
10
+ display: block
11
+ font-size: 11px
12
+ letter-spacing: 1px
13
+ margin-bottom: 5px
14
+ text-transform: uppercase
15
+
16
+ .loader
17
+ @extend %loader
18
+
19
+ .number
20
+ align-items: center
21
+ background-color: $background
22
+ border-radius: $radius-rounded
23
+ display: inline-flex
24
+ font-size: $size-medium
25
+ height: 2em
26
+ justify-content: center
27
+ margin-right: 1.5rem
28
+ min-width: 2.5em
29
+ padding: 0.25rem 0.5rem
30
+ text-align: center
31
+ vertical-align: top
@@ -0,0 +1,73 @@
1
+ @import "../utilities/mixins"
2
+
3
+ $progress-bar-background-color: $border-light !default
4
+ $progress-value-background-color: $text !default
5
+ $progress-border-radius: $radius-rounded !default
6
+
7
+ $progress-indeterminate-duration: 1.5s !default
8
+
9
+ $progress-colors: $colors !default
10
+
11
+ .progress
12
+ @extend %block
13
+ -moz-appearance: none
14
+ -webkit-appearance: none
15
+ border: none
16
+ border-radius: $progress-border-radius
17
+ display: block
18
+ height: $size-normal
19
+ overflow: hidden
20
+ padding: 0
21
+ width: 100%
22
+ &::-webkit-progress-bar
23
+ background-color: $progress-bar-background-color
24
+ &::-webkit-progress-value
25
+ background-color: $progress-value-background-color
26
+ &::-moz-progress-bar
27
+ background-color: $progress-value-background-color
28
+ &::-ms-fill
29
+ background-color: $progress-value-background-color
30
+ border: none
31
+ // Colors
32
+ @each $name, $pair in $progress-colors
33
+ $color: nth($pair, 1)
34
+ &.is-#{$name}
35
+ &::-webkit-progress-value
36
+ background-color: $color
37
+ &::-moz-progress-bar
38
+ background-color: $color
39
+ &::-ms-fill
40
+ background-color: $color
41
+ &:indeterminate
42
+ background-image: linear-gradient(to right, $color 30%, $progress-bar-background-color 30%)
43
+
44
+ &:indeterminate
45
+ animation-duration: $progress-indeterminate-duration
46
+ animation-iteration-count: infinite
47
+ animation-name: moveIndeterminate
48
+ animation-timing-function: linear
49
+ background-color: $progress-bar-background-color
50
+ background-image: linear-gradient(to right, $text 30%, $progress-bar-background-color 30%)
51
+ background-position: top left
52
+ background-repeat: no-repeat
53
+ background-size: 150% 150%
54
+ &::-webkit-progress-bar
55
+ background-color: transparent
56
+ &::-moz-progress-bar
57
+ background-color: transparent
58
+ &::-ms-fill
59
+ animation-name: none
60
+
61
+ // Sizes
62
+ &.is-small
63
+ height: $size-small
64
+ &.is-medium
65
+ height: $size-medium
66
+ &.is-large
67
+ height: $size-large
68
+
69
+ @keyframes moveIndeterminate
70
+ from
71
+ background-position: 200% 0
72
+ to
73
+ background-position: -200% 0
@@ -0,0 +1,133 @@
1
+ @import "../utilities/mixins"
2
+
3
+ $table-color: $text-strong !default
4
+ $table-background-color: $scheme-main !default
5
+
6
+ $table-cell-border: 1px solid $border !default
7
+ $table-cell-border-width: 0 0 1px !default
8
+ $table-cell-padding: 0.5em 0.75em !default
9
+ $table-cell-heading-color: $text-strong !default
10
+
11
+ $table-head-cell-border-width: 0 0 2px !default
12
+ $table-head-cell-color: $text-strong !default
13
+ $table-foot-cell-border-width: 2px 0 0 !default
14
+ $table-foot-cell-color: $text-strong !default
15
+
16
+ $table-head-background-color: transparent !default
17
+ $table-body-background-color: transparent !default
18
+ $table-foot-background-color: transparent !default
19
+
20
+ $table-row-hover-background-color: $scheme-main-bis !default
21
+
22
+ $table-row-active-background-color: $primary !default
23
+ $table-row-active-color: $primary-invert !default
24
+
25
+ $table-striped-row-even-background-color: $scheme-main-bis !default
26
+ $table-striped-row-even-hover-background-color: $scheme-main-ter !default
27
+
28
+ $table-colors: $colors !default
29
+
30
+ .table
31
+ @extend %block
32
+ background-color: $table-background-color
33
+ color: $table-color
34
+ td,
35
+ th
36
+ border: $table-cell-border
37
+ border-width: $table-cell-border-width
38
+ padding: $table-cell-padding
39
+ vertical-align: top
40
+ // Colors
41
+ @each $name, $pair in $table-colors
42
+ $color: nth($pair, 1)
43
+ $color-invert: nth($pair, 2)
44
+ &.is-#{$name}
45
+ background-color: $color
46
+ border-color: $color
47
+ color: $color-invert
48
+ // Modifiers
49
+ &.is-narrow
50
+ white-space: nowrap
51
+ width: 1%
52
+ &.is-selected
53
+ background-color: $table-row-active-background-color
54
+ color: $table-row-active-color
55
+ a,
56
+ strong
57
+ color: currentColor
58
+ &.is-vcentered
59
+ vertical-align: middle
60
+ th
61
+ color: $table-cell-heading-color
62
+ &:not([align])
63
+ text-align: inherit
64
+ tr
65
+ &.is-selected
66
+ background-color: $table-row-active-background-color
67
+ color: $table-row-active-color
68
+ a,
69
+ strong
70
+ color: currentColor
71
+ td,
72
+ th
73
+ border-color: $table-row-active-color
74
+ color: currentColor
75
+ thead
76
+ background-color: $table-head-background-color
77
+ td,
78
+ th
79
+ border-width: $table-head-cell-border-width
80
+ color: $table-head-cell-color
81
+ tfoot
82
+ background-color: $table-foot-background-color
83
+ td,
84
+ th
85
+ border-width: $table-foot-cell-border-width
86
+ color: $table-foot-cell-color
87
+ tbody
88
+ background-color: $table-body-background-color
89
+ tr
90
+ &:last-child
91
+ td,
92
+ th
93
+ border-bottom-width: 0
94
+ // Modifiers
95
+ &.is-bordered
96
+ td,
97
+ th
98
+ border-width: 1px
99
+ tr
100
+ &:last-child
101
+ td,
102
+ th
103
+ border-bottom-width: 1px
104
+ &.is-fullwidth
105
+ width: 100%
106
+ &.is-hoverable
107
+ tbody
108
+ tr:not(.is-selected)
109
+ &:hover
110
+ background-color: $table-row-hover-background-color
111
+ &.is-striped
112
+ tbody
113
+ tr:not(.is-selected)
114
+ &:hover
115
+ background-color: $table-row-hover-background-color
116
+ &:nth-child(even)
117
+ background-color: $table-striped-row-even-hover-background-color
118
+ &.is-narrow
119
+ td,
120
+ th
121
+ padding: 0.25em 0.5em
122
+ &.is-striped
123
+ tbody
124
+ tr:not(.is-selected)
125
+ &:nth-child(even)
126
+ background-color: $table-striped-row-even-background-color
127
+
128
+ .table-container
129
+ @extend %block
130
+ +overflow-touch
131
+ overflow: auto
132
+ overflow-y: hidden
133
+ max-width: 100%
@@ -0,0 +1,140 @@
1
+ @import "../utilities/mixins"
2
+
3
+ $tag-background-color: $background !default
4
+ $tag-color: $text !default
5
+ $tag-radius: $radius !default
6
+ $tag-delete-margin: 1px !default
7
+
8
+ $tag-colors: $colors !default
9
+
10
+ .tags
11
+ align-items: center
12
+ display: flex
13
+ flex-wrap: wrap
14
+ justify-content: flex-start
15
+ .tag
16
+ margin-bottom: 0.5rem
17
+ &:not(:last-child)
18
+ +ltr-property("margin", 0.5rem)
19
+ &:last-child
20
+ margin-bottom: -0.5rem
21
+ &:not(:last-child)
22
+ margin-bottom: 1rem
23
+ // Sizes
24
+ &.are-medium
25
+ .tag:not(.is-normal):not(.is-large)
26
+ font-size: $size-normal
27
+ &.are-large
28
+ .tag:not(.is-normal):not(.is-medium)
29
+ font-size: $size-medium
30
+ &.is-centered
31
+ justify-content: center
32
+ .tag
33
+ margin-right: 0.25rem
34
+ margin-left: 0.25rem
35
+ &.is-right
36
+ justify-content: flex-end
37
+ .tag
38
+ &:not(:first-child)
39
+ margin-left: 0.5rem
40
+ &:not(:last-child)
41
+ margin-right: 0
42
+ &.has-addons
43
+ .tag
44
+ +ltr-property("margin", 0)
45
+ &:not(:first-child)
46
+ +ltr-property("margin", 0, false)
47
+ +ltr
48
+ border-top-left-radius: 0
49
+ border-bottom-left-radius: 0
50
+ +rtl
51
+ border-top-right-radius: 0
52
+ border-bottom-right-radius: 0
53
+ &:not(:last-child)
54
+ +ltr
55
+ border-top-right-radius: 0
56
+ border-bottom-right-radius: 0
57
+ +rtl
58
+ border-top-left-radius: 0
59
+ border-bottom-left-radius: 0
60
+
61
+ .tag:not(body)
62
+ align-items: center
63
+ background-color: $tag-background-color
64
+ border-radius: $tag-radius
65
+ color: $tag-color
66
+ display: inline-flex
67
+ font-size: $size-small
68
+ height: 2em
69
+ justify-content: center
70
+ line-height: 1.5
71
+ padding-left: 0.75em
72
+ padding-right: 0.75em
73
+ white-space: nowrap
74
+ .delete
75
+ +ltr-property("margin", 0.25rem, false)
76
+ +ltr-property("margin", -0.375rem)
77
+ // Colors
78
+ @each $name, $pair in $tag-colors
79
+ $color: nth($pair, 1)
80
+ $color-invert: nth($pair, 2)
81
+ &.is-#{$name}
82
+ background-color: $color
83
+ color: $color-invert
84
+ // If a light and dark colors are provided
85
+ @if length($pair) > 3
86
+ $color-light: nth($pair, 3)
87
+ $color-dark: nth($pair, 4)
88
+ &.is-light
89
+ background-color: $color-light
90
+ color: $color-dark
91
+ // Sizes
92
+ &.is-normal
93
+ font-size: $size-small
94
+ &.is-medium
95
+ font-size: $size-normal
96
+ &.is-large
97
+ font-size: $size-medium
98
+ .icon
99
+ &:first-child:not(:last-child)
100
+ +ltr-property("margin", -0.375em, false)
101
+ +ltr-property("margin", 0.1875em)
102
+ &:last-child:not(:first-child)
103
+ +ltr-property("margin", 0.1875em, false)
104
+ +ltr-property("margin", -0.375em)
105
+ &:first-child:last-child
106
+ +ltr-property("margin", -0.375em, false)
107
+ +ltr-property("margin", -0.375em)
108
+ // Modifiers
109
+ &.is-delete
110
+ +ltr-property("margin", $tag-delete-margin, false)
111
+ padding: 0
112
+ position: relative
113
+ width: 2em
114
+ &::before,
115
+ &::after
116
+ background-color: currentColor
117
+ content: ""
118
+ display: block
119
+ left: 50%
120
+ position: absolute
121
+ top: 50%
122
+ transform: translateX(-50%) translateY(-50%) rotate(45deg)
123
+ transform-origin: center center
124
+ &::before
125
+ height: 1px
126
+ width: 50%
127
+ &::after
128
+ height: 50%
129
+ width: 1px
130
+ &:hover,
131
+ &:focus
132
+ background-color: darken($tag-background-color, 5%)
133
+ &:active
134
+ background-color: darken($tag-background-color, 10%)
135
+ &.is-rounded
136
+ border-radius: $radius-rounded
137
+
138
+ a.tag
139
+ &:hover
140
+ text-decoration: underline