my_blog/public/css/styles.css

215 lines
3.6 KiB
CSS
Executable File

.default-font {
font-size: 110%;
}
.monospace-font {
font-family: monospace;
font-size: 125%;
}
.dark-theme {
--background-color: #111;
--border-color: #222;
--text-color: #fb5;
--header-color: #ccc;
--link-color: #f70;
--link-hover-color: #f20;
--menu-hover-color: #222;
--post-card-background: #333;
}
.classic-theme {
--background-color: #fff;
--border-color: #222;
--text-color: #000;
--header-color: #000;
--link-color: #00f;
--link-hover-color: #00f;
--menu-hover-color: #bbb;
--post-card-background: #bbb;
}
body {
background-color: var(--background-color);
color: var(--text-color);
display: block;
}
@media screen and (min-width: 800px) {
body {
width: 800px;
}
}
@media screen and (min-width: 1000px) {
body {
margin: auto;
display: grid;
width: 1000px;
grid-template-columns: auto 1000px auto;
grid-template-areas:
'header header header'
'. accessibility .'
'. main .'
'footer footer footer';
}
body > form {
grid-area: accessibility;
width: max-content;
min-width: min-content;
justify-self: center;
}
body > header {
grid-area: header;
}
body > footer {
grid-area: footer;
}
main {
grid-area: main;
margin: auto;
display: grid;
width: 100%;
grid-gap: 5px;
grid-template-columns: auto 1fr;
grid-template-areas: 'main-aside main-content';
}
#main-content {
grid-area: main-content;
min-width: min-content;
width: 100%;
}
main > aside {
grid-area: main-aside;
position: sticky;
top: 0;
height: min-content;
max-width: 380px;
}
}
h1, h2, h3, h4, h5, h6 {
color: var(--header-color);
}
.link-list > li, .link-list > li > a, .link-padding {
padding: 10px 10px 10px 10px;
}
body > header {
text-align: center;
}
body > header > nav > ul > li {
display: inline-block;
}
body > header > nav > ul > li > a {
padding: 20px 20px 20px 20px;
}
body > header > nav > ul > li > a:hover {
background-color: var(--menu-hover-color);
border-radius: 8px;
}
body > footer {
margin: 20px 0px 200px 0px;
text-align: center;
}
body > form {
margin-left: auto;
margin-right: auto;
max-width: 90%;
}
body > form > fieldset {
display: grid;
width: max-content;
max-width: 90%;
grid-template-columns: auto 1fr;
grid-gap: 10px;
grid-template-areas:
'describe describe'
'color-label color-select'
'fonts-label fonts-select'
'apply apply'
}
body > form > fieldset > p {
grid-area: describe;
}
#color-theme-label {
grid-area: color-label;
text-align: left;
}
#color-theme {
grid-area: color-select;
}
#fonts-label {
grid-area: fonts-label;
text-align: left;
}
#fonts {
grid-area: fonts-select;
}
body > form > fieldset > input {
grid-area: apply;
width: max-content;
min-width: min-content;
justify-self: center;
}
main > aside > nav > ul {
padding-left: 15px;
}
.post-card {
display: grid;
padding: 5px 5px 5px 5px;
background-color: var(--post-card-background);
border-radius: 5px;
grid-template-columns: auto;
grid-template-areas:
'post-card-title'
'post-card-published'
'post-card-modified'
'post-card-content';
}
.post-card-title {
grid-area: post-card-title;
}
.post-card-published {
grid-area: post-card-published;
}.post-card-modified {
grid-area: post-card-modified;
}.post-card-content {
grid-area: post-card-content;
}
a {
color: var(--link-color);
font-weight: bold;
}
a:hover {
color: var(--link-hover-color);
}
img {
max-width: 100%;
}
.icon {
background-color: #aaa;
padding: 5px;
width: 64px;
height: 64px;
}
pre {
background-color: var(--border-color);
color: var(--header-color);
max-width: min-content;
padding: 20px;
border-radius: 5px;
}