guify
Version:
A simple GUI for inspecting and changing JS variables
83 lines (70 loc) • 2.01 kB
CSS
@import "../variables.css";
.guify-select-dropdown {
display: inline-block;
position: absolute;
width: calc(100% - var(--size-label-width));
padding-left: 1.5%;
height: var(--size-component-height);
border: none;
border-radius: 0;
-webkit-appearance: none;
-moz-appearance: none;
-o-appearance:none;
appearance: none;
font-family: inherit;
background-color: var(--color-component-background);
color: var(--color-text-secondary);
box-sizing: border-box ;
-moz-box-sizing: border-box ;
-webkit-box-sizing: border-box ;
}
/* Disable default outline since we're providing our own */
.guify-select-dropdown:focus {
outline: none;
}
.guify-select-dropdown::-moz-focus-inner {
border: 0;
}
.guify-select-dropdown:focus,
.guify-select-dropdown:hover {
color: var(--color-text-hover);
background-color: var(--color-component-foreground);
}
.guify-select-dropdown::-ms-expand {
display:none;
}
.guify-select-triangle {
content: ' ';
border-right: 3px solid transparent;
border-left: 3px solid transparent;
line-height: var(--size-component-height);
position: absolute;
right: 2.5%;
z-index: 1;
pointer-events: none;
}
.guify-select-triangle--up {
bottom: 55%;
border-bottom: 5px solid var(--color-text-secondary);
border-top: 0px transparent;
}
.guify-select-triangle--down {
top: 55%;
border-top: 5px solid var(--color-text-secondary);
border-bottom: 0px transparent;
}
.guify-select-triangle--up-highlight {
border-bottom-color: var(--color-text-hover);
}
.guify-select-triangle--down-highlight {
border-top-color: var(--color-text-hover);
}
/* Disabled styles */
.disabled .guify-select-dropdown {
pointer-events: none;
color: var(--color-text-disabled);
background-color: var(--color-component-background-disabled);
}
.disabled *[class^="guify-select-triangle"] {
border-color: var(--color-text-disabled);
}