Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert a couple of Sass stylesheets to vanilla CSS #929

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions src/_scss/components/nav.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Styles for the "nav" component.
*
* This is the global header shown at the top of every page, with my name
* and a list of links to the main site sections.
*/

nav {
padding-top: calc(1px + env(safe-area-inset-top));
padding-bottom: 1px;

/* The nav gets the primary accent colour as background, with white text.
*
* It looks the same in light/dark mode.
*
* TODO: Should I have light/dark mode for the nav?
*/
background: var(--nav-background-url) var(--primary-color-light);
background-size: auto 100%;
}

nav h1 {
margin-bottom: -5px;
font-size: 1.7em;
}

nav h1 a {
text-decoration: none;
}

nav ul {
margin-bottom: 14px;
}

nav, nav a, nav a:visited {
color: white;
}

/* Add an extra thick underline so you know which part of the site
* you're in. */
nav a[selected] {
text-decoration-thickness: 4px;
text-decoration-skip-ink: none;
}

@media print {
nav {
background: none;
border-bottom: var(--border-width) solid var(--primary-color-light);
}

nav, nav a, nav a:visited {
color: var(--primary-color-light);
}
}
44 changes: 0 additions & 44 deletions src/_scss/components/nav.scss

This file was deleted.

9 changes: 9 additions & 0 deletions src/_scss/components/til.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Styles for "Today I Learned (TIL)" pages.
*
* These are pretty similar to article pages so there isn't much different.
*/

article.til {
p.summary { font-weight: bold; }
}
23 changes: 0 additions & 23 deletions src/_scss/components/til.scss

This file was deleted.

4 changes: 2 additions & 2 deletions src/static/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
@import "components/code";
@import "components/footer";
@import "components/latex";
@import "components/nav.scss";
@import "components/nav";
@import "components/pretty_hr.scss";
@import "components/skip_to_main";
@import "components/slides";
@import "components/syntax_highlighting.scss";
@import "components/tags";
@import "components/til.scss";
@import "components/til";

$primary-color-light: #d01c11;
$primary-color-dark: #ff4242;
Expand Down