Files
mixtape/zero.Web.UI/Sass/Core/_forms.scss
T

196 lines
3.4 KiB
SCSS
Raw Normal View History

2020-03-27 01:17:22 +01:00
// placeholder
// --------------------------------
2020-04-08 15:16:05 +02:00
::placeholder
{
color: var(--color-input-placeholder);
2020-04-08 15:16:05 +02:00
}
// inputs
// --------------------------------
2020-04-21 16:23:43 +02:00
input[type="text"], input[type="color"], input[type="date"], input[type="datetime"], input[type="email"], input[type="file"], input[type="month"], input[type="number"],
input[type="password"], input[type="range"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], input[type="week"],
textarea, .ui-native-select, .ui-rte-input
2020-03-27 01:17:22 +01:00
{
@extend %font;
background: var(--color-input);
2020-09-09 18:59:12 +02:00
border: 1px solid transparent;
font-size: var(--font-size);
2020-03-27 01:17:22 +01:00
display: inline-block;
2021-01-06 12:03:21 +01:00
height: 48px;
padding: 6px 16px;
2020-03-27 01:17:22 +01:00
line-height: 1.5;
color: var(--color-text);
border-radius: var(--radius);
2020-03-27 01:17:22 +01:00
vertical-align: middle;
box-sizing: border-box;
width: 100%;
2020-03-30 17:11:56 +02:00
2020-09-14 00:39:47 +02:00
&:not(:disabled):not([readonly]):focus
2020-03-30 17:11:56 +02:00
{
2020-09-09 18:59:12 +02:00
background-color: var(--color-input-focus-bg);
border: var(--color-input-focus-border);
box-shadow: var(--color-input-focus-shadow);
outline: none;
2020-03-30 17:11:56 +02:00
}
2020-05-04 14:13:03 +02:00
}
2020-09-09 18:59:12 +02:00
select:focus
{
/*background-color: #fff;
border: 1px solid var(--color-line-onbg);
box-shadow: 0 0 0 4px var(--color-input);*/
outline: none;
}
// textarea
// --------------------------------
2020-05-04 14:13:03 +02:00
textarea
{
resize: vertical;
min-height: 80px;
2020-05-04 16:00:39 +02:00
}
// select
// --------------------------------
2020-05-04 16:00:39 +02:00
.ui-native-select
{
position: relative;
2020-06-08 13:14:04 +02:00
font-size: var(--font-size);
2020-05-04 16:00:39 +02:00
select
{
@extend %font;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 100%;
padding-left: 9px;
2020-05-04 16:00:39 +02:00
-webkit-appearance: none;
border: none;
2020-06-08 13:14:04 +02:00
font-size: var(--font-size);
2020-07-20 12:02:02 +02:00
background: none;
2020-09-09 18:59:12 +02:00
border: 1px solid transparent;
color: var(--color-text);
2020-09-09 18:59:12 +02:00
border-radius: var(--radius);
}
select:focus
{
background-color: var(--color-input-focus-bg);
border: var(--color-input-focus-border);
box-shadow: var(--color-input-focus-shadow);
outline: none;
2020-05-04 16:00:39 +02:00
}
&:after
{
@extend %font-icon;
content: "\e842";
position: absolute;
right: 12px;
top: 0;
2021-01-06 12:03:21 +01:00
height: 48px;
line-height: 46px;
2020-05-04 16:00:39 +02:00
}
2020-09-17 11:26:23 +02:00
&[disabled], &[readonly]
{
min-height: 23px;
&:after
{
display: none;
}
select
{
text-indent: -2px;
padding-left: 0;
}
}
2020-06-29 15:36:02 +02:00
}
// checkbox
// --------------------------------
2020-06-29 15:36:02 +02:00
.ui-native-check
{
position: relative;
top: 1px;
font-size: var(--font-size);
cursor: pointer;
display: flex;
align-items: center;
line-height: 1;
input
{
width: 0;
height: 0;
opacity: 0;
position: absolute;
left: 0;
overflow: hidden;
visibility: hidden;
-webkit-appearance: none;
border: none;
}
2020-09-17 11:26:23 +02:00
.is-disabled &
{
cursor: default;
}
2020-06-29 15:36:02 +02:00
}
.ui-native-check-toggle
{
display: inline-block;
2020-09-10 14:21:06 +02:00
width: 22px;
height: 22px;
line-height: 21px;
2020-06-29 15:36:02 +02:00
text-align: center;
2020-09-10 14:21:06 +02:00
border-radius: var(--radius);
2020-09-09 18:59:12 +02:00
border: 1px solid transparent;
background: var(--color-check);
2020-06-29 15:36:02 +02:00
margin-right: 10px;
position: relative;
2020-09-10 14:21:06 +02:00
top: 0;
2020-06-29 15:36:02 +02:00
&:before
{
content: "\e83f";
@extend %font-icon;
color: transparent;
2020-09-10 14:21:06 +02:00
font-size: var(--font-size-s);
2020-06-29 15:36:02 +02:00
}
2020-09-09 18:59:12 +02:00
input:focus ~ &
{
2021-01-06 12:03:21 +01:00
background: var(--color-checked) !important;
2020-09-09 18:59:12 +02:00
border: var(--color-input-focus-border);
box-shadow: var(--color-input-focus-shadow);
outline: none;
}
2020-06-29 15:36:02 +02:00
input:checked ~ &
{
background: var(--color-checked);
2020-06-29 15:36:02 +02:00
&:before
{
color: var(--color-checked-fg);
2020-06-29 15:36:02 +02:00
}
}
2020-04-08 15:16:05 +02:00
}