fix: style and type issues with feature enhancements

- Fix presetTheme type assertion issue
- Fix content height dvh problem on large screens
- Fix tables and KaTex math formulas overflowing containers on mobile
- Update 404 page
- Update README documentation
- Increase link underline offset
- Add line number display to code blocks
- Improve scrollbar styles for TOC and code blocks
This commit is contained in:
radishzzz 2025-04-09 18:46:27 +01:00
parent b492e5c262
commit 05b902bc61
9 changed files with 264 additions and 247 deletions

View file

@ -19,7 +19,7 @@
/* Links */
.heti :where(a) {
--at-apply: 'underline decoration-secondary/40 underline-0.075em underline-offset-0.08em lg:underline-0.1em';
--at-apply: 'underline decoration-secondary/40 underline-0.075em underline-offset-0.18em lg:underline-0.1em';
--at-apply: 'font-medium transition-colors tracking-0 hover:(c-primary decoration-secondary/80) ';
}
@ -103,6 +103,16 @@ html.dark .heti pre :where(span) {
/* Inline Code */
.heti :where(code) {
--at-apply: 'p-0.5 bg-secondary/5 rounded text-0.85em border border-solid border-secondary/5';
counter-reset: line;
}
.heti :where(code) span.line {
--at-apply: 'relative pl-8';
}
.heti :where(code) span.line::before {
--at-apply: 'text-secondary/35 w-4 absolute left-0 leading-1.95em align-bottom';
content: counter(line);
counter-increment: line;
direction: rtl;
}
/* Horizontal Rules */
@ -148,8 +158,10 @@ html.dark .heti pre :where(span) {
/* Tables */
.heti :where(table) {
--at-apply: 'box-border table-fixed mt-3 mb-6 rounded-md break-words';
--at-apply: 'border border-solid border-secondary/25 border-collapse';
--at-apply: 'block box-border table-fixed w-full max-w-full mt-3 mb-6 overflow-x-auto break-words scrollbar-hidden';
}
.heti :where(table)::-webkit-scrollbar {
display: none;
}
.heti :where(th),
.heti :where(td) {
@ -282,6 +294,14 @@ html.dark .heti :where(u) {
--at-apply: 'text-center text-sm mt-3 text-secondary/75';
}
/* KaTeX Mathematical */
.heti :where(.katex-display) {
--at-apply: 'block max-w-full overflow-x-auto overflow-y-hidden scrollbar-hidden';
}
.heti :where(.katex-display)::-webkit-scrollbar {
display: none;
}
/* Markdown Extensions Style >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> */
.heti :where(details) {
--at-apply: 'my-4 px-4 py-3 border border-solid border-secondary/25 rounded cursor-pointer';