Skip to content

Commit 5cc1c42

Browse files
feat: add span rules to avoid user overriden by simply span selector. (#575)
1 parent 507d4e1 commit 5cc1c42

File tree

6 files changed

+13
-1
lines changed

6 files changed

+13
-1
lines changed

github-pages/assets/style.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ body {
1717
}
1818

1919
.typst-html-semantics span {
20+
color: transparent;
21+
font-family: monospace;
2022
transform-origin: left top;
2123
position: absolute;
2224
display: inline-block;

packages/typst.angular/projects/typst.angular/src/lib/typst.document.component.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
}
88

99
:host ::ng-deep .typst-html-semantics span {
10+
color: transparent;
11+
font-family: monospace;
1012
transform-origin: left top;
1113
position: absolute;
1214
display: inline-block;

packages/typst.react/src/lib/TypstDocument.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const htmlLayerCss = `
1717
}
1818
1919
.typst-html-semantics span {
20+
color: transparent;
21+
font-family: monospace;
2022
transform-origin: left top;
2123
position: absolute;
2224
display: inline-block;

packages/typst.ts/examples/typst.ts.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ body {
2121
}
2222

2323
.typst-html-semantics span {
24+
color: transparent;
25+
font-family: monospace;
2426
transform-origin: left top;
2527
position: absolute;
2628
display: inline-block;

packages/typst.ts/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
}
5656

5757
.typst-html-semantics span {
58+
color: transparent;
59+
font-family: monospace;
5860
transform-origin: left top;
5961
position: absolute;
6062
display: inline-block;

projects/hexo-renderer-typst/lib/typst.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
}
4040

4141
.typst-html-semantics span {
42+
color: transparent;
43+
font-family: monospace;
4244
transform-origin: left top;
4345
position: absolute;
4446
display: inline-block;
@@ -66,7 +68,7 @@
6668

6769
.typst-html-semantics span::-moz-selection {
6870
color: transparent;
69-
background: #7db9dea0;
71+
background: #7db9de;
7072
}
7173

7274
.typst-html-semantics span::selection {

0 commit comments

Comments
 (0)