1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-07-01 06:02:08 +02:00
blog/src/styles/global.css
Matthias Kretschmann 299084de93
Gatsby → Astro (#829)
* basic astro setup, kick out all gatsby configs

* move content folder

* src/pages setup

* more file reorg

* more config updates

* more reorgs

* refactor

* refactor

* bump astro

* refactor

* svg icon build system, theme switch

* remark plugin for lead paragraph, more refactor

* make images work

* post meta

* custom Picture component

* Pagination, More component, 404 fixes

* linking fixes

* add table of contents

* post actions fixes

* tag fixes

* content changes

* content changes: move media files to their posts

* more content moving, remove media folder

* refactor remark-lead-paragraph

* link css file when defined in post frontmatter

* move content up again

* kbd post update

* allow js

* downloads solution

* add astro check

* redirect_from solution

* githubLink solution

* reorg

* exif solution as prebuild step

* exif solution on each post during build

* isolate lead paragraph extraction to articles

* restore Exif components

* deploy script update

* fix redirects

* xml & json feeds

* build fix

* fix exif readout in production

* head and seo tweaks, add feeds

* tweak image display

* archive pages with single layout

* restore tags archive

* sitemap setup

* restore thanks page functionality

* reorg

* cleanup

* parallel scripts during prebuild

* restore jest setup

* remove jest, switch to vitest as test runner

* adapt CI

* test refactor

* typescript tweaks

* avatar fixes

* typings

* restore search functionality

* theme switch with nanostores

* fixes

* test fixes

* restore changelog functionality

* umami script

* border color tweak

* related posts with fuse.js

* plawright e2e testing setup

* search tweaks

* simplify typekit loading

* photo fix

* e2e tests

* related posts fix

* fix tags archive

* tweaks

* tweaks

* linux snapshots

* fix header test

* new symlink tactic

* fix dev server in codespaces

* fix yaml

* ci fixes

* changelog loading tweaks

* e2e against dev server on ci

* changelog tweaks

* ci tweaks

* ci tweaks

* ci tweaks

* docs updates

* ci tweaks

* refactor photo creation script

* package updates

* refactor search

* ci tweak

* ci tweaks

* test tweaks, more unit tests

* more unit tests

* post creation script tweaks

* refactor new scripts, test them for real life

* more tests

* refactor

* codeclimate-action update

* uses update

* limit ci runs

* fix theme toggle, test it

* more tests

* favicon files cleanup

* icon components location change

* type checking through ci

* command fixes

* ci fix

* search tweaks

* ci tweaks

* revised favicons, write post draft about it

* drafts filtering fix

* lint fix, favicon fixes

* copy changes

* fix related search images

* content updates

* new codeblock styles, copy tweaks, fixes

* package updates

* typing fixes

* lint fix

* content updates

* restore link posts

* faster theme switching

* split up astro utils

* related posts fixes

* fix

* refactor

* fixes

* copy tweaks

* fixes

* picture tweaks

* image fixes

* feed fixes, adapt for json feed v1.1

* e2e test updates

* layout tweaks

* update snaphots

* migrate to createMarkdownProcessor

* ci cache tweaks

* activate more browsers for e2e testing

* switch to macos-13 images

* build caching tweaks

* markdown fix

* set image quality

* remove avif generation

* picture tweaks

* head fixes

* add og:image:alt

* create-icons test

* new post: Favicon Generation with Astro
2023-09-18 02:16:53 +01:00

345 lines
5.0 KiB
CSS

@import url('_variables.css');
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
}
html {
font-size: var(--font-size-root);
scroll-behavior: smooth;
}
body {
font-family: var(--font-family-base);
font-weight: var(--font-weight-base);
font-size: var(--font-size-base);
line-height: var(--line-height);
color: var(--text-color);
text-rendering: optimizelegibility;
font-feature-settings: 'liga', 'kern';
min-height: 100vh;
background: var(--body-background-color);
transition: 0.4s var(--easing);
position: relative;
/* handling long text, like URLs */
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
}
p,
ul,
ol {
margin: 0 0 calc(var(--spacer) / var(--line-height));
}
/* Reset fonts for relevant elements
///////////////////////////////////// */
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
/* Reset default button element */
button {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
appearance: none;
outline: 0;
}
button:active {
transition: none;
text-shadow: none;
}
/* Links
///////////////////////////////////// */
a {
color: var(--brand-cyan);
text-decoration: none;
transition: 0.2s ease-out;
}
a:hover,
a:focus {
text-decoration: underline;
}
/* Headings
///////////////////////////////////// */
h1 {
font-size: var(--font-size-h1);
}
h2 {
font-size: var(--font-size-h2);
}
h3 {
font-size: var(--font-size-h3);
}
h4 {
font-size: var(--font-size-h4);
}
h5 {
font-size: var(--font-size-h5);
}
h6 {
font-size: var(--font-size-h6);
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--font-family-headings);
line-height: var(--line-height-headings);
color: var(--color-headings);
font-weight: var(--font-weight-headings);
letter-spacing: -0.01em;
transition: color 0.2s ease-out;
}
h1,
h2,
h3 {
margin: var(--spacer) 0;
}
h4,
h5,
h6 {
margin: calc(var(--spacer) / 2) 0;
}
h1 .anchor.before,
h2 .anchor.before,
h3 .anchor.before,
h4 .anchor.before,
h5 .anchor.before,
h6 .anchor.before {
opacity: 0;
font-size: var(--font-size-h4);
bottom: 0;
top: 0.3em;
}
h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor,
h6:hover .anchor {
opacity: 1;
}
/* Responsive Media
///////////////////////////////////// */
figure,
img,
svg,
video,
audio,
embed,
canvas,
picture {
max-width: 100%;
height: auto;
margin: 0 auto;
display: block;
}
img {
vertical-align: middle;
}
figcaption {
font-size: var(--font-size-small);
color: var(--text-color-light);
font-style: italic;
text-align: center;
margin-top: calc(var(--spacer) / 4);
}
/* Lists
///////////////////////////////////// */
ul,
ol {
margin-top: 0;
margin-bottom: var(--spacer);
padding-left: var(--spacer);
list-style: none;
}
li {
position: relative;
margin-bottom: calc(var(--spacer) / 2);
}
ul ul li {
margin-bottom: calc(var(--spacer) / 8);
}
li::before {
position: absolute;
left: -2rem;
top: -1px;
color: var(--text-color-light);
user-select: none;
}
li p {
margin-bottom: calc(var(--spacer) / 4);
}
ul li::before {
/* horizontal bar: ― ― */
content: ' \2015';
}
ol {
counter-reset: ol-counter;
}
ol li::before {
content: counter(ol-counter) '.';
counter-increment: ol-counter;
}
ol ul li::before {
display: none;
}
/* Inline typography
///////////////////////////////////// */
b,
strong,
.bold {
font-weight: var(--font-weight-bold);
font-style: normal;
}
em,
.italic {
font-style: italic;
}
abbr[title],
dfn {
text-transform: none;
font-style: normal;
font-size: inherit;
border-bottom: 1px dashed var(--brand-grey-dimmed);
cursor: help;
font-feature-settings: inherit;
}
mark {
background: #fffaab;
color: var(--text-color);
}
hr {
margin: 0;
border: 0;
}
/* Quotes
///////////////////////////////////// */
q {
font-style: italic;
}
cite {
font-style: normal;
text-transform: uppercase;
}
blockquote,
blockquote > p {
font-style: italic;
color: var(--text-color);
}
blockquote {
margin: 0 0 var(--spacer);
position: relative;
padding-left: calc(var(--spacer) * 1.25);
}
/* quotation marks */
blockquote::before {
content: '“';
font-size: 300%;
color: var(--text-color-light);
position: absolute;
left: -10px;
top: -20px;
}
table {
border-spacing: 0;
border-collapse: collapse;
display: block;
width: 100%;
overflow: auto;
margin-bottom: var(--spacer);
}
th {
text-align: left;
border-top: 1px solid var(--border-color);
}
th,
td {
padding: calc(var(--spacer) / 2);
word-wrap: normal;
word-break: normal;
overflow-wrap: normal;
border-bottom: 1px solid var(--border-color);
}
/* Selection
///////////////////////////////////// */
/* stylelint-disable selector-no-vendor-prefix */
::-moz-selection {
background: #2e4f5c;
color: #fff;
}
::selection {
background: #2e4f5c;
color: #fff;
}
/* stylelint-enable selector-no-vendor-prefix */