Answer five things the panel got wrong
- A tile no longer lifts under the pointer. A finger does not move away afterwards the way a cursor does, so whatever hover raised stayed raised until something else was touched: a tile stuck, not answering. - The ground's blobs wander a closed path on their own clock instead of sliding back and forth along one line, which read as things moving rather than as light in a room. - A bar is one grid now, its rows borrowing its columns, so names of different lengths no longer start and end their tracks in different places — two bars that share no baseline cannot be compared, which is the one thing a stack of them is for. The names read rightward into their tracks, with room either side. - A reading on its way somewhere is written to as many decimals as the value it is heading for. Without that a slider stepping in halves passed through 22.37460937 on its way to 24: a number nobody asked for, a different width every frame. - The brightness column is the same control as the slider widget's, stood on its end and thicker, and exactly as tall as the disc beside it. Getting there meant drawing a slider's rail, fill and handle rather than styling `::-webkit-slider-*`: those need one set of rules per orientation, each with its own centring quirk, and the handle landed off its track when the writing mode turned. The native input stays, laid transparent over the top, so the keyboard, the pointer and every `aria-` are still its.
This commit is contained in:
@@ -263,89 +263,24 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.gl-slider {
|
||||
position: relative;
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.gl-slider input {
|
||||
width: 100%;
|
||||
height: var(--dui-control);
|
||||
margin: 0;
|
||||
appearance: none;
|
||||
background: transparent;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.gl-slider input::-webkit-slider-runnable-track {
|
||||
height: 0.5rem;
|
||||
border-radius: 9999px;
|
||||
box-shadow: var(--gl-inset);
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
color-mix(in srgb, var(--primary) 85%, white)
|
||||
calc(var(--dui-fraction, 0) * 100%),
|
||||
var(--gl-track) calc(var(--dui-fraction, 0) * 100%)
|
||||
);
|
||||
}
|
||||
|
||||
.gl-slider input[data-orientation="vertical"]::-webkit-slider-runnable-track {
|
||||
width: 0.5rem;
|
||||
height: 100%;
|
||||
background: linear-gradient(
|
||||
to top,
|
||||
color-mix(in srgb, var(--primary) 85%, white)
|
||||
calc(var(--dui-fraction, 0) * 100%),
|
||||
var(--gl-track) calc(var(--dui-fraction, 0) * 100%)
|
||||
);
|
||||
}
|
||||
|
||||
.gl-slider input::-moz-range-track {
|
||||
height: 0.5rem;
|
||||
.gl-slider .dui-slider-rail {
|
||||
border-radius: 9999px;
|
||||
background: var(--gl-track);
|
||||
box-shadow: var(--gl-inset);
|
||||
}
|
||||
|
||||
.gl-slider input::-moz-range-progress {
|
||||
height: 0.5rem;
|
||||
.gl-slider .dui-slider-fill {
|
||||
border-radius: 9999px;
|
||||
background: color-mix(in srgb, var(--primary) 85%, white);
|
||||
box-shadow: var(--gl-glow);
|
||||
}
|
||||
|
||||
.gl-slider input::-webkit-slider-thumb {
|
||||
appearance: none;
|
||||
width: var(--dui-thumb);
|
||||
height: var(--dui-thumb);
|
||||
margin-top: calc((0.5rem - var(--dui-thumb)) / 2);
|
||||
border: 1px solid var(--gl-border);
|
||||
border-radius: 50%;
|
||||
.gl-slider .dui-slider-thumb {
|
||||
background: #fff;
|
||||
border: 1px solid var(--gl-border);
|
||||
box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
|
||||
}
|
||||
|
||||
.gl-slider input::-moz-range-thumb {
|
||||
width: var(--dui-thumb);
|
||||
height: var(--dui-thumb);
|
||||
border: 1px solid var(--gl-border);
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.gl-slider input:disabled {
|
||||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.gl-ticks {
|
||||
position: relative;
|
||||
height: 1rem;
|
||||
font-size: 0.75rem;
|
||||
color: var(--muted-foreground);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.gl-segmented {
|
||||
position: relative;
|
||||
display: grid;
|
||||
|
||||
Reference in New Issue
Block a user