chips, toggle buttons, transitions, modal

This commit is contained in:
2025-11-08 19:44:43 +01:00
parent 903bf5d3f5
commit ca6b95ee55

View File

@@ -11,6 +11,8 @@
:root { :root {
--padding: .5rem; --padding: .5rem;
color-scheme: only light;
/* Default is nebula-light */ /* Default is nebula-light */
--font-family: sans-serif; --font-family: sans-serif;
--background-color: #fff; --background-color: #fff;
@@ -28,6 +30,7 @@
--border-color: #d5d9d9; --border-color: #d5d9d9;
--border-width: 1px; --border-width: 1px;
--border-radius: 8px; --border-radius: 8px;
--chip-border-radius: 2rem;
--shadow-color: rgba(213, 217, 217, .5); --shadow-color: rgba(213, 217, 217, .5);
--global-theme-toggle-content: ' 🌞'; --global-theme-toggle-content: ' 🌞';
@@ -57,6 +60,8 @@ html[data-theme='nebula'] {
} }
html[data-theme='nebula-dark'] { html[data-theme='nebula-dark'] {
color-scheme: dark;
--background-color: #29292c; --background-color: #29292c;
--background-color-secondary: #29292c; --background-color-secondary: #29292c;
--button-color: #29292c; --button-color: #29292c;
@@ -73,6 +78,7 @@ html[data-theme='nebula-dark'] {
--border-color: #333; --border-color: #333;
--border-width: 1px; --border-width: 1px;
--border-radius: 8px; --border-radius: 8px;
--chip-border-radius: 2rem;
--shadow-color: rgba(3, 3, 3, .5); --shadow-color: rgba(3, 3, 3, .5);
--global-theme-toggle-content: ' 🌝'; --global-theme-toggle-content: ' 🌝';
} }
@@ -95,6 +101,7 @@ html[data-theme='bbs'] {
--border-color: #333; --border-color: #333;
--border-width: 2px; --border-width: 2px;
--border-radius: 0; --border-radius: 0;
--chip-border-radius: 0;
--global-theme-toggle-content: ' 🖥️'; --global-theme-toggle-content: ' 🖥️';
} }
@@ -120,6 +127,7 @@ html[data-theme='silo'] {
/*--border-color: #003eaa;*/ /*--border-color: #003eaa;*/
--border-width: 2px; --border-width: 2px;
--border-radius: 0; --border-radius: 0;
--chip-border-radius: 0;
--global-theme-toggle-content: ' ⌨️'; --global-theme-toggle-content: ' ⌨️';
} }
@@ -155,6 +163,10 @@ header {
height: 3rem; height: 3rem;
display: flex; display: flex;
align-items: center; align-items: center;
}
[data-theme='nebula'] header,
[data-theme='nebula-dark'] header {
/*box-shadow: 0 0 5px 0 rgba(213, 217, 217, .5);*/ /*box-shadow: 0 0 5px 0 rgba(213, 217, 217, .5);*/
/*box-shadow: 0 0 5px 0 #999;*/ /*box-shadow: 0 0 5px 0 #999;*/
box-shadow: 0 0 5px var(--shadow-color); box-shadow: 0 0 5px var(--shadow-color);
@@ -200,7 +212,7 @@ h1 {
font-size: 2em; font-size: 2em;
} }
a, a:hover, a:visited, a:active { a, a:hover, a:visited, a:active, a.button, a.button:hover, a.button:active, a.button:visited {
text-decoration: none; text-decoration: none;
} }
@@ -221,6 +233,7 @@ ol li::marker, ul li::marker {
.active { .active {
background-color: var(--color-highlight); background-color: var(--color-highlight);
color: var(--text-color); color: var(--text-color);
transition-duration: 0.2s;
} }
/* Special button */ /* Special button */
@@ -230,9 +243,7 @@ ol li::marker, ul li::marker {
/* Buttons */ /* Buttons */
button, input, select, textarea { button, .button, input, select, textarea {
border: var(--border-width) solid var(--border-color);
border-radius: var(--border-radius);
box-sizing: border-box; box-sizing: border-box;
color: var(--text-color-secondary); color: var(--text-color-secondary);
background-color: var(--button-color); background-color: var(--button-color);
@@ -241,7 +252,6 @@ button, input, select, textarea {
font-size: 13px; font-size: 13px;
/*line-height: 29px;*/ /*line-height: 29px;*/
/*padding: 0 10px 0 11px;*/ /*padding: 0 10px 0 11px;*/
padding: .5rem .5rem;
position: relative; position: relative;
text-align: left; text-align: left;
text-decoration: none; text-decoration: none;
@@ -249,16 +259,24 @@ button, input, select, textarea {
-webkit-user-select: none; -webkit-user-select: none;
touch-action: manipulation; touch-action: manipulation;
vertical-align: middle; vertical-align: middle;
transition-duration: 0.2s;
} }
button:hover { button, .button, input, select, textarea, table {
border: var(--border-width) solid var(--border-color);
border-radius: var(--border-radius);
padding: .5rem .5rem;
}
button:hover, .button:hover {
/*background-color: #f7fafa;*/ /*background-color: #f7fafa;*/
/*background-color: #d57803;*/ /*background-color: #d57803;*/
background-color: var(--color-highlight); background-color: var(--color-highlight);
filter: brightness(80%); filter: brightness(80%);
transition-duration: 0.2s;
} }
button:focus { button:focus, .button:focus {
/*border-color: #008296;*/ /*border-color: #008296;*/
/*box-shadow: rgba(213, 217, 217, .5) 0 2px 5px 0;*/ /*box-shadow: rgba(213, 217, 217, .5) 0 2px 5px 0;*/
outline: 0; outline: 0;
@@ -292,6 +310,32 @@ button:focus {
filter: brightness(80%); filter: brightness(80%);
} }
/* Toggle buttons */
.button-group {
display: inline-flex;
overflow: hidden;
border: var(--border-width) solid var(--border-color);
border-radius: var(--border-radius);
}
.button-group button {
/* Reset borders because the buttons are mashed together and the group has its own border */
border: none;
border-radius: 0;
box-shadow: none !important;
}
/* Table */
th {
text-align: left;
}
th, td {
padding: 0 0.3rem;
}
/* Cards */ /* Cards */
.cards { .cards {
@@ -309,16 +353,24 @@ button:focus {
/*padding: 1em;*/ /*padding: 1em;*/
} }
[data-theme='nebula'] :modal,
[data-theme='nebula'] .card, [data-theme='nebula'] .card,
[data-theme='nebula'] button, [data-theme='nebula'] button,
[data-theme='nebula'] .button,
[data-theme='nebula'] .button-group,
[data-theme='nebula'] input, [data-theme='nebula'] input,
[data-theme='nebula'] select, [data-theme='nebula'] select,
[data-theme='nebula'] textarea, [data-theme='nebula'] textarea,
[data-theme='nebula'] table,
[data-theme='nebula-dark'] :modal,
[data-theme='nebula-dark'] .card, [data-theme='nebula-dark'] .card,
[data-theme='nebula-dark'] button, [data-theme='nebula-dark'] button,
[data-theme='nebula-dark'] .button,
[data-theme='nebula-dark'] .button-group,
[data-theme='nebula-dark'] input, [data-theme='nebula-dark'] input,
[data-theme='nebula-dark'] select, [data-theme='nebula-dark'] select,
[data-theme='nebula-dark'] textarea { [data-theme='nebula-dark'] textarea,
[data-theme='nebula-dark'] table {
box-shadow: var(--shadow-color) 0 2px 5px 0; box-shadow: var(--shadow-color) 0 2px 5px 0;
} }
@@ -392,7 +444,7 @@ button:focus {
.chip { .chip {
font-size: .8rem; font-size: .8rem;
border-radius: var(--border-radius); border-radius: var(--chip-border-radius);
background-color: var(--background-color-secondary); background-color: var(--background-color-secondary);
color: var(--text-color-secondary); color: var(--text-color-secondary);
/*color: var(--text-color);*/ /*color: var(--text-color);*/
@@ -401,7 +453,7 @@ button:focus {
} }
.chip .button { .chip .button {
border-radius: var(--border-radius); border-radius: var(--chip-border-radius);
} }
/* Status */ /* Status */
@@ -410,6 +462,24 @@ button:focus {
} }
/** Modal, e.g. for showing info or filling in a form; on top of the other content */
dialog:modal {
color: var(--text-color);
background-color: var(--background-color);
/*background-color: var(--nav-background-color);*/
border: 2px solid var(--border-color);
border-radius: var(--border-radius);
width: 90%;
/*height: 90%;*/
overflow: auto;
}
/* The umwelt of the modal, on top of the regular content */
dialog::backdrop {
background-color: rgba(0, 0, 0, 0.5);
}
/** Footer */ /** Footer */
footer { footer {