diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-10-20 17:56:02 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-11-05 11:05:12 +0100 |
commit | 7c78218339ac914f097db79c343b07ea86c7313a (patch) | |
tree | 4607442d001a841964fbbedbb23a99bfbdfe7faa /themes/luci-theme-material/htdocs | |
parent | bd614de514a7dd43a25f432dc1a9f9f66e7eec2b (diff) |
luci-base, themes: rework dynlist and dropdown widgets
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'themes/luci-theme-material/htdocs')
-rw-r--r-- | themes/luci-theme-material/htdocs/luci-static/material/cascade.css | 90 |
1 files changed, 84 insertions, 6 deletions
diff --git a/themes/luci-theme-material/htdocs/luci-static/material/cascade.css b/themes/luci-theme-material/htdocs/luci-static/material/cascade.css index a4d71eeb67..e62c9be216 100644 --- a/themes/luci-theme-material/htdocs/luci-static/material/cascade.css +++ b/themes/luci-theme-material/htdocs/luci-static/material/cascade.css @@ -153,7 +153,9 @@ input, } select:not([multiple="multiple"]):focus, -input:focus { +input:focus, +.cbi-dropdown:focus, +.cbi-dynlist > .item:focus { border-color: var(--main-color, #0099CC); } @@ -642,7 +644,7 @@ td > table > tbody > tr > td, /* button style */ -.btn, .cbi-button { +.btn, .cbi-button, .item::after { -webkit-appearance: none; text-transform: uppercase; color: rgba(0, 0, 0, 0.87); @@ -675,6 +677,7 @@ td > table > tbody > tr > td, .cbi-button:hover, .cbi-button:focus, .cbi-button:active, +.item:hover::after, .cbi-page-actions .cbi-button-apply + .cbi-button-save:hover, .cbi-page-actions .cbi-button-apply + .cbi-button-save:focus, .cbi-page-actions .cbi-button-apply + .cbi-button-save:active { @@ -958,6 +961,7 @@ td > table > tbody > tr > td, } +.cbi-dynlist, .cbi-dropdown { display: inline-flex; cursor: pointer; @@ -966,10 +970,6 @@ td > table > tbody > tr > td, height: auto; } -.cbi-dropdown:focus { - outline: 2px solid #4b6e9b; -} - .cbi-dropdown > ul { margin: 0 !important; padding: 0; @@ -1109,6 +1109,22 @@ td > table > tbody > tr > td, border-bottom: none; } +.cbi-dropdown[open] > ul.dropdown > li[unselectable] { + opacity: 0.7; +} + +.cbi-dropdown[open] > ul.dropdown > li > input.create-item-input:first-child:last-child { + width: 100%; +} + +.cbi-dropdown[open] > ul.dropdown > li[unselectable] { + opacity: 0.7; +} + +.cbi-dropdown[open] > ul.dropdown > li > input.create-item-input:first-child:last-child { + width: 100%; +} + .cbi-dropdown[disabled] { pointer-events: none; opacity: .6; @@ -1122,6 +1138,68 @@ td > table > tbody > tr > td, width: auto; } +.cbi-dynlist { + height: auto; + min-height: 30px; + display: inline-flex; + flex-direction: column; +} + +.cbi-dynlist > .item { + margin: 0 2em 4px 0; + padding: 2px 4px; + border-bottom: 2px solid rgba(0, 0, 0, .26); + position: relative; + pointer-events: none; + cursor: default; +} + +.cbi-dynlist > .item::after { + content: "×"; + position: absolute; + display: inline-flex; + align-items: center; + top: 0; + right: -2em; + bottom: 0; + padding: 0 6px; + border: 1px solid #c44; + font-weight: bold; + color: #c44; + pointer-events: auto; +} + +.cbi-dynlist { + height: auto; + min-height: 30px; + display: inline-flex; + flex-direction: column; +} + +.cbi-dynlist > .item { + margin: 0 2em 4px 0; + padding: 2px 4px; + border-bottom: 2px solid rgba(0, 0, 0, .26); + position: relative; + pointer-events: none; + cursor: default; +} + +.cbi-dynlist > .item::after { + content: "×"; + position: absolute; + display: inline-flex; + align-items: center; + top: 0; + right: -2em; + bottom: 0; + padding: 0 6px; + border: 1px solid #c44; + font-weight: bold; + color: #c44; + pointer-events: auto; +} + /* luci */ |