From 157e6b2a3323221724e03157a2c58ce4af6bf809 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Mon, 22 Mar 2021 23:19:39 +0100 Subject: [PATCH] Sticky default & solid. --- wled00/data/index.css | 37 +++++++++++++++++++++++++++++-------- wled00/data/index.js | 2 +- wled00/wled.h | 4 ++-- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/wled00/data/index.css b/wled00/data/index.css index fadf6f170..9b93232c5 100644 --- a/wled00/data/index.css +++ b/wled00/data/index.css @@ -809,19 +809,20 @@ input[type=number]::-webkit-outer-spin-button { position: absolute; bottom: 0; left: 0; - height: 25px; - width: 25px; background-color: var(--c-3); - border-radius: 10px; } .radiomark { height: 24px; width: 24px; border-radius: 50%; + top: -2px; } -.schk { +.checkmark { + height: 25px; + width: 25px; + border-radius: 10px; top: 0; } @@ -908,13 +909,10 @@ input[type=number]::-webkit-outer-spin-button { .list { position: relative; width: 260px; - border-radius: 0 0 20px 20px; - background-color: var(--c-2); transition: background-color 0.5s; - overflow: hidden; margin: auto auto 20px; - padding-bottom: 5px; } + .lstI { position: relative; border-bottom: 1px solid var(--c-3); @@ -922,6 +920,7 @@ input[type=number]::-webkit-outer-spin-button { align-items: center; padding: 8px 10px; cursor: pointer; + background-color: var(--c-2); } .lstI:hover { @@ -930,10 +929,32 @@ input[type=number]::-webkit-outer-spin-button { .lstI:last-child { border: none; + border-radius: 0 0 20px 20px; + padding-bottom: 10px; } .lstI.selected { background: var(--c-5); + top: 136px; + bottom: 0; +} + +.lstI.sticky, .lstI.selected { + position: sticky; + z-index: 1; +} + +#selectPalette .lstI.selected { + top: 80px; + bottom: 0; +} + +#selectPalette .lstI.sticky { + top: 40px; +} + +.lstI.sticky { + top: 99px; } .lstIcontent { diff --git a/wled00/data/index.js b/wled00/data/index.js index 687af1573..4e9d34a68 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -798,7 +798,7 @@ function genPalPrevCss(id) function generateListItemHtml(listName, id, name, clickAction, extraHtml = '') { - return `
+ return `