1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-06-28 08:37:57 +02:00
blog/src/styles/global.css

352 lines
5.1 KiB
CSS
Raw Normal View History

2022-11-08 23:47:01 +01:00
@import url('_variables.css');
2021-03-04 01:20:39 +01:00
*,
*::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);
2022-02-12 14:30:57 +01:00
text-rendering: optimizelegibility;
2021-03-04 01:20:39 +01:00
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 {
2021-03-04 22:53:35 +01:00
margin: 0 0 calc(var(--spacer) / var(--line-height));
2021-03-04 01:20:39 +01:00
}
/* Reset fonts for relevant elements
///////////////////////////////////// */
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
/* Reset default button element */
button {
2023-10-28 19:01:36 +02:00
all: unset;
2021-03-04 01:20:39 +01:00
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
2021-11-28 17:48:05 +01:00
appearance: none;
2021-03-04 01:20:39 +01:00
outline: 0;
}
button:active {
transition: none;
text-shadow: none;
}
/* Links
///////////////////////////////////// */
a {
2023-11-05 12:44:56 +01:00
color: var(--link-color);
2021-03-04 01:20:39 +01:00
text-decoration: none;
transition: 0.2s ease-out;
}
a:hover,
a:focus {
2023-11-05 12:44:56 +01:00
color: var(--link-color-hover);
2021-03-04 01:20:39 +01:00
text-decoration: underline;
2023-11-05 12:44:56 +01:00
text-decoration-color: var(--link-color);
2021-03-04 01:20:39 +01:00
}
/* 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;
}
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 03:16:53 +02:00
h1,
h2,
h3 {
margin: var(--spacer) 0;
}
h4,
h5,
h6 {
margin: calc(var(--spacer) / 2) 0;
}
2021-03-04 22:53:35 +01:00
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;
}
2021-03-04 01:20:39 +01:00
/* 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;
2021-03-21 22:49:39 +01:00
margin-bottom: calc(var(--spacer) / 2);
}
ul ul li {
2021-03-04 22:53:35 +01:00
margin-bottom: calc(var(--spacer) / 8);
2021-03-04 01:20:39 +01:00
}
li::before {
position: absolute;
left: -2rem;
top: -1px;
color: var(--text-color-light);
user-select: none;
}
li p {
2021-03-21 22:49:39 +01:00
margin-bottom: calc(var(--spacer) / 4);
2021-03-04 01:20:39 +01:00
}
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;
2023-11-05 17:40:44 +01:00
text-decoration-color: var(--text-color-dimmed);
text-underline-offset: 0.15em;
2021-03-04 01:20:39 +01:00
font-style: normal;
font-size: inherit;
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;
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 03:16:53 +02:00
color: var(--text-color);
2021-03-04 01:20:39 +01:00
}
blockquote {
margin: 0 0 var(--spacer);
position: relative;
padding-left: calc(var(--spacer) * 1.25);
}
/* quotation marks */
blockquote::before {
content: '“';
font-size: 300%;
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 03:16:53 +02:00
color: var(--text-color-light);
2021-03-04 01:20:39 +01:00
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;
}
th,
td {
padding: calc(var(--spacer) / 2);
word-wrap: normal;
word-break: normal;
overflow-wrap: normal;
border-bottom: 1px solid var(--border-color);
}
2023-11-02 22:47:14 +01:00
tr:last-child td {
border-bottom: none;
}
2021-03-04 01:20:39 +01:00
/* Selection
///////////////////////////////////// */
2021-11-28 17:48:05 +01:00
/* stylelint-disable selector-no-vendor-prefix */
2021-03-04 01:20:39 +01:00
::-moz-selection {
background: #2e4f5c;
color: #fff;
}
::selection {
background: #2e4f5c;
color: #fff;
}
2021-11-28 17:48:05 +01:00
/* stylelint-enable selector-no-vendor-prefix */