hackertours-theme/assets/sass/_zen.scss
2023-03-02 08:19:28 +01:00

271 lines
3.6 KiB
SCSS

// Zen custom styles
// Page
body {
background-color: var(--color-backdrop);
}
.page {
background-color: var(--color-body-bg);
}
.header {
padding-top: var(--gutters);
}
.footer {
@include margin-top(1.5);
@include padding(.3);
text-align: center;
border-top: 2px solid var(--color-brand);
p {
margin: 0;
}
}
// Apply smaller text to blocks, footer etc.
th,
label,
legend,
figcaption {
font-size: var(--fs-s);
}
.language-selector,
.footer {
font-size: var(--fs-xs);
}
// Apply heading font stack and colour to labels etc.
th,
nav,
label,
legend,
.header,
.footer {
color: var(--color-headings);
font-family: var(--ff-headings);
}
th,
label {
font-weight: var(--fw-headings);
}
// Article and content.
article > .content,
aside {
ul {
@extend %ul-straight-left;
}
ol {
@extend %ol-straight-left;
}
}
article {
.submitted,
.tags {
@include respond-to(s) {
display: inline-block;
padding-right: 1rem;
}
}
.tags {
ul {
margin: 0;
}
}
code {
font-size: var(--fs-xs);
overflow-wrap: break-word;
}
pre {
border-radius: var(--radius-s);
padding: 5px;
border: 1px solid var(--color-border-light);
background-color: var(--color-text-bg);
overflow: auto;
max-height: 300px;
max-width: 90vw;
&.chroma {
max-height: initial;
overflow-x: scroll;
}
& > code {
display: inline-block;
white-space: pre;
}
}
}
.title-submitted {
margin-bottom: .2rem;
}
.content-dates {
text-align: right;
}
// Figure and image.
figure,
img {
&.image {
@include respond-to(s) {
&.center {
margin-inline: auto;
}
&.left {
@include padding(0 .5 .5 0);
margin: 0;
float: left;
clear: both;
}
&.right {
@include padding(0 0 .5 .5);
margin: 0;
float: right;
clear: both;
}
}
}
}
figure {
&.image {
figcaption {
@include respond-to(s) {
display: table-caption;
caption-side: bottom;
}
p {
margin: 0;
}
}
@include respond-to(s) {
display: table;
img {
display: block;
}
&.left {
figcaption {
@include padding(0 .5 .5 0);
}
}
&.right {
figcaption {
@include padding(0 0 .5 .5);
}
}
}
}
&.podcast {
audio {
width: 95%;
}
}
}
// Navigation
.main-menu {
@include margin-top(.5);
outline: 0;
li {
@include margin-bottom(.5);
padding: 0;
}
a {
display: block;
background-color: var(--color-brand);
color: var(--color-text-bg);
padding: 2px 8px;
text-decoration: none;
&:hover,
&:focus {
background-color: var(--color-brand-dark);
}
&:active,
&.active {
background-color: var(--color-brand);
text-decoration: underline;
}
}
}
.menu a.active {
text-decoration: none;
}
// Search
.search-input {
@include margin-block(1);
}
.search-text {
font-size: var(--fs-l);
max-width: 80%;
}
// Form
.content {
label:has(+ :required) {
&::after {
content: '*';
color: var(--color-mark-highlight);
}
}
input,
textarea {
@include margin-bottom(.75);
width: 92%;
&:not(:placeholder-shown):valid {
background-color: var(--color-status-bg);
}
&:not(:placeholder-shown):invalid {
background-color: var(--color-error-bg);
}
}
}
.js-submitted {
input,
textarea {
&:valid {
background-color: var(--color-status-bg);
}
&:invalid {
background-color: var(--color-error-bg);
}
}
}