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

182 lines
3.3 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"],
2020-05-04 16:00:39 +02:00
textarea, .ui-native-select
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;
2020-04-25 19:38:45 +02:00
height: 42px;
2020-04-11 13:59:54 +02:00
padding: 6px 12px;
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
&:focus
{
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-04-28 14:51:17 +02:00
&[disabled], &[readonly]
{
border-color: transparent !important;
padding: 0;
height: auto;
}
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;
height: 42px;
line-height: 40px;
}
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;
}
}
.ui-native-check-toggle
{
display: inline-block;
2020-08-31 11:04:29 +02:00
width: 18px;
height: 18px;
line-height: 18px;
2020-06-29 15:36:02 +02:00
text-align: center;
2020-08-31 11:04:29 +02:00
border-radius: 2px;
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;
top: -1px;
&:before
{
content: "\e83f";
@extend %font-icon;
color: transparent;
font-size: var(--font-size-xs);
}
2020-09-09 18:59:12 +02:00
input:focus ~ &
{
background: var(--color-input-focus-bg) !important;
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
}