dribbblish-dynamic-theme/src/styles/Inputs.scss
2021-12-10 18:20:31 +00:00

179 lines
4 KiB
SCSS

button.main-button {
&-primary {
$color: spiceColor("subtext");
color: $color;
background-color: spiceColor("selected-row", 0.4) !important;
&:hover,
&:active {
background-color: spiceColor("selected-row", 0.6) !important;
}
span {
color: $color !important;
}
}
// ? Don't know if this exists
// &-secondary {
// $color: spiceColor("subtext");
// color: $color;
// background-color: spiceColor("selected-row", 0.4) !important;
// &:hover,
// &:active {
// background-color: spiceColor("selected-row", 0.6) !important;
// }
// span {
// color: $color !important;
// }
// }
// ? the `:not(...)` is to fix #137
&-tertiary:not(.main-entityHeader-titleButton) {
$color: spiceColor("subtext");
color: $color;
background-color: spiceColor("selected-row", 0.2, 0.05) !important;
&:hover,
&:active {
background-color: spiceColor("selected-row", 0.6) !important;
}
span {
color: $color !important;
}
}
}
// Checkbox
.x-toggle-indicatorWrapper {
background-color: spiceColor("subtext", 0.1);
input:not(:disabled):hover ~ & {
background-color: spiceColor("subtext", 0.15) !important;
}
input:checked ~ & {
background-color: spiceColor("selected-row", 0.4) !important;
}
input:not(:disabled):hover:checked ~ & {
background-color: spiceColor("selected-row", 0.6) !important;
}
}
textarea,
select,
input {
background-color: spiceColor("selected-row", 0.4) !important;
border-radius: 4px !important;
color: spiceColor("subtext") !important;
outline: none;
border: none;
&:not(:disabled) {
&:hover,
&:active {
background-color: spiceColor("selected-row", 0.6) !important;
}
}
&:disabled {
cursor: not-allowed;
opacity: 0.5 !important;
}
&::placeholder {
color: spiceColor("subtext");
opacity: lightOffset(0.8, 0.1);
}
}
textarea {
padding: 6px 10px;
}
select > option {
background: spiceColor("main") !important;
}
input {
padding: 6px 10px 6px 48px;
&[type="checkbox"] {
opacity: 0 !important;
}
&[type="range"] {
-webkit-appearance: none;
background: transparent;
padding: 0px;
&::-webkit-slider-thumb {
-webkit-appearance: none;
width: 16px;
height: 16px;
margin-top: -4px;
border-radius: 50%;
background-color: spiceColor("text");
&:hover,
&:active {
filter: brightness(80%);
}
}
&[tooltip] {
&::after {
z-index: 9999;
content: attr(tooltip);
position: absolute;
min-width: 50px;
top: -22px;
left: 50%;
transform: translateX(calc(-50%));
padding: 0 5px;
border-radius: 4px;
text-align: center;
color: spiceColor("sidebar-text");
background-color: spiceColor("button");
transition: opacity 0.25s ease;
opacity: 0;
}
&:hover::after,
&:active::after {
opacity: 1;
}
}
&::-webkit-slider-runnable-track {
width: 100%;
height: 8px;
background-color: spiceColor("text", 0.2);
border-radius: 50vw;
}
}
&[type="number"],
&[type="text"],
&[type="search"],
&[type="time"] {
height: 32px;
border-radius: 4px !important;
padding: 0px 10px;
}
&[type="time"] {
&::-webkit-calendar-picker-indicator {
filter: invert(var(--is_dark));
}
}
&[type="color"] {
position: relative;
padding: 1px 3px;
}
}