.widget > input { opacity: 0; display: none; content: ""; } .widget { display:inline-block; background-color: var(--w-bg); box-shadow: 1px 1px var(--w-shadow), 3px 3px var(--w-shadow), 5px 5px var(--w-shadow); padding: 5px; margin: 5px 10px 10px 5px; border-radius: 10px; box-sizing: border-box; transition-duration: 0.15s; overflow: hidden; --base-unit: 36px; --alt-unit: 15px; min-width: var(--base-unit); min-height: var(--base-unit); cursor:pointer; position: relative; user-select: none; } .grid > .widget, .gridlock { width: calc(var(--width) * var(--base-unit) + (var(--width) - 1) * var(--alt-unit)); height: calc(var(--height) * var(--base-unit) + (var(--height) - 1) * var(--alt-unit)); } .widget:hover, .widget:focus-within { background-color: var(--w-bg-hover); } .widget:active, .widget.touch { background-color: var(--w-bg-active); } .widget.inactive, .widget:disabled { box-shadow: 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive); } .widget.inactive::before, .widget:disabled::before { content: ''; display: block; position: absolute; width: 100%; height: 100%; border-radius: 10px; background-color: rgba(0, 0, 0, 0.2); transition-duration: 0.15s; top: 0; left: 0; z-index: 1; } .widget.inactive:hover::before, .widget:disabled:hover::before, .widget.inactive:focus-within::before, .widget:disabled:focus-within::before { background-color: rgba(0, 0, 0, 0); } .widget.inactive:hover, .widget:disabled:hover, .widget.inactive:focus-within, .widget:disabled:focus-within { background-color: var(--w-bg); } .widget.inactive:active, .widget:disabled:active, .widget.inactive.touch, .widget.touch:disabled { background-color: var(--w-bg); } /** Button widget that a lot of other widgets build from */ .button { align-content: center; text-align: center; --width: 2; --height: 1; user-select: none; -webkit-user-select: none; } .button:active, .button.touch { transform:translate(5px, 5px); box-shadow: none !important; border:none; } .button.inactive:active, .button.inactive.touch, .button:disabled:active, .button.touch:disabled { transform: none; box-shadow: 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive) !important; border: inherit; } /** Toggle widget for things like power buttons */ .toggle { --width: 2; --height: 2; --w-bg: var(--w-tg-inactive-bg); --w-bg-hover: var(--w-tg-inactive-bg-hover); --w-bg-active: var(--w-tg-inactive-bg-active); color: var(--w-tg-inactive-color); font-weight: bold; } .toggle[aria-checked="true"] { --w-bg: var(--w-tg-active-bg); --w-bg-hover: var(--w-tg-active-bg-hover); --w-bg-active: var(--w-tg-active-bg-active); color: var(--w-tg-active-color); } /** Slider widget (add h class for horizontal) */ .slider { --width: 1; --height: 3; overflow: unset; } .slider[aria-orientation="horizontal"] { --width: 3; --height: 1; } .slider > .fill, .color-light > .fill, .color-temp > .fill { overflow: hidden; width: 100%; height: 100%; border-radius: 10px; position: absolute; top: 0; left: 0; } .slider > .fill::before { border-radius: 10px; position: absolute; bottom: 0; left: 0; height: calc(100% * var(--percent)); width: 100%; background-color: var(--w-sl-fill); transition-duration: 0.15s; content: ''; } .slider[aria-orientation="horizontal"] > .fill::before { width: calc(100% * var(--percent)); height: 100%; } .slider:hover > .fill::before, .slider:focus-within > .fill::before { background-color: var(--w-sl-fill-hover); } .slider:active > .fill::before, .slider.touch > .fill::before { background-color: var(--w-sl-fill-active); transition-duration: 0s; } .slider::after { position: absolute; top: 6px; left: calc(50% - var(--w-sl-dots-size) / 2); height: calc(100% - var(--w-sl-dots-size) * 2); width: 0; border-right: var(--w-sl-dots); content: ''; } .slider[aria-orientation="horizontal"]::after { top: calc(50% - var(--w-sl-dots-size) / 2); left: 6px; width: calc(100% - var(--w-sl-dots-size) * 2); height: 0; border-right: none; border-bottom: var(--w-sl-dots); } .slider > .detail, .color-light > .detail, .color-temp > .detail, .color-wheel > .detail { display: block; position: absolute; right: calc(100% + 20px); bottom: calc(-1 * var(--base-unit) / 2 + 100% * var(--percent)); background-color: rgba(0, 132, 255, 0); color: rgba(255, 255, 255, 0); border-radius: 10px; z-index: 2; font-weight: bold; min-width: var(--base-unit); height: var(--base-unit); pointer-events: none; user-select: none; align-content: center; text-align: center; padding: 2px; transition-duration: 0.15s; } .slider[aria-orientation="horizontal"] > .detail, .color-light[aria-orientation="horizontal"] > .detail, .color-temp[aria-orientation="horizontal"] > .detail { bottom: calc(100% + 20px); right: calc(-1.2 * var(--base-unit) / 2 + 100% * (1 - var(--percent))); } .slider:active > .detail, .slider.touch > .detail { background-color: rgba(0, 132, 255, 1); color: rgba(255, 255, 255, 1); transition-duration: 0s; } .color-light > .detail, .color-temp > .detail, .color-wheel > .detail { min-width: 0; width: var(--base-unit); } .color-light:active > .detail, .color-temp:active > .detail, .color-wheel:active > .detail, .color-light.touch > .detail, .color-temp.touch > .detail, .color-wheel.touch > .detail { background-color: var(--detail); transition-duration: 0s; } .inactive > .detail { display: none; } /** Checkbox widget */ .checkbox { --w-bg: rgba(0, 0, 0, 0); --w-bg-hover: rgba(0, 0, 0, 0); --w-bg-active: rgba(0, 0, 0, 0); --width: 1; --height: 1; border: 7px solid var(--w-cb-inactive-outline); box-shadow: 5px 5px inset var(--w-shadow), 1px 1px var(--w-shadow), 3px 3px var(--w-shadow), 5px 5px var(--w-shadow); padding: 0; overflow: unset; } .checkbox:hover, .checkbox:focus-within { border-color: var(--w-cb-inactive-outline-hover); } .checkbox:active, .checkbox.touch { border: 7px solid var(--w-cb-inactive-outline-active); } .checkbox.inactive, .checkbox:disabled { box-shadow: 5px 5px inset var(--w-shadow-inactive), 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive); } .checkbox.inactive::before, .checkbox:disabled::before { width: calc(100% + 14px); height: calc(100% + 14px); top: -7px; left: -7px; } .checkbox.inactive:hover, .checkbox:disabled:hover, .checkbox.inactive:focus-within, .checkbox:disabled:focus-within { border-color: var(--w-cb-inactive-outline); } .checkbox.inactive:active, .checkbox:disabled:active, .checkbox.inactive.touch, .checkbox.touch:disabled { border: 7px solid var(--w-cb-inactive-outline); box-shadow: 5px 5px inset var(--w-shadow-inactive), 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive) !important; } .checkbox::after { height: 24px; width: 13px; box-sizing: border-box; position: absolute; display: block; border-color: white; border-style: solid; border-width: 0px 0px 0px 0px; top: calc(50% - 13px); left: calc(50% - 6px); transform-origin: center; transform: rotate(45deg); transition-duration: 0.15s; content: ''; } .checkbox[aria-checked="true"] { --w-bg: var(--w-cb-active-bg); --w-bg-hover: var(--w-cb-active-bg-hover); --w-bg-active: var(--w-cb-active-bg-active); border: none; box-shadow: 1px 1px var(--w-shadow), 3px 3px var(--w-shadow), 5px 5px var(--w-shadow); } .checkbox[aria-checked="true"]::after { border-width: 0px 5px 5px 0px; } .checkbox.inactive[aria-checked="true"], .checkbox:disabled[aria-checked="true"] { box-shadow: 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive); } .checkbox.inactive[aria-checked="true"]:active, .checkbox[aria-checked="true"]:disabled:active, .checkbox.inactive.touch[aria-checked="true"], .checkbox.touch[aria-checked="true"]:disabled { border: none; box-shadow: 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive) !important; } .checkbox.inactive[aria-checked="true"]::before, .checkbox[aria-checked="true"]:disabled::before { width: 100%; height: 100%; top: 0; left: 0; } /** Color widget */ .color-wheel { --scale: 3; background: radial-gradient(white, transparent calc(var(--scale) * var(--base-unit) / 2)), conic-gradient(from 90deg, #f00, #f0f, #00f, #0ff, #0f0, #ff0, #f00); border-radius: 50%; --width: var(--scale); --height : var(--scale); --side-color: #aaa; overflow: unset; } .color-wheel::after { content: ''; height: 18px; width: 18px; border: 5px solid #444; position: absolute; bottom: calc((50% - 9px) + (50%) * var(--pos-y)); left: calc((50% - 9px) + (50%) * var(--pos-x)); border-radius: 50%; transition-duration: 0.15s; box-sizing: border-box; } .color-wheel:active::after, .color-wheel.touch::after { transition-duration: 0s; } .color-wheel:hover::after, .color-wheel:focus-within:after { border-color: #888; } .color-wheel.inactive::before { border-radius: 50%; } .color-wheel.inactive::after { border-color: rgb(68, 68, 68, 0); } .color-wheel > .detail { width: calc(var(--base-unit) * 0.5); height: calc(var(--base-unit) * 0.5); border-radius: 5px; box-shadow: none; top: 0; left: calc(100% + 7px); } .color-wheel:active > .detail, .color-wheel.touch > .detail { box-shadow: 1px 1px var(--w-shadow), 3px 3px var(--w-shadow), 5px 5px var(--w-shadow); } .color-temp { --width: 1; --height: 3; background: linear-gradient(rgb(190, 200, 255), white 15%, rgb(250, 160, 100)); --side-color: #aaa; overflow: unset; } .color-temp[aria-orientation="horizontal"] { --width: 3; --height: 1; background: linear-gradient(to left, rgb(190, 200, 255), white 15%, rgb(250, 160, 100)); } .color-light { --width: 1; --height: 3; background: linear-gradient(white, black); --side-color: #aaa; overflow: unset; } .color-light[aria-orientation="horizontal"] { --width: 3; --height: 1; background: linear-gradient(to left, white, black); } .color-temp > .fill::after, .color-light > .fill::after { content: ''; width: 18px; height: 18px; border: 5px solid #444; position: absolute; bottom: calc(100% * var(--percent) - 9px); left: calc(50% - 9px); box-sizing: border-box; border-radius: 50%; transition-duration: 0.15s; } .color-light > .fill::after { border-color: color-mix(in srgb, white calc(100% * (1 - var(--percent))), black calc(100% * var(--percent))); } .color-temp[aria-orientation="horizontal"] > .fill::after, .color-light[aria-orientation="horizontal"] > .fill::after { left: calc(100% * var(--percent) - 7.5px); bottom: calc(50% - 7.5px); } .color-temp:active > .fill::after, .color-light:active > .fill::after, .color-temp.touch > .fill::after, .color-light.touch > .fill::after { transition-duration: 0s; } .color-temp:hover > .fill::after, .color-temp:focus-within > .fill::after { border-color: #888; } .color-temp.inactive > .fill::after, .color-light.inactive > .fill::after { border-color: rgb(68, 68, 68, 0); } /** Thermostat */ .thermostat { align-content: center; text-align: center; --w-bg-hover: var(--w-bg); --w-bg-active: var(--w-bg); --width: 5; --height: 3; } .thermostat > arch { display: block; position: absolute; height: 100px; width: 200px; top: calc(50% - 45px); left: calc(50% - 100px); /* Strange half-circle path */ clip-path: path("M 6.6525702323609295 64.13556976925895 A 100 100 0 0 1 193.34742976763908 64.13556976925895 A 5 5 0 0 1 184.01268679087516 67.72201279233306 A 90 90 0 0 0 15.987313209124835 67.72201279233306 A 5 5 0 0 1 6.6525702323609295 64.13556976925895 "); background-color: #222; } .thermostat > arch::after { content: ''; display: block; height: 100px; width: 200px; background-color: var(--detail); transform-origin: bottom center; transform: rotate(calc((1 - var(--percent)) * -144deg - 18deg)); transition-duration: 0.5s; } .thermostat > gague { display: block; position: absolute; bottom: calc(-13px + ((100% - 100px) / 2) + 90px); left: calc(-13px + 50%); height: 26px; width: 26px; border-radius: 50%; background-color: white; transition-duration: 0.5s; box-sizing: border-box; border: 2px solid white; box-shadow: inset 0px 0px 0px 2px var(--detail); transform-origin: 13px 108px; transform: rotate(calc(72deg - (1 - var(--percent)) * 144deg)); text-align: center; align-content: center; font-size: 10px; font-weight: bold; } .thermostat > temp { display: block; position: absolute; bottom: calc((100% - 100px) / 2); left: calc(50% - 65px); width: 130px; font-size: 50px; text-align: center; } .thermostat > .unit { position: absolute; top: 5px; right: 5px; --width: 1; --height: 1; border-radius: 50%; margin: 5px; background-color: white; box-shadow: none; overflow: visible; } .thermostat > .unit:focus { outline: none; } .thermostat > .unit:hover, .thermostat > .unit:focus { background-color: #cef; } .thermostat > .unit::after { content: ''; position: absolute; top: 0; right: 0; width: 100%; height: 100%; border-radius: 50%; box-shadow: none; transition-duration: 0.15s; } .thermostat > .unit:active::after, .thermostat > .unit.touch::after { transform: translate(-5px, -5px); box-shadow: inset 5px 5px var(--w-shadow) !important; } .thermostat > .unit:active, .thermostat > .unit.touch { box-shadow: inset -5px -5px var(--w-bg) !important; } /* Button Select */ .sel-button { display: inline-flex; max-height: calc(2 * var(--base-unit)); max-width: calc(8 * var(--base-unit)); box-shadow: inset 5px 5px var(--w-shadow); --w-bg-hover: var(--w-bg); --w-bg-active: var(--w-bg); overflow-x: auto; } .sel-button[aria-orientation="horizontal"] { flex-direction: column; height: 100%; overflow-y: auto; max-width: calc(3 * var(--base-unit)); max-height: calc(8 * var(--base-unit)); overflow-x: hidden; } .sel-button > .button { margin: 5px 5px; padding: 7px; --w-bg: var(--w-sel-button); --w-bg-hover: var(--w-sel-button-hover); --w-bg-active: var(--w-sel-button-active); height: calc(100% - 12px); box-sizing: border-box; width: fit-content; } .sel-button.h > .button { height: auto; width: calc(100% - 12px); } .sel-button > .button.active { --w-bg: var(--w-sel-button-selected); --w-bg-hover: var(--w-sel-button-selected-hover); --w-bg-active: var(--w-sel-button-selected-active); } /** Scrubber */ .scrubber { --width: 1; --height: 3; box-shadow: inset 5px 5px var(--w-shadow); --w-bg-hover: var(--w-bg); --w-bg-active: var(--w-bg); overflow: unset; } .scrubber[aria-orientation="horizontal"] { --width: 44; --height: 1; } .scrubber > .fill { position:absolute; width: 100%; height: 100%; left: 0; top: 0; overflow: hidden; border-radius: 10px; } .scrubber > .fill::after { content: '◈'; display: block; height: calc(var(--base-unit) - 10px); width: calc(var(--base-unit) - 10px); border-radius: 5px; background-color: var(--w-scr-nub); text-align: center; position: absolute; box-shadow: 1px 1px var(--w-shadow), 3px 3px var(--w-shadow); bottom: calc(50% - (var(--base-unit) - 10px) / 2 + (50% * var(--percent))); left: calc(50% - (var(--base-unit) - 10px) / 2); transition-duration: 0.15s; } .scrubber[aria-orientation="horizontal"] > .fill::after { left: calc(50% - (var(--base-unit) - 10px) / 2 + (50% * var(--percent))); bottom: calc(50% - (var(--base-unit) - 10px) / 2); } .scrubber:hover > .fill::after, .scrubber.touch > .fill::after, .scrubber:focus-within > .fill::after { background-color: var(--w-scr-nub-hover); } .scrubber:active > .fill::after, .scrubber.touch > .fill::after { background-color: var(--w-scr-nub-active); transition-duration: 0s; } .scrubber > .fill > .zone { width: 100%; height: calc(50% / var(--zones)); box-sizing: border-box; background-color: var(--w-scr-back); position:absolute; bottom: calc(50% * (var(--zone) + var(--zones)) / var(--zones) - (25% / var(--zones))); left: 0; transition-duration: 0.15s; } .scrubber[aria-orientation="horizontal"] > .fill > .zone { height: 100%; width: calc(50% / var(--zones)); border-bottom: none; left: calc(50% * (var(--zone) + var(--zones)) / var(--zones) - (25% / var(--zones))); bottom: 0; } .scrubber > .fill > .zone:nth-child(2n) { background-color: var(--w-scr-back-other); } .scrubber:active > .fill > .zone.active, .scrubber.touch > .fill > .zone.active { background-color: var(--w-scr-back-active); } .scrubber > .detail { display: block; position: absolute; right: calc(100% + 20px); bottom: calc(50% - var(--base-unit) / 2); background-color: rgba(0, 132, 255, 0); color: rgba(255, 255, 255, 0); border-radius: 10px; z-index: 2; font-weight: bold; width: calc(1.2 * var(--base-unit)); height: var(--base-unit); pointer-events: none; user-select: none; align-content: center; text-align: center; padding: 2px; transition-duration: 0.15s; } .scrubber[aria-orientation="horizontal"] > .detail { bottom: calc(100% + 20px); right: calc(50% - 1.2 * var(--base-unit) / 2); } .scrubber:active > .detail, .scrubber.touch > .detail { background-color: rgba(0, 132, 255, 1); color: rgba(255, 255, 255, 1); transition-duration: 0s; } /** Radio widget */ .radio { min-width: 0; min-height: 0; --width: 0.8; --height: 0.8; --w-bg: rgba(0, 0, 0, 0); --w-bg-hover: rgba(0, 0, 0, 0); --w-bg-active: rgba(0, 0, 0, 0); border: 5px solid var(--w-radio-inactive); border-radius: 50%; box-shadow: 5px 5px inset var(--w-shadow), 1px 1px var(--w-shadow), 3px 3px var(--w-shadow), 5px 5px var(--w-shadow); padding: 0; overflow: hidden; } .radio:hover, .radio:focus-within { border-color: var(--w-radio-inactive-hover); } .radio:active, .radio.touch { border: 5px solid var(--w-radio-inactive-active); } .radio.inactive, .radio:disabled { box-shadow: 5px 5px inset var(--w-shadow-inactive), 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive); } .radio.inactive::before, .radio:disabled::before { width: calc(100% + 14px); height: calc(100% + 14px); top: -7px; left: -7px; } .radio.inactive:hover, .radio:disabled:hover, .radio.inactive:focus-within, .radio:disabled:focus-within { border-color: var(--w-radio-inactive); } .radio.inactive:active, .radio:disabled:active, .radio.inactive.touch, .radio.touch:disabled { border: 7px solid var(--w-radio-inactive); box-shadow: 5px 5px inset var(--w-shadow-inactive), 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive) !important; } .radio::after { height: calc(var(--base-unit) * 0.25); width: calc(var(--base-unit) * 0.25); box-sizing: border-box; position: absolute; display: block; background-color: rgba(0, 0, 0, 0); border-radius: 50%; box-shadow: none; padding: 0; top: calc(50% - var(--base-unit) * 0.25 / 2); left: calc(50% - var(--base-unit) * 0.25 / 2); transition-duration: 0.35s; content: ''; } .radio[aria-checked="true"] { border-color: var(--w-radio-active); } .radio[aria-checked="true"]:hover, .radio[aria-checked="true"]:focus-within { border-color: var(--w-radio-active-hover); } .radio[aria-checked="true"]:hover::after, .radio[aria-checked="true"]:focus-within::after { background-color: var(--w-radio-active-hover); } .radio[aria-checked="true"]::after { background-color: var(--w-radio-active); } .radio[aria-checked="true"]:active, .radio[aria-checked="true"].touch { border-color: var(--w-radio-active-active); } .radio[aria-checked="true"]:active::after, .radio[aria-checked="true"].touch::after { background-color: var(--w-radio-active-active); box-shadow: none; } .radio.inactive[aria-checked="true"], .radio[aria-checked="true"]:disabled { box-shadow: 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive); } .radio.inactive[aria-checked="true"]:active, .radio[aria-checked="true"]:disabled:active, .radio.inactive.touch[aria-checked="true"], .radio.touch[aria-checked="true"]:disabled { box-shadow: 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive) !important; } .radio.inactive[aria-checked="true"]::before, .radio[aria-checked="true"]:disabled::before { width: 100%; height: 100%; top: 0; left: 0; } /* Radio group */ .radio-group { display: flex; flex-direction: column; box-shadow: inset 5px 5px var(--w-shadow); --w-bg-hover: var(--w-bg); --w-bg-active: var(--w-bg); --width: 3; --height: 2; justify-content: space-around; overflow-y: auto; } .radio-group.h { flex-direction: row; } .radio-group > .radio-option { display: flex; justify-content: space-around; align-items: center; }