mirror of
https://github.com/aquatix/digui.git
synced 2025-12-06 11:55:10 +01:00
chips, toggle buttons, transitions, modal
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
:root {
|
||||
--padding: .5rem;
|
||||
|
||||
color-scheme: only light;
|
||||
|
||||
/* Default is nebula-light */
|
||||
--font-family: sans-serif;
|
||||
--background-color: #fff;
|
||||
@@ -28,6 +30,7 @@
|
||||
--border-color: #d5d9d9;
|
||||
--border-width: 1px;
|
||||
--border-radius: 8px;
|
||||
--chip-border-radius: 2rem;
|
||||
--shadow-color: rgba(213, 217, 217, .5);
|
||||
--global-theme-toggle-content: ' 🌞';
|
||||
|
||||
@@ -57,6 +60,8 @@ html[data-theme='nebula'] {
|
||||
}
|
||||
|
||||
html[data-theme='nebula-dark'] {
|
||||
color-scheme: dark;
|
||||
|
||||
--background-color: #29292c;
|
||||
--background-color-secondary: #29292c;
|
||||
--button-color: #29292c;
|
||||
@@ -73,6 +78,7 @@ html[data-theme='nebula-dark'] {
|
||||
--border-color: #333;
|
||||
--border-width: 1px;
|
||||
--border-radius: 8px;
|
||||
--chip-border-radius: 2rem;
|
||||
--shadow-color: rgba(3, 3, 3, .5);
|
||||
--global-theme-toggle-content: ' 🌝';
|
||||
}
|
||||
@@ -95,6 +101,7 @@ html[data-theme='bbs'] {
|
||||
--border-color: #333;
|
||||
--border-width: 2px;
|
||||
--border-radius: 0;
|
||||
--chip-border-radius: 0;
|
||||
--global-theme-toggle-content: ' 🖥️';
|
||||
}
|
||||
|
||||
@@ -120,6 +127,7 @@ html[data-theme='silo'] {
|
||||
/*--border-color: #003eaa;*/
|
||||
--border-width: 2px;
|
||||
--border-radius: 0;
|
||||
--chip-border-radius: 0;
|
||||
--global-theme-toggle-content: ' ⌨️';
|
||||
}
|
||||
|
||||
@@ -155,6 +163,10 @@ header {
|
||||
height: 3rem;
|
||||
display: flex;
|
||||
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 #999;*/
|
||||
box-shadow: 0 0 5px var(--shadow-color);
|
||||
@@ -200,7 +212,7 @@ h1 {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -221,6 +233,7 @@ ol li::marker, ul li::marker {
|
||||
.active {
|
||||
background-color: var(--color-highlight);
|
||||
color: var(--text-color);
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
/* Special button */
|
||||
@@ -230,9 +243,7 @@ ol li::marker, ul li::marker {
|
||||
|
||||
/* Buttons */
|
||||
|
||||
button, input, select, textarea {
|
||||
border: var(--border-width) solid var(--border-color);
|
||||
border-radius: var(--border-radius);
|
||||
button, .button, input, select, textarea {
|
||||
box-sizing: border-box;
|
||||
color: var(--text-color-secondary);
|
||||
background-color: var(--button-color);
|
||||
@@ -241,7 +252,6 @@ button, input, select, textarea {
|
||||
font-size: 13px;
|
||||
/*line-height: 29px;*/
|
||||
/*padding: 0 10px 0 11px;*/
|
||||
padding: .5rem .5rem;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
text-decoration: none;
|
||||
@@ -249,16 +259,24 @@ button, input, select, textarea {
|
||||
-webkit-user-select: none;
|
||||
touch-action: manipulation;
|
||||
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: #d57803;*/
|
||||
background-color: var(--color-highlight);
|
||||
filter: brightness(80%);
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
button:focus, .button:focus {
|
||||
/*border-color: #008296;*/
|
||||
/*box-shadow: rgba(213, 217, 217, .5) 0 2px 5px 0;*/
|
||||
outline: 0;
|
||||
@@ -292,6 +310,32 @@ button:focus {
|
||||
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 {
|
||||
@@ -309,16 +353,24 @@ button:focus {
|
||||
/*padding: 1em;*/
|
||||
}
|
||||
|
||||
[data-theme='nebula'] :modal,
|
||||
[data-theme='nebula'] .card,
|
||||
[data-theme='nebula'] button,
|
||||
[data-theme='nebula'] .button,
|
||||
[data-theme='nebula'] .button-group,
|
||||
[data-theme='nebula'] input,
|
||||
[data-theme='nebula'] select,
|
||||
[data-theme='nebula'] textarea,
|
||||
[data-theme='nebula'] table,
|
||||
[data-theme='nebula-dark'] :modal,
|
||||
[data-theme='nebula-dark'] .card,
|
||||
[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'] 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;
|
||||
}
|
||||
|
||||
@@ -392,7 +444,7 @@ button:focus {
|
||||
|
||||
.chip {
|
||||
font-size: .8rem;
|
||||
border-radius: var(--border-radius);
|
||||
border-radius: var(--chip-border-radius);
|
||||
background-color: var(--background-color-secondary);
|
||||
color: var(--text-color-secondary);
|
||||
/*color: var(--text-color);*/
|
||||
@@ -401,7 +453,7 @@ button:focus {
|
||||
}
|
||||
|
||||
.chip .button {
|
||||
border-radius: var(--border-radius);
|
||||
border-radius: var(--chip-border-radius);
|
||||
}
|
||||
|
||||
/* 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 {
|
||||
|
||||
Reference in New Issue
Block a user