mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 03:32:51 +02:00
303 lines
6.7 KiB
CSS
303 lines
6.7 KiB
CSS
/*!
|
|
* Project: Heti
|
|
* URL: https://github.com/sivan/heti
|
|
* Author: Sivan [sun.sivan@gmail.com]
|
|
*/
|
|
|
|
/* Global Styles */
|
|
.heti {
|
|
--at-apply: 'leading-1.55em break-words hyphens-auto tracking-0.02em';
|
|
}
|
|
.heti:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) {
|
|
--at-apply: 'leading-1.5em tracking-0';
|
|
}
|
|
|
|
/* Article Title */
|
|
.heti .post-title {
|
|
--at-apply: 'c-primary mb-2 font-bold text-9 leading-12 text-balance mbs-0';
|
|
}
|
|
|
|
/* Links */
|
|
.heti :where(a) {
|
|
--at-apply: 'underline decoration-secondary/40 underline-0.075em underline-offset-0.2em lg:underline-0.1em';
|
|
--at-apply: 'font-medium transition-colors tracking-0 hover:(c-primary decoration-secondary/80) ';
|
|
}
|
|
|
|
/* Paragraphs */
|
|
.heti :where(p) {
|
|
--at-apply: 'mt-3 mb-4 text-justify';
|
|
}
|
|
.heti :where(p:not(:lang(zh)):not(:lang(ja)):not(:lang(ko))) {
|
|
--at-apply: 'text-start';
|
|
}
|
|
|
|
/* Headings */
|
|
.heti :where(h1),
|
|
.heti :where(h2),
|
|
.heti :where(h3),
|
|
.heti :where(h4),
|
|
.heti :where(h5),
|
|
.heti :where(h6) {
|
|
--at-apply: 'mt-6 mb-3 font-semibold';
|
|
}
|
|
.heti :where(h1) {
|
|
--at-apply: 'text-8 leading-12';
|
|
}
|
|
.heti :where(h2) {
|
|
--at-apply: 'text-6 leading-9';
|
|
}
|
|
.heti :where(h3) {
|
|
--at-apply: 'text-5 leading-9';
|
|
}
|
|
.heti :where(h4) {
|
|
--at-apply: 'text-4.5 leading-6';
|
|
}
|
|
.heti :where(h5) {
|
|
--at-apply: 'text-4 leading-6';
|
|
}
|
|
.heti :where(h6) {
|
|
--at-apply: 'text-3.5 leading-6';
|
|
}
|
|
.heti :where(h1),
|
|
.heti :where(h2),
|
|
.heti :where(h3) {
|
|
--at-apply: 'tracking-0.05em';
|
|
}
|
|
.heti :where(h1:not(:lang(zh)):not(:lang(ja)):not(:lang(ko))),
|
|
.heti :where(h2:not(:lang(zh)):not(:lang(ja)):not(:lang(ko))),
|
|
.heti :where(h3:not(:lang(zh)):not(:lang(ja)):not(:lang(ko))) {
|
|
--at-apply: 'tracking-0';
|
|
}
|
|
.heti :where(h1 + h2),
|
|
.heti :where(h2 + h3),
|
|
.heti :where(h3 + h4),
|
|
.heti :where(h4 + h5),
|
|
.heti :where(h5 + h6) {
|
|
--at-apply: 'mt-3';
|
|
}
|
|
|
|
/* Blockquotes */
|
|
.heti :where(blockquote) {
|
|
--at-apply: 'mt-3 mb-6 px-4 py-3 rounded';
|
|
--at-apply: 'border-l-4 border-solid border-secondary/25 bg-secondary/5';
|
|
}
|
|
.heti blockquote :where(blockquote) {
|
|
--at-apply: 'my-3';
|
|
}
|
|
.heti blockquote :where(p) {
|
|
--at-apply: 'my-2';
|
|
}
|
|
|
|
/* Code Blocks */
|
|
.heti :where(pre) {
|
|
--at-apply: 'mt-3 mb-4 px-4 py-3 rounded bg-secondary/5! border border-solid border-secondary/5';
|
|
--at-apply: 'overflow-auto whitespace-pre';
|
|
}
|
|
.heti pre :where(code) {
|
|
--at-apply: 'p-0 bg-secondary/0 tracking-0 border-none';
|
|
}
|
|
html.dark .heti pre :where(span) {
|
|
--at-apply: 'text-[var(--shiki-dark)]!';
|
|
}
|
|
|
|
/* Inline Code */
|
|
.heti :where(code) {
|
|
--at-apply: 'p-0.5 bg-secondary/5 rounded text-0.85em border border-solid border-secondary/5';
|
|
}
|
|
|
|
/* Horizontal Rules */
|
|
.heti :where(hr) {
|
|
--at-apply: 'border-secondary/25';
|
|
}
|
|
|
|
/* Lists */
|
|
.heti :where(ul),
|
|
.heti :where(ol),
|
|
.heti :where(dl) {
|
|
--at-apply: 'mt-3 mb-6';
|
|
}
|
|
.heti :where(ul),
|
|
.heti :where(ol) {
|
|
--at-apply: 'pl-8';
|
|
}
|
|
.heti ul :where(ul),
|
|
.heti ul :where(ol),
|
|
.heti ol :where(ul),
|
|
.heti ol :where(ol) {
|
|
--at-apply: 'my-0';
|
|
}
|
|
.heti :where(ul) {
|
|
--at-apply: 'list-disc';
|
|
}
|
|
.heti :where(ol) {
|
|
--at-apply: 'list-decimal';
|
|
}
|
|
.heti ul :where(ul),
|
|
.heti ol :where(ul) {
|
|
--at-apply: 'list-circle';
|
|
}
|
|
.heti ul ul :where(ul),
|
|
.heti ul ol :where(ul),
|
|
.heti ol ul :where(ul),
|
|
.heti ol ol :where(ul) {
|
|
--at-apply: 'list-square';
|
|
}
|
|
.heti :where(li) {
|
|
--at-apply: 'list-unset';
|
|
}
|
|
|
|
/* 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';
|
|
}
|
|
.heti :where(th),
|
|
.heti :where(td) {
|
|
--at-apply: 'px-3 py-1.5 border border-solid border-secondary/40';
|
|
}
|
|
|
|
/* Abbreviations */
|
|
.heti :where(abbr) {
|
|
--at-apply: 'tracking-0';
|
|
}
|
|
.heti :where(abbr[title]) {
|
|
--at-apply: 'mx-0.25 pb-0.25 border-dotted border-secondary border-b-1 no-underline cursor-help';
|
|
}
|
|
|
|
/* Superscript and Subscript */
|
|
.heti :where(sub),
|
|
.heti :where(sup) {
|
|
--at-apply: 'mx-0.15em relative text-0.75em leading-1 align-baseline';
|
|
}
|
|
.heti :where(sub) {
|
|
--at-apply: 'bottom--0.25em';
|
|
}
|
|
.heti :where(sup) {
|
|
--at-apply: 'top--0.5em';
|
|
}
|
|
.heti sub :where(a),
|
|
.heti sup :where(a) {
|
|
--at-apply: 'no-underline';
|
|
}
|
|
.heti sup:target,
|
|
.heti sup a:target {
|
|
--at-apply: 'bg-#ff0';
|
|
}
|
|
html.dark .heti sup:target,
|
|
html.dark .heti sup a:target {
|
|
--at-apply: 'bg-#4d4a00e0';
|
|
}
|
|
|
|
/* Keyboard Input */
|
|
.heti :where(kbd) {
|
|
--at-apply: 'rounded border border-solid border-secondary/40 text-secondary';
|
|
--at-apply: 'inline-block text-0.85em font-bold leading-none px-1 py-0.75 whitespace-nowrap';
|
|
}
|
|
|
|
/* Highlighted Text */
|
|
.heti :where(mark) {
|
|
--at-apply: 'mx-0.25 px-0.25 py-0.5 text-inherit bg-#ff0';
|
|
}
|
|
html.dark .heti :where(mark) {
|
|
--at-apply: 'bg-#4d4a00e0';
|
|
}
|
|
|
|
/* Footnotes */
|
|
.footnotes > h2,
|
|
.footnotes > h3 {
|
|
display: none;
|
|
}
|
|
.footnotes:lang(zh-CN)::before {
|
|
content: "脚注";
|
|
--at-apply: 'block text-5 font-semibold mt-6 mb-3';
|
|
}
|
|
.footnotes:lang(zh-TW)::before {
|
|
content: "腳註";
|
|
--at-apply: 'block text-5 font-semibold mt-6 mb-3';
|
|
}
|
|
.footnotes:lang(ja)::before {
|
|
content: "脚注";
|
|
--at-apply: 'block text-5 font-semibold mt-6 mb-3';
|
|
}
|
|
.footnotes:lang(en)::before {
|
|
content: "Footnotes";
|
|
--at-apply: 'block text-5 font-semibold mt-6 mb-3';
|
|
}
|
|
.footnotes:lang(es)::before {
|
|
content: "Notas al pie";
|
|
--at-apply: 'block text-5 font-semibold mt-6 mb-3';
|
|
}
|
|
.footnotes:lang(ru)::before {
|
|
content: "Сноски";
|
|
--at-apply: 'block text-5 font-semibold mt-6 mb-3';
|
|
}
|
|
.heti :where(.data-footnote-backref) {
|
|
--at-apply: 'no-underline';
|
|
}
|
|
|
|
/* Bold */
|
|
.heti :where(b),
|
|
.heti :where(strong) {
|
|
--at-apply: 'font-semibold';
|
|
}
|
|
|
|
/* Italic */
|
|
.heti :where(i) {
|
|
--at-apply: 'font-italic';
|
|
}
|
|
|
|
/* Emphasized */
|
|
.heti :where(em) {
|
|
--at-apply: 'italic';
|
|
}
|
|
|
|
/* Quotes */
|
|
.heti :where(q) {
|
|
quotes: "「" "」" "『" "』";
|
|
}
|
|
.heti :where(q:not(:lang(zh)):not(:lang(ja)):not(:lang(ko))) {
|
|
quotes: initial;
|
|
quotes: auto;
|
|
}
|
|
|
|
/* Wavy Underline */
|
|
.heti :where(u) {
|
|
--at-apply: 'mx-0.25 underline decoration-wavy decoration-red underline-offset-4';
|
|
}
|
|
html.dark .heti :where(u) {
|
|
--at-apply: 'decoration-#A14F50';
|
|
}
|
|
|
|
/* Strikethrough */
|
|
.heti :where(del),
|
|
.heti :where(s) {
|
|
--at-apply: 'mx-0.25';
|
|
}
|
|
|
|
/* Images */
|
|
.heti :where(figure) {
|
|
--at-apply: 'my-6';
|
|
}
|
|
.heti figure > :where(figcaption) {
|
|
--at-apply: 'text-center text-sm mt-3 text-secondary/75';
|
|
}
|
|
|
|
/* Markdown Extensions Style >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> */
|
|
.heti :where(details) {
|
|
--at-apply: 'my-4 px-4 py-3 border border-solid border-secondary/25 rounded cursor-pointer';
|
|
}
|
|
.heti details :where(summary) {
|
|
--at-apply: 'cursor-pointer';
|
|
}
|
|
.heti details[open] :where(summary) {
|
|
--at-apply: 'border-b border-solid border-secondary/25 mb-3 pb-3';
|
|
}
|
|
/* .heti details :where(summary) {
|
|
list-style: none;
|
|
}
|
|
.heti details summary::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
.heti details summary::marker {
|
|
content: '';
|
|
} */
|