stylelite/src/stylelite.css

367 lines
7.1 KiB
CSS
Raw Normal View History

2024-05-17 17:29:48 +00:00
/*! Stylelite v:0.7.1 | MIT LICENSE | https://github.com/n2geoff/stylelite */
2024-05-11 00:44:27 +00:00
:root {
--size: 1rem;
--radius: 0rem;
--fg: #17202A;
--bg: #FDFEFE;
--mg: #99A3A4;
--white: #FFF;
--black: #000;
--gray: #777;
--light: #EEE;
--dark: #222;
--theme: steelblue;
}
[data-theme=dark] {
--mg: #99A3A4;;
--bg: #17202A;
--fg: #EAECEE;
}
2024-05-17 17:29:48 +00:00
* {margin:0}
2024-05-11 00:44:27 +00:00
2024-05-17 17:11:35 +00:00
*,*::before,*::after {
2024-05-11 00:44:27 +00:00
box-sizing: border-box;
}
html,body {
background: var(--bg);
color: var(--fg);
accent-color: var(--theme);
font-family: system-ui, sans-serif;
font-size: 16px;
letter-spacing: 0.0125em;
line-height: 1.5rem;
}
div, label, input, button, textarea, select {margin-bottom: .25rem;}
p {margin: 1rem 0}
img,embed,iframe,object,audio,video {
height: auto;
max-width: 100%;
border: none;
}
ol, ul {margin-left: 1rem}
li {margin-left: 1rem}
label {
display: inline-block;
font-weight: 600;
color: var(--dark);
white-space: nowrap;
vertical-align: top;
}
label.addon {
max-height: 2.5rem;
background: var(--light);
padding: .5rem 1rem;
text-align: center;
border: 1px solid var(--theme);
}
2024-05-17 19:12:29 +00:00
code {
background: var(--light);
padding: .25rem
}
2024-05-11 00:44:27 +00:00
main {
margin: 0 auto;
padding: var(--size);
max-width: 1140px;
}
table {
background: var(--bg);
border-collapse: collapse;
border-spacing: 0;
width: 100%;
}
table>thead>tr>th {
border-bottom: 2px solid var(--theme);
}
th {
text-align: left;
}
th,td {
padding: .5rem;
border-bottom: 1px solid var(--theme);
}
table.striped tbody>:nth-child(2n-1) {
background: #f5f5f5;
}
table.condensed * {padding:0}
fieldset {
background: var(--bg);
padding: 1rem;
border: 1px solid var(--theme);
}
legend {
font-size: larger;
font-weight: 600;
color: var(--theme);
background: var(--bg);
display: block;
width: fit-content;
padding: .25rem .5rem;
margin: 0;
line-height: inherit;
border: 1px solid var(--theme);
}
blockquote {
margin: var(--size) 0;
color: var(--black);
background: var(--light);
padding: var(--size);
2024-05-17 19:12:56 +00:00
border-left: 8px solid var(--theme);
2024-05-11 00:44:27 +00:00
}
hr {
color: var(--theme);
border: 1px solid;
}
h1,h2,h3,h4,h5,h6 {
color: var(--theme);
margin: var(--size) 0;
padding-bottom: calc(var(--size) / 2);
text-transform: capitalize;
}
h1 {font-size: 2.2rem}
h2 {font-size: 1.8rem}
h3 {font-size: 1.4rem}
h4 {font-size: 1.2rem}
h5 {font-size: 1.1rem}
h6 {font-size: 1rem}
a {color: var(--theme)}
a:hover {color: var(--dark);}
section, article {
margin-bottom: 2rem;
}
article {
border: 1px solid rgba(0,0,0,.125);
background: var(--light);
2024-05-17 19:12:56 +00:00
color: var(--dark);
2024-05-11 00:44:27 +00:00
}
/* Forms */
details {
margin: var(--size) 0;
color: var(--fg);
cursor: pointer;
}
details[open] {
background-color: var(--bg);
margin-bottom: var(--size);
border: 1px solid var(--theme);
}
details>* {
box-sizing: border-box;
padding: .5rem 1rem;
}
summary {
color: var(--theme);
height: 40px;
background-color: var(--bg);
border: 1px solid var(--theme);
}
summary:hover {cursor: pointer;}
details:not(summary):hover {cursor: default}
a.button, button, input {
display: inline-block;
outline: none;
box-sizing: border-box;
font-size: 1rem;
background: var(--bg);
color: var(--fg);
min-width: fit-content;
width: 100%;
height: 2.5rem;
border: 1px solid var(--theme);
border-radius: var(--radius);
padding: .5rem 1rem;
}
input[type=color] {padding: .25rem}
input[type="checkbox"],
input[type="radio"]{
padding: 0;
width: 1.1rem;
height: 1.1rem;
margin-right: .5rem;
margin-top: .25rem;
}
button, input[type="reset"],input[type="submit"] {
display: inline-block;
border-radius: var(--radius);
width: initial;
}
button[disabled], button[disabled]:hover {
color: var(--gray);
background-color: var(--light);
border: 1px solid var(--gray);
cursor: not-allowed;
pointer-events: none;
}
button.link {
border: none;
background: none;
color: var(--theme)
}
button.link:hover {
background: none;
border: none;
color: var(--theme);
text-decoration: underline;
}
a.button, button, input[type="submit"] {
2024-05-11 00:44:27 +00:00
background: var(--theme);
color: var(--white);
}
button.outline {
background: none;
outline: var(--theme);
color: var(--fg);
2024-05-11 00:44:27 +00:00
}
a.button:hover, button:hover, input[type="reset"]:hover,input[type="submit"]:hover {
filter:brightness(90%) !important;
2024-05-11 00:44:27 +00:00
cursor: pointer;
}
select:disabled, textarea:disabled,input:disabled {
cursor: not-allowed;
pointer-events: none;
border-color: var(--mg);
}
select:focus,textarea:focus,input:focus {
border: 2px solid var(--theme);
}
option { line-height: 1rem; vertical-align: center;}
select,textarea {
display: inline-block;
outline: none;
font-size: var(--size);
height: 2.5rem;
width: 100%;
border: 1px solid var(--theme);
color: var(--fg);
background: var(--bg);
border-radius: var(--radius);
padding: 0 var(--size);
cursor: pointer;
}
select {
background: var(--bg) no-repeat 100%;
color: var(--fg);
padding: 0 clamp(.5rem, var(--size), 2rem);
appearance: none;
background-size: 1ex;
background-origin: content-box;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='40' fill='%23555'><polygon points='0,0 60,0 30,40'/></svg>");
}
textarea {
overflow: auto;
resize: vertical;
border: 1px solid var(--theme);
height: calc(var(--size) * 6rem);;
padding: clamp(.5rem, var(--size), 2rem);
cursor: text;
color: var(--fg);
}
2024-05-11 17:57:31 +00:00
*:disabled, .disable, .disable {pointer-events: none;}
2024-05-11 00:44:27 +00:00
/* Navigation */
nav {
display: flex;
justify-content: space-between;
padding-bottom: .25rem;
border-bottom: 1px solid var(--theme);
}
nav ul {display: flex;list-style-type: none;}
nav li {padding-left: 1rem;}
nav a {text-decoration: none;}
nav.navbar {
padding: 1rem;
background: var(--theme);
color: var(--white);
}
nav.navbar a {color: var(--white)}
2024-05-11 19:12:53 +00:00
/* Dialog */
2024-05-11 17:57:31 +00:00
2024-05-11 19:12:53 +00:00
dialog[open] {
margin: auto;
}
dialog {
border: 1px solid var(--theme);
box-shadow: 0 0 #0000, 0 0 #0000, 0 25px 50px -12px rgba(0, 0, 0, 0.25);
padding: calc(var(--size) * 2);
max-width: 85%;
}
2024-05-11 17:57:31 +00:00
2024-05-11 00:44:27 +00:00
/* Grid System */
.grid {
display: grid;
gap: .25rem;
grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
}
/* Utilities */
.group {display: flex;}
.right {float:right}
.left {float:left}
.center {text-align: center;}
.clear {content:'';display: table;clear:both}
.rounded {border-radius: calc(var(--size) / 4);}
.border {border: 1px solid var(--theme)}
.no-border {border: none}
2024-05-11 17:57:31 +00:00
.no-space {margin: 0; padding:0;}
2024-05-11 00:44:27 +00:00
.no-theme {--theme: var(--fg)}