stylelite/src/stylelite.css

272 lines
5.9 KiB
CSS
Raw Normal View History

/*! Stylelite v:1.0.0 | MIT LICENSE | https://github.com/n2geoff/stylelite */
2024-05-11 00:44:27 +00:00
:root {
--size: 1rem;
--radius: .3rem;
2024-07-20 22:43:16 +00:00
--foreground: #111;
--background: #FFF;
2024-05-11 00:44:27 +00:00
--light: #F0F0F0;
--dark: #404040;
2024-05-11 00:44:27 +00:00
--default: #F0F0F0;
--primary: #5499C7; /* 0000EE */
--secondary: #404040;
2024-07-20 22:43:16 +00:00
--success: #198754;
--warning: #fbc02d;
--danger: #C62828;
2024-05-11 00:44:27 +00:00
}
[data-theme=dark] {
--foreground: #FFF;
--background: #222;
2024-05-11 00:44:27 +00:00
--default: #333;
2024-05-11 00:44:27 +00:00
}
html, body {
color: var(--foreground);
background: var(--background);
font-family: Verdana, Geneva, Tahoma, sans-serif;
2024-05-11 00:44:27 +00:00
font-size: 16px;
box-sizing: border-box;
margin: 0;
padding: 0;
2024-05-11 00:44:27 +00:00
letter-spacing: 0.0125em;
height: 100%;
2024-05-11 00:44:27 +00:00
line-height: 1.5rem;
}
label {
display: inline-block;
font-weight: 700;
margin: .25rem;
2024-05-11 00:44:27 +00:00
}
ol, ul, li {margin-left: 1rem}
2024-05-11 00:44:27 +00:00
section {margin: 1rem 0;}
2024-05-11 00:44:27 +00:00
cite,strong {
display: inline-block;
font-weight: bold;
padding: .5rem 0rem;
2024-05-11 00:44:27 +00:00
}
pre,code,kbd {
font-family: monospace;
font-size: smaller;
padding: .25rem .5rem;
background: var(--default);
color: var(--foreground);
2024-05-11 00:44:27 +00:00
}
abbr {
border-bottom: 1px dotted;
cursor: help;
2024-05-11 00:44:27 +00:00
}
kbd {
font-style: normal;
color: var(--light);
background: var(--primary);
2024-05-17 21:19:10 +00:00
border-radius: var(--radius);
text-transform: uppercase;
2024-05-11 00:44:27 +00:00
}
i {vertical-align: middle;}
2024-05-11 00:44:27 +00:00
select,option,textarea,input,header,footer,button,main,blockquote {padding: calc(var(--size)/2) var(--size)}
2024-05-11 00:44:27 +00:00
select,option,textarea,input {
display: inline-block;
box-sizing: border-box;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 1rem;
width: 100%;
border: var(--default) 2px solid;
border-radius: var(--radius);
margin-bottom: .5rem;
2024-05-11 00:44:27 +00:00
}
select:hover {cursor: pointer;}
2024-05-11 00:44:27 +00:00
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}
h1,h2,h3,h4,h5,h6 {margin-top: 1rem;margin-bottom: .5rem;}
2024-05-11 00:44:27 +00:00
hr {margin: 1rem 0; border-color: var(--primary)}
2024-05-11 00:44:27 +00:00
blockquote {
margin: var(--size) 0;
color: var(--foreground);
font-style: italic;
padding: calc(var(--size) * 1.5);
border: var(--default) 1px solid;
border-left: var(--default) 1rem solid;
border-radius: var(--radius);
2024-05-11 00:44:27 +00:00
}
/* Buttons */
2024-05-11 00:44:27 +00:00
button {font-family: Verdana, Geneva, Tahoma, sans-serif;border-radius: var(--radius);}
2026-01-25 16:13:41 +00:00
button:hover, input[type="reset"]:hover,input[type="submit"]:hover {
filter:brightness(90%) !important;
2024-05-11 00:44:27 +00:00
cursor: pointer;
}
button,input[type="submit"],input[type="reset"] {
border: unset;
box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.1);
2024-05-11 00:44:27 +00:00
}
a.button {padding: calc(var(--size)/2) var(--size);text-align: center;}
2024-05-11 00:44:27 +00:00
a {display: inline-block;vertical-align: middle; color: var(--primary)}
a:hover {color: var(--foreground)}
a[name] {display: none;} /* fix anchors */
2024-05-11 00:44:27 +00:00
input:user-invalid {
outline: 2px solid var(--danger);
2024-05-11 00:44:27 +00:00
}
input[type="checkbox"],
input[type="radio"]{
display: inline-block;
vertical-align: middle;
width: 1rem;
height: 1rem;
2024-05-11 00:44:27 +00:00
}
*:disabled {background: #F0F0F0; }
*:disabled:hover {cursor: not-allowed}
2024-05-17 21:33:42 +00:00
/* Tables */
2024-05-11 00:44:27 +00:00
table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
2024-05-11 00:44:27 +00:00
}
tbody {
border-top: var(--default) 2px solid;
border-bottom: var(--default) 2px solid;
2024-05-11 00:44:27 +00:00
}
th {text-align: left}
2024-05-11 00:44:27 +00:00
th,td {
padding: .25rem;
border-bottom: 1px solid var(--default);
2024-05-11 00:44:27 +00:00
}
table.striped tbody>:nth-child(2n-1) {background: var(--default)}
2024-05-11 00:44:27 +00:00
/* Details */
details {
color: var(--dark);
background: var(--light);
margin: var(--size) 0;
2024-05-11 00:44:27 +00:00
cursor: pointer;
border: var(--default) 2px solid;
2024-05-11 00:44:27 +00:00
}
details[open] {
margin-bottom: var(--size);
2024-05-11 00:44:27 +00:00
}
details>* {
box-sizing: border-box;
padding: .5rem 1rem;
2024-05-11 00:44:27 +00:00
}
summary:hover {cursor: pointer;}
details:not(summary):hover {cursor: default}
2024-05-11 00:44:27 +00:00
/* Dialog */
2024-05-11 00:44:27 +00:00
dialog[open] {
margin: auto;
2024-05-11 00:44:27 +00:00
}
dialog {
border: 1px solid var(--dark);
border-radius: var(--radius);
padding:0;
margin:0;
max-width: 85%;
min-width: 340px;
2024-05-11 00:44:27 +00:00
}
dialog::backdrop {
background-color: rgba(0, 0, 0, 0.8);
}
2024-05-11 17:57:31 +00:00
2024-05-11 00:44:27 +00:00
/* Navigation */
nav {
display: flex;
justify-content: space-between;
padding: 0rem .5rem;
}
nav .brand {
margin:0;
font-size: x-large;
2024-05-11 00:44:27 +00:00
}
nav a {text-decoration: none;}
nav > ul > li > a:hover, .active {
margin-top: -1px; /* fix page bounce */
border-bottom: currentColor 1px solid;
2025-05-14 23:32:50 +00:00
}
2024-05-11 00:44:27 +00:00
2025-05-14 23:32:50 +00:00
nav ul {display: flex;list-style-type: none;margin:0;padding:0; line-height: 2rem}
2024-06-08 16:23:30 +00:00
nav ul li {padding:0rem .5rem;margin:0}
2024-06-16 21:45:17 +00:00
nav ul li:first-child {margin-left:0;margin-left:0}
nav a {text-decoration: none;color: var(--primary)}
2024-05-11 00:44:27 +00:00
/* Colors */
2024-05-11 17:57:31 +00:00
.primary {color: var(--light); background: var(--primary);}
.secondary {color: var(--light); background: var(--secondary);}
.default {color: var(--dark); background: var(--light);}
.dark {color: var(--light); background: var(--dark);}
.light {color: var(--dark); background: var(--light);}
2024-05-11 19:12:53 +00:00
blockquote.primary {border-color: var(--primary);}
blockquote.secondary {border-color: var(--secondary);}
.text-primary {color: var(--primary)}
.text-secondary {color: var(--secondary)}
.text-default, .weak {color: var(--default)}
2024-05-11 17:57:31 +00:00
2024-05-17 20:22:49 +00:00
/* Layout Utilities */
2024-05-11 00:44:27 +00:00
.grid {
display: grid;
gap: .25rem;
grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
}
2024-07-20 21:56:35 +00:00
.group {display: flex}
.container {
margin: 0 auto;
padding: var(--size);
max-width: 1140px;
}
.underline {border-bottom: currentColor 1px solid}
.border {border: var(--default) 2px solid;border-radius: var(--radius);}
.indent {margin-left: .25rem;}
.pointer {cursor: pointer;}
.center {align-self: center; justify-self: center;}