mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-28 12:24:23 +00:00
80 lines
2.0 KiB
SCSS
80 lines
2.0 KiB
SCSS
@import "derived-variables";
|
|
|
|
$control-radius: getVar("radius") !default;
|
|
$control-radius-small: getVar("radius-small") !default;
|
|
|
|
$control-border-width: 1px !default;
|
|
|
|
$control-height: 2.5em !default;
|
|
$control-line-height: 1.5 !default;
|
|
|
|
$control-padding-vertical: calc(
|
|
0.5em - #{getVar("control-border-width")}
|
|
) !default;
|
|
$control-padding-horizontal: calc(
|
|
0.75em - #{getVar("control-border-width")}
|
|
) !default;
|
|
|
|
:root {
|
|
@include register-vars(
|
|
(
|
|
control-radius: #{$control-radius},
|
|
control-radius-small: #{$control-radius-small},
|
|
control-border-width: #{$control-border-width},
|
|
control-height: #{$control-height},
|
|
control-line-height: #{$control-line-height},
|
|
control-padding-vertical: #{$control-padding-vertical},
|
|
control-padding-horizontal: #{$control-padding-horizontal},
|
|
)
|
|
);
|
|
}
|
|
|
|
@mixin control {
|
|
-moz-appearance: none;
|
|
-webkit-appearance: none;
|
|
align-items: center;
|
|
border-color: transparent;
|
|
border-radius: getVar("control-radius");
|
|
border-style: solid;
|
|
border-width: getVar("control-border-width");
|
|
box-shadow: none;
|
|
display: inline-flex;
|
|
font-size: getVar("size-normal");
|
|
height: getVar("control-height");
|
|
justify-content: flex-start;
|
|
line-height: getVar("control-line-height");
|
|
padding-bottom: getVar("control-padding-vertical");
|
|
padding-left: getVar("control-padding-horizontal");
|
|
padding-right: getVar("control-padding-horizontal");
|
|
padding-top: getVar("control-padding-vertical");
|
|
position: relative;
|
|
vertical-align: top;
|
|
|
|
// States
|
|
&:focus,
|
|
&.is-focused,
|
|
&:active,
|
|
&.is-active {
|
|
outline: none;
|
|
}
|
|
|
|
&[disabled],
|
|
fieldset[disabled] & {
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
|
|
// The controls sizes use mixins so they can be used at different breakpoints
|
|
@mixin control-small {
|
|
border-radius: getVar("control-radius-small");
|
|
font-size: getVar("size-small");
|
|
}
|
|
|
|
@mixin control-medium {
|
|
font-size: getVar("size-medium");
|
|
}
|
|
|
|
@mixin control-large {
|
|
font-size: getVar("size-large");
|
|
}
|