Commit 5d57840
src/contents/_lib/components/frame.typ
@@ -3,10 +3,11 @@
/// Same to `#html.frame`, but it will return content if the target is not html.
///
/// - content (content):
+/// - invert-color (bool): Whether to invert color in web dark mode.
/// -> content
-#let frame(content) = context {
+#let frame(content, invert-color: true) = context {
if target() == "html" {
- return html.frame(content)
+ return html.div(html.frame(content), class: if invert-color { "tybios-frame-invert" } else { "tybios-frame" })
}
return content
}
src/styles/article/index.css
@@ -51,7 +51,7 @@ article {
@apply text-base lg:text-lg;
@apply max-w-full md:max-w-2/3;
- img.typst-frame {
+ div.tybios-frame-invert > img.typst-frame {
@variant dark {
filter: invert(88%) hue-rotate(180deg);
}