Skip to content

Commit

Permalink
feat: add span rules to avoid user overriden by simply span selecto…
Browse files Browse the repository at this point in the history
…r. (#575)
  • Loading branch information
Myriad-Dreamin authored Aug 10, 2024
1 parent 507d4e1 commit 5cc1c42
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions github-pages/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ body {
}

.typst-html-semantics span {
color: transparent;
font-family: monospace;
transform-origin: left top;
position: absolute;
display: inline-block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
}

:host ::ng-deep .typst-html-semantics span {
color: transparent;
font-family: monospace;
transform-origin: left top;
position: absolute;
display: inline-block;
Expand Down
2 changes: 2 additions & 0 deletions packages/typst.react/src/lib/TypstDocument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const htmlLayerCss = `
}
.typst-html-semantics span {
color: transparent;
font-family: monospace;
transform-origin: left top;
position: absolute;
display: inline-block;
Expand Down
2 changes: 2 additions & 0 deletions packages/typst.ts/examples/typst.ts.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ body {
}

.typst-html-semantics span {
color: transparent;
font-family: monospace;
transform-origin: left top;
position: absolute;
display: inline-block;
Expand Down
2 changes: 2 additions & 0 deletions packages/typst.ts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
}

.typst-html-semantics span {
color: transparent;
font-family: monospace;
transform-origin: left top;
position: absolute;
display: inline-block;
Expand Down
4 changes: 3 additions & 1 deletion projects/hexo-renderer-typst/lib/typst.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
}

.typst-html-semantics span {
color: transparent;
font-family: monospace;
transform-origin: left top;
position: absolute;
display: inline-block;
Expand Down Expand Up @@ -66,7 +68,7 @@

.typst-html-semantics span::-moz-selection {
color: transparent;
background: #7db9dea0;
background: #7db9de;
}

.typst-html-semantics span::selection {
Expand Down

0 comments on commit 5cc1c42

Please sign in to comment.