Skip to content

Commit

Permalink
Overhaul CSS from first principles
Browse files Browse the repository at this point in the history
- empty elements get pruned by the minifier
- add CSS reset for improved sanity
- switch links to require opt-in .subtle instead of opt-out .default
  • Loading branch information
scheibo committed Nov 9, 2023
1 parent 3444aa5 commit 572047c
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 202 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
"extends": [
"stylelint-config-standard",
"stylelint-config-clean-order"
]
],
"rules": {
"rule-empty-line-before": null
}
}
}
9 changes: 4 additions & 5 deletions src/static/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ const make = (name: string, page: Page) => {
write(path.join(PUBLIC, name, 'index.html'), render(name, page));
};

export const topbar =
'<div class="topbar">Under Construction: planned completion date January 2024</div>';
export const topbar = 'Under Construction: planned completion date January 2024';

interface AstNode {attributes?: {[key: string]: string}}

Expand Down Expand Up @@ -230,7 +229,7 @@ const build = async (rebuild?: boolean) => {
path: `/${page}/`,
topbar,
title: `${title} | pkmn.ai`,
header: `<h2>${title}</h2>`,
header: title,
content: `${toHTML(path.join(STATIC, `${page}.dj`))}`,
edit: `${EDIT}/static/${page}.dj`,
});
Expand All @@ -240,7 +239,7 @@ const build = async (rebuild?: boolean) => {
path: '/concepts/',
title: 'Concepts | pkmn.ai',
topbar,
header: '<h2>Concepts</h2>',
header: 'Concepts',
content: `${toHTML(path.join(STATIC, 'concepts', 'index.dj'))}`,
edit: `${EDIT}/static/concepts/index.dj`,
});
Expand All @@ -261,7 +260,7 @@ const build = async (rebuild?: boolean) => {
path: `/concepts/${page}/`,
title: `Concepts — ${title} | pkmn.ai`,
topbar,
header: `<h2>${title}</h2>`,
header: title,
content: toHTML(path.join(STATIC, 'concepts', `${page}.dj`)),
edit: `${EDIT}/static/concepts/${page}.dj`,
});
Expand Down
Loading

0 comments on commit 572047c

Please sign in to comment.