--theme support returns

This commit is contained in:
Geoff Doty 2026-01-25 14:53:16 -05:00
parent 9ee5977257
commit 613b0b757a
3 changed files with 41 additions and 24 deletions

View File

@ -66,8 +66,8 @@ It is RECOMMENDED you import **Stylelite** via a `main.css` or the like referenc
| Var | Default | Description | | Var | Default | Description |
|--|--|--| |--|--|--|
| --primary | steelblue | theme color | | --primary | #5499C7 | theme color (overwritten by `--theme`) |
| --secondary | #404040 | theme color | | --secondary | #404040 | contrast color |
| --size | 1rem | a universal size, margin, font-size, ect... | | --size | 1rem | a universal size, margin, font-size, ect... |
| --radius | .3rem | add some curves | | --radius | .3rem | add some curves |
| --foreground| #111 | foreground color | | --foreground| #111 | foreground color |
@ -76,7 +76,7 @@ It is RECOMMENDED you import **Stylelite** via a `main.css` or the like referenc
| --light | #EEE | light accent color | | --light | #EEE | light accent color |
| --dark | #222 | dark accent color | | --dark | #222 | dark accent color |
> `--theme` may make a return, but ingored unless set > `--theme` is an ignored color setting unless a user sets
### Themes ### Themes

View File

@ -193,7 +193,10 @@
</div> </div>
<div> <div>
<label for='email'>Email</label> <label for='email'>Email</label>
<input type='email' name='email' id='email' placeholder='email@example.com' autocomplete="off"> <div class="group">
<input type='email' name='email' id='email' placeholder='email@example.com' autocomplete="off">
<i class="primary ft-mail"></i>
</div>
</div> </div>
<div> <div>
<label for='password'>Password</label> <label for='password'>Password</label>

View File

@ -9,8 +9,8 @@
--light: #F0F0F0; --light: #F0F0F0;
--dark: #404040; --dark: #404040;
--default: #F0F0F0; --default: #EEE;
--primary: #5499C7; /* 0000EE */ --primary: var(--theme, #5499C7); /* 0000EE */
--secondary: #404040; --secondary: #404040;
--success: #198754; --success: #198754;
@ -46,7 +46,7 @@ label {
ol, ul, li {margin-left: 1rem} ol, ul, li {margin-left: 1rem}
section {margin: 1rem 0;} i {vertical-align: middle;}
cite,strong { cite,strong {
display: inline-block; display: inline-block;
@ -58,8 +58,8 @@ pre,code,kbd {
font-family: monospace; font-family: monospace;
font-size: smaller; font-size: smaller;
padding: .25rem .5rem; padding: .25rem .5rem;
background: var(--default); background: var(--light);
color: var(--foreground); color: var(--dark);
} }
abbr { abbr {
@ -75,8 +75,6 @@ kbd {
text-transform: uppercase; text-transform: uppercase;
} }
i {vertical-align: middle;}
select,option,textarea,input,header,footer,button,main,blockquote {padding: calc(var(--size)/2) var(--size)} select,option,textarea,input,header,footer,button,main,blockquote {padding: calc(var(--size)/2) var(--size)}
select,option,textarea,input { select,option,textarea,input {
@ -89,15 +87,22 @@ select,option,textarea,input {
border-radius: var(--radius); border-radius: var(--radius);
margin-bottom: .5rem; margin-bottom: .5rem;
} }
input:focus,textarea:focus,select:focus {
border-color: var(--primary);
outline: none;
}
select:hover {cursor: pointer;} select:hover {cursor: pointer;}
h1 {font-size: 2.2rem} h1 {font-size: 2.2rem;margin: 3.4rem 0;}
h2 {font-size: 1.8rem} h2 {font-size: 1.8rem;margin: 2.2rem 0;}
h3 {font-size: 1.4rem} h3 {font-size: 1.4rem;margin: 1.8rem 0;}
h4 {font-size: 1.2rem} h4 {font-size: 1.2rem}
h5 {font-size: 1.1rem} h5 {font-size: 1.1rem}
h6 {font-size: 1rem} h6 {font-size: 1rem}
h1,h2,h3,h4,h5,h6 {margin-top: 1rem;margin-bottom: .5rem;} h1,h2,h3,h4,h5,h6 {margin-bottom: .5rem;}
h4,h5,h6{margin-top: 1rem}
hr {margin: 1rem 0; border-color: var(--primary)} hr {margin: 1rem 0; border-color: var(--primary)}
@ -106,8 +111,8 @@ blockquote {
color: var(--foreground); color: var(--foreground);
font-style: italic; font-style: italic;
padding: calc(var(--size) * 1.5); padding: calc(var(--size) * 1.5);
border: var(--default) 1px solid; border: var(--theme, var(--default)) 1px solid;
border-left: var(--default) 1rem solid; border-left: var(--theme, var(--default)) 1rem solid;
border-radius: var(--radius); border-radius: var(--radius);
} }
@ -125,6 +130,11 @@ button,input[type="submit"],input[type="reset"] {
box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.1);
} }
input[type="submit"] {
color: var(--light);
background: var(--primary);
}
a.button {padding: calc(var(--size)/2) var(--size);text-align: center;} a.button {padding: calc(var(--size)/2) var(--size);text-align: center;}
a {display: inline-block;vertical-align: middle; color: var(--primary)} a {display: inline-block;vertical-align: middle; color: var(--primary)}
@ -154,16 +164,15 @@ table {
width: 100%; width: 100%;
} }
tbody { thead,tfoot,tbody {
border-top: var(--default) 2px solid; border-bottom: var(--theme, var(--default)) 2px solid;
border-bottom: var(--default) 2px solid;
} }
th {text-align: left} th {text-align: left; color: var(--theme, var(--foreground))}
th,td { th,td {
padding: .25rem; padding: .25rem;
border-bottom: 1px solid var(--default); border-bottom: 1px solid var(--theme, var(--default));
} }
table.striped tbody>:nth-child(2n-1) {background: var(--default)} table.striped tbody>:nth-child(2n-1) {background: var(--default)}
@ -257,6 +266,11 @@ blockquote.secondary {border-color: var(--secondary);}
} }
.group {display: flex} .group {display: flex}
.group > i {
line-height: 1.5rem;
margin-bottom: .5rem;
padding: .5rem 1rem;
}
.container { .container {
margin: 0 auto; margin: 0 auto;
@ -264,8 +278,8 @@ blockquote.secondary {border-color: var(--secondary);}
max-width: 1140px; max-width: 1140px;
} }
.underline {border-bottom: currentColor 1px solid} .underline {border-bottom: var(--theme, currentColor) 1px solid}
.border {border: var(--default) 2px solid;border-radius: var(--radius);} .border {border: var(--theme, var(--default)) 2px solid;border-radius: var(--radius);}
.indent {margin-left: .25rem;} .indent {margin-left: .25rem;}
.pointer {cursor: pointer;} .pointer {cursor: pointer;}
.center {align-self: center; justify-self: center;} .center {align-self: center; justify-self: center;}