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: 10px 15px 15px 10px; border-radius: 10px; box-sizing: border-box; transition-duration: 0.15s; overflow: hidden; --base-unit: 36px; min-width: var(--base-unit); min-height: var(--base-unit); cursor:pointer; position: relative; user-select: none; } .widget:hover { 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 { background-color: rgba(0, 0, 0, 0); } .widget.inactive:hover, .widget:disabled:hover { 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; 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: calc(3 * var(--base-unit)); height: calc(3 * var(--base-unit)); --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.active { --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: var(--base-unit); height: calc(3 * var(--base-unit)); overflow: unset; } .slider.h { height: var(--base-unit); width: calc(3 * var(--base-unit)); } .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.h > .fill::before { width: calc(100% * var(--percent)); height: 100%; } .slider:hover > .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.h::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; left: 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; 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; } .slider.h > .detail, .color-light.h > .detail, .color-temp.h > .detail { top: calc(100% + 20px); left: calc(-1.2 * var(--base-unit) / 2 + 100% * 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: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: var(--base-unit); height: var(--base-unit); 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 { 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 { 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:checked, .checkbox.active { --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:checked::after, .checkbox.active::after { border-width: 0px 5px 5px 0px; } .checkbox.inactive:checked, .checkbox.active.inactive, .checkbox:disabled:checked { box-shadow: 1px 1px var(--w-shadow-inactive), 3px 3px var(--w-shadow-inactive), 5px 5px var(--w-shadow-inactive); } .checkbox.inactive:checked:active, .checkbox.active.inactive:active, .checkbox:disabled:checked:active, .checkbox.inactive.touch:checked, .checkbox.active.inactive.touch, .checkbox:disabled.touch:checked { 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:checked::before, .checkbox.active.inactive::before, .checkbox:disabled:checked::before { width: 100%; height: 100%; top: 0; left: 0; } /** Color widget */ .color-wheel { background: radial-gradient(white, transparent calc(1.5 * var(--base-unit))), conic-gradient(from 90deg, #f00, #f0f, #00f, #0ff, #0f0, #ff0, #f00); border-radius: 50%; width: calc(3 * var(--base-unit)); height: calc(3 * var(--base-unit)); --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 { 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: var(--base-unit); height: calc(3 * var(--base-unit)); background: linear-gradient(rgb(190, 200, 255), white 30%, rgb(250, 160, 100)); --side-color: #aaa; overflow: unset; } .color-temp.h { height: var(--base-unit); width: calc(3 * var(--base-unit)); background: linear-gradient(to left, rgb(190, 200, 255), white 30%, rgb(250, 160, 100)); } .color-light { width: var(--base-unit); height: calc(3 * var(--base-unit)); background: linear-gradient(white, black); --side-color: #aaa; overflow: unset; } .color-light.h { height: var(--base-unit); width: calc(3 * var(--base-unit)); 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.h > .fill::after, .color-light.h > .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 { 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; width: calc(6 * var(--base-unit)); height: calc(3 * var(--base-unit)); } .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; } /* 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.h { 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: calc(var(--base-unit) + 5px); height: calc(3 * var(--base-unit) + 5px); margin: 10px; box-shadow: inset 5px 5px var(--w-shadow); --w-bg-hover: var(--w-bg); --w-bg-active: var(--w-bg); } .scrubber.h { height: calc(var(--base-unit) + 5px); width: calc(3 * var(--base-unit) + 5px); } .scrubber > .fill { position:absolute; width: 100%; height: 100%; left: 0; top: 0; } .scrubber > .fill::before { 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; vertical-align: middle; 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); } .scrubber.h > .fill::before { left: calc(50% - (var(--base-unit) - 10px) / 2 + (50% * var(--percent))); bottom: calc(50% - (var(--base-unit) - 10px) / 2); } .scrubber:hover > .fill::before, .scrubber.touch > .fill::before { background-color: var(--w-scr-nub-active); }