| 1 |
$label-color: $text-strong !default |
| 2 |
$label-weight: $weight-bold !default |
| 3 |
|
| 4 |
$help-size: $size-small !default |
| 5 |
|
| 6 |
$label-colors: $form-colors !default |
| 7 |
|
| 8 |
.label |
| 9 |
color: $label-color |
| 10 |
display: block |
| 11 |
font-size: $size-normal |
| 12 |
font-weight: $label-weight |
| 13 |
&:not(:last-child) |
| 14 |
margin-bottom: 0.5em |
| 15 |
// Sizes |
| 16 |
&.is-small |
| 17 |
font-size: $size-small |
| 18 |
&.is-medium |
| 19 |
font-size: $size-medium |
| 20 |
&.is-large |
| 21 |
font-size: $size-large |
| 22 |
|
| 23 |
.help |
| 24 |
display: block |
| 25 |
font-size: $help-size |
| 26 |
margin-top: 0.25rem |
| 27 |
@each $name, $pair in $label-colors |
| 28 |
$color: nth($pair, 1) |
| 29 |
&.is-#{$name} |
| 30 |
color: $color |
| 31 |
|
| 32 |
// Containers |
| 33 |
|
| 34 |
.field |
| 35 |
&:not(:last-child) |
| 36 |
margin-bottom: 0.75rem |
| 37 |
// Modifiers |
| 38 |
&.has-addons |
| 39 |
display: flex |
| 40 |
justify-content: flex-start |
| 41 |
.control |
| 42 |
&:not(:last-child) |
| 43 |
+ltr-property("margin", -1px) |
| 44 |
&:not(:first-child):not(:last-child) |
| 45 |
.button, |
| 46 |
.input, |
| 47 |
.select select |
| 48 |
border-radius: 0 |
| 49 |
&:first-child:not(:only-child) |
| 50 |
.button, |
| 51 |
.input, |
| 52 |
.select select |
| 53 |
+ltr |
| 54 |
border-bottom-right-radius: 0 |
| 55 |
border-top-right-radius: 0 |
| 56 |
+rtl |
| 57 |
border-bottom-left-radius: 0 |
| 58 |
border-top-left-radius: 0 |
| 59 |
&:last-child:not(:only-child) |
| 60 |
.button, |
| 61 |
.input, |
| 62 |
.select select |
| 63 |
+ltr |
| 64 |
border-bottom-left-radius: 0 |
| 65 |
border-top-left-radius: 0 |
| 66 |
+rtl |
| 67 |
border-bottom-right-radius: 0 |
| 68 |
border-top-right-radius: 0 |
| 69 |
.button, |
| 70 |
.input, |
| 71 |
.select select |
| 72 |
&:not([disabled]) |
| 73 |
&:hover, |
| 74 |
&.is-hovered |
| 75 |
z-index: 2 |
| 76 |
&:focus, |
| 77 |
&.is-focused, |
| 78 |
&:active, |
| 79 |
&.is-active |
| 80 |
z-index: 3 |
| 81 |
&:hover |
| 82 |
z-index: 4 |
| 83 |
&.is-expanded |
| 84 |
flex-grow: 1 |
| 85 |
flex-shrink: 1 |
| 86 |
&.has-addons-centered |
| 87 |
justify-content: center |
| 88 |
&.has-addons-right |
| 89 |
justify-content: flex-end |
| 90 |
&.has-addons-fullwidth |
| 91 |
.control |
| 92 |
flex-grow: 1 |
| 93 |
flex-shrink: 0 |
| 94 |
&.is-grouped |
| 95 |
display: flex |
| 96 |
justify-content: flex-start |
| 97 |
& > .control |
| 98 |
flex-shrink: 0 |
| 99 |
&:not(:last-child) |
| 100 |
margin-bottom: 0 |
| 101 |
+ltr-property("margin", 0.75rem) |
| 102 |
&.is-expanded |
| 103 |
flex-grow: 1 |
| 104 |
flex-shrink: 1 |
| 105 |
&.is-grouped-centered |
| 106 |
justify-content: center |
| 107 |
&.is-grouped-right |
| 108 |
justify-content: flex-end |
| 109 |
&.is-grouped-multiline |
| 110 |
flex-wrap: wrap |
| 111 |
& > .control |
| 112 |
&:last-child, |
| 113 |
&:not(:last-child) |
| 114 |
margin-bottom: 0.75rem |
| 115 |
&:last-child |
| 116 |
margin-bottom: -0.75rem |
| 117 |
&:not(:last-child) |
| 118 |
margin-bottom: 0 |
| 119 |
&.is-horizontal |
| 120 |
+tablet |
| 121 |
display: flex |
| 122 |
|
| 123 |
.field-label |
| 124 |
.label |
| 125 |
font-size: inherit |
| 126 |
+mobile |
| 127 |
margin-bottom: 0.5rem |
| 128 |
+tablet |
| 129 |
flex-basis: 0 |
| 130 |
flex-grow: 1 |
| 131 |
flex-shrink: 0 |
| 132 |
+ltr-property("margin", 1.5rem) |
| 133 |
text-align: right |
| 134 |
&.is-small |
| 135 |
font-size: $size-small |
| 136 |
padding-top: 0.375em |
| 137 |
&.is-normal |
| 138 |
padding-top: 0.375em |
| 139 |
&.is-medium |
| 140 |
font-size: $size-medium |
| 141 |
padding-top: 0.375em |
| 142 |
&.is-large |
| 143 |
font-size: $size-large |
| 144 |
padding-top: 0.375em |
| 145 |
|
| 146 |
.field-body |
| 147 |
.field .field |
| 148 |
margin-bottom: 0 |
| 149 |
+tablet |
| 150 |
display: flex |
| 151 |
flex-basis: 0 |
| 152 |
flex-grow: 5 |
| 153 |
flex-shrink: 1 |
| 154 |
.field |
| 155 |
margin-bottom: 0 |
| 156 |
& > .field |
| 157 |
flex-shrink: 1 |
| 158 |
&:not(.is-narrow) |
| 159 |
flex-grow: 1 |
| 160 |
&:not(:last-child) |
| 161 |
+ltr-property("margin", 0.75rem) |
| 162 |
|
| 163 |
.control |
| 164 |
box-sizing: border-box |
| 165 |
clear: both |
| 166 |
font-size: $size-normal |
| 167 |
position: relative |
| 168 |
text-align: inherit |
| 169 |
// Modifiers |
| 170 |
&.has-icons-left, |
| 171 |
&.has-icons-right |
| 172 |
.input, |
| 173 |
.select |
| 174 |
&:focus |
| 175 |
& ~ .icon |
| 176 |
color: $input-icon-active-color |
| 177 |
&.is-small ~ .icon |
| 178 |
font-size: $size-small |
| 179 |
&.is-medium ~ .icon |
| 180 |
font-size: $size-medium |
| 181 |
&.is-large ~ .icon |
| 182 |
font-size: $size-large |
| 183 |
.icon |
| 184 |
color: $input-icon-color |
| 185 |
height: $input-height |
| 186 |
pointer-events: none |
| 187 |
position: absolute |
| 188 |
top: 0 |
| 189 |
width: $input-height |
| 190 |
z-index: 4 |
| 191 |
&.has-icons-left |
| 192 |
.input, |
| 193 |
.select select |
| 194 |
padding-left: $input-height |
| 195 |
.icon.is-left |
| 196 |
left: 0 |
| 197 |
&.has-icons-right |
| 198 |
.input, |
| 199 |
.select select |
| 200 |
padding-right: $input-height |
| 201 |
.icon.is-right |
| 202 |
right: 0 |
| 203 |
&.is-loading |
| 204 |
&::after |
| 205 |
@extend %loader |
| 206 |
position: absolute !important |
| 207 |
+ltr-position(0.625em) |
| 208 |
top: 0.625em |
| 209 |
z-index: 4 |
| 210 |
&.is-small:after |
| 211 |
font-size: $size-small |
| 212 |
&.is-medium:after |
| 213 |
font-size: $size-medium |
| 214 |
&.is-large:after |
| 215 |
font-size: $size-large |