imporvement: simpler style

This commit is contained in:
Kazhnuz 2024-07-28 21:11:12 +02:00
parent dda6cbb598
commit 57fa693c26

View file

@ -30,19 +30,9 @@
} }
:root { :root {
--color-gray-20: #e0e0e0; --background-color: #212529;
--color-gray-50: #C0C0C0; --background-color-alt: #343a40;
--color-gray-90: #2f2f2f; --text-color: #e9ecef;
/* --text-color is assigned to --color-gray-_ above */
--text-color-link: #c92a2a;
--text-color-link-active: #c92a2a;
--text-color-link-visited: #c92a2a;
--background-color: #fafafa;
--background-menu: #495057;
--text-color: var(--color-gray-90);
--font-family: Inter, --font-family: Inter,
-apple-system, -apple-system,
@ -67,256 +57,115 @@
box-sizing: border-box; box-sizing: border-box;
} }
html, h1, h2, p, nav, main {
body { margin-bottom: 1.5rem!important;
margin: 0 auto;
min-height:100%;
font-family: var(--font-family);
color: var(--text-color);
} }
body { h1, h2 {
padding: 24px; font-family: var(--font-family-title);
}
.wrapper {
width: 800px;
margin: auto; margin: auto;
position: relative;
}
html {
overflow-y: scroll;
background-color: var(--background-color);
}
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
.visually-hidden {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
a[href] {
color: var(--text-color-link);
text-decoration: underline dashed 1px;
border-radius: 0.1rem;
text-decoration: underline dashed 1px;
text-underline-offset: 0.1rem;
}
a[href]:visited {
color: var(--text-color-link-visited);
}
a[href]:hover,
a[href]:active {
color: var(--text-color-link-active);
background-color: rgba(0,0,0,0.1);
text-decoration: none;
}
blockquote {
opacity: 75%;
border-left: 3px solid currentColor;
padding-left: 12px;
}
/* Direct Links / Markdown Headers */
.header-anchor {
text-decoration: none;
font-style: normal;
font-size: 1em;
margin-left: .1em;
}
a[href].header-anchor,
a[href].header-anchor:visited {
color: transparent;
}
a[href].header-anchor:focus,
a[href].header-anchor:hover {
text-decoration: underline;
}
a[href].header-anchor:focus,
:hover > a[href].header-anchor {
color: #aaa;
}
header {
background-color: var(--text-color-link);
background-image: url("/img/back.png");
border-radius:3px;
height:240px;
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.8);
display:flex;
align-items: center;
justify-content: center;
} }
h1 { h1 {
color: #e03131; font-size: 4.5rem;
font-family: var(--font-family-title); line-height: 4.5rem;
font-size: 3rem;
}
header h1 {
text-align: center; text-align: center;
} }
header h1 a[href] { h2 {
font-size:5.5rem; font-size: 2rem;
text-shadow: -2px -2px 0 #000, line-height: 3rem;
0 -2px 0 #000, }
2px -2px 0 #000,
2px 0 0 #000, html {
2px 2px 0 #000, font-family: var(--font-family);
0 2px 0 #000, background-color: var(--background-color);
-2px 2px 0 #000, font-size: 16px;
-2px 0 0 #000, line-height: 1.5rem;
.05em .1em 0 #000; }
font-weight: 900;
color:white!important; body {
text-decoration: none; color: var(--text-color);
text-transform: uppercase; margin: auto;
display: block; max-width: 800px;
line-height: 1; padding: 1.5rem;
}
nav {
border-radius: 999px;
padding: .33rem;
}
nav ol {
display: flex;
justify-content: space-between;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.quadrillage { nav li {
display:grid; list-style-type: none;
grid-template-columns : 1fr 1fr;
column-gap: 1rem;
} }
#sidebar { nav a, a.btn {
position: fixed;
top: 0;
left: 0;
border-right: 1px solid black;
background-color: var(--background-menu);
padding:12px;
height:100%;
box-shadow: 1px 0px 1px 0px rgba(0,0,0,0.4);
}
#sidebar > ul > li {
margin:0;
padding:3px;
}
main {
background-color: var(--background-color);
line-height:1.5rem;
width: 800px;
margin: auto;
}
main img {
display: block; display: block;
max-width: 100%;
height: auto;
margin: auto; margin: auto;
padding: .66rem 1rem;
border-radius: 999px;
width:fit-content;
text-decoration: none;
} }
.card, nav, .btn {
#links ul>li { background-color: rgba(255 255 255 / 10%);
background-color: var(--background-menu);
} }
#links ul > li { a {
list-style: none;
font-weight: bold;
}
#more-info ol > li,
#more-info ul > li {
list-style: none;
}
#links ul>li li,
#more-info li {
border-radius:0px;
padding:0px;
margin:0px;
font-weight: normal;
border:0;
box-shadow: none;
}
ul.nav,
#links ul li ul,
#more-info ol {
padding:0;
margin:0;
list-style: none;
}
#more-info ol li a {
display:block;
width:100%;
text-decoration:dashed;
color: white;
border-radius:3px;
padding:6px;
}
#more-info ol li a {
color: var(--text-color); color: var(--text-color);
} text-decoration: underline dashed 1px;
#links ul li > p {
padding: 3px; padding: 3px;
margin:0; border-radius: 4px;
} }
#more-info h2 { a:hover {
padding: 3px; background-color: rgba(255 255 255 / 30%);
margin: 0;
font-size: 1rem;
} }
#links ul li li a, .header-anchor {
#more-info ol li a { font-size: 0.8em;
padding-left:18px; text-decoration: none;
color: #adb5bd;
opacity: 0;
} }
h2:hover .header-anchor {
#more-info ol li a:hover, opacity: 1;
#more-info ol li a.active {
background-color:rgba(0,0,0,0.1);
} }
aside { table {
position: absolute; width: 100%;
top: 1px;
right: -264px;
height: 100%;
} }
#more-info { table td, table th {
position: sticky; background-color: var(--background-color-alt);
top:12px; padding: 4px 12px;
border-left: 3px solid #e03131; border: 1px solid var(--background-color);
padding: 6px;
} }
#more-info { table th:first-child {
min-width: 240px; border-top-left-radius: 8px;
width: 240px; }
table th:last-child {
border-top-right-radius: 8px;
} }
footer { footer {
text-align:right; margin-top: 1rem;
margin: auto; text-align: right;
width: 800px;
} }
iframe { footer a {
border: none; display: inline-block;
line-height: 0;
} }