2024-03-02 07:51:55 +00:00
|
|
|
@mixin windows-form-element-base {
|
|
|
|
appearance: none;
|
|
|
|
padding: 0;
|
2024-06-04 06:14:20 +00:00
|
|
|
border: 1px solid transparent !important;
|
2024-07-30 15:35:48 +00:00
|
|
|
border-radius: 4px;
|
2024-03-02 07:51:55 +00:00
|
|
|
|
|
|
|
background-origin: border-box;
|
|
|
|
background-clip: padding-box, padding-box, border-box;
|
|
|
|
// Overwrite default background color
|
2024-06-04 06:14:20 +00:00
|
|
|
background-color: unset !important;
|
2024-03-02 07:51:55 +00:00
|
|
|
// Simulate linear-gradient border with border-radius using background-image
|
|
|
|
|
|
|
|
@include light-dark(--color-form-element-background, var(--color-background70), var(--fill-quinary));
|
|
|
|
@include light-dark(--color-form-element-border,
|
|
|
|
linear-gradient(180deg, rgba(0, 0, 0, 0.0578) 90.58%, rgba(0, 0, 0, 0.1622) 100%),
|
|
|
|
linear-gradient(180deg, rgba(255, 255, 255, 0.093) 0%, rgba(255, 255, 255, 0.0698) 9.57%));
|
|
|
|
|
|
|
|
background-image:
|
|
|
|
linear-gradient(var(--color-form-element-background), var(--color-form-element-background)),
|
|
|
|
// Must be non-transparent color
|
|
|
|
linear-gradient(var(--color-form-element-base-background), var(--color-form-element-base-background)),
|
|
|
|
var(--color-form-element-border),
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin windows-form-element-hover {
|
|
|
|
@include light-dark(--color-form-element-background, var(--color-background50), var(--fill-quarternary));
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin windows-form-element-active {
|
|
|
|
@include light-dark(--color-form-element-background, rgba(255, 255, 255, 0.3), var(--fill-senary));
|
|
|
|
--color-form-element-border: linear-gradient(var(--fill-quinary), var(--fill-quinary));
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin windows-form-element {
|
|
|
|
height: 28px;
|
|
|
|
|
|
|
|
@include windows-form-element-base;
|
|
|
|
|
|
|
|
&:not([disabled]) {
|
|
|
|
&:hover {
|
|
|
|
@include windows-form-element-hover;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
@include windows-form-element-active;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include focus-ring;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled,
|
|
|
|
&[disabled] {
|
|
|
|
@include windows-form-element-active;
|
|
|
|
}
|
|
|
|
}
|