-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make html semantics layer works in react and angular
- Loading branch information
1 parent
445b59e
commit 6324c71
Showing
4 changed files
with
133 additions
and
3 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
packages/typst.angular/projects/typst.angular/src/lib/typst.document.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
:host ::ng-deep .typst-html-semantics { | ||
position: absolute; | ||
z-index: 2; | ||
color: transparent; | ||
font-family: monospace; | ||
white-space: pre; | ||
} | ||
|
||
:host ::ng-deep .typst-html-semantics span { | ||
transform-origin: left top; | ||
position: absolute; | ||
display: inline-block; | ||
left: 0; | ||
top: 0; | ||
} | ||
|
||
:host ::ng-deep .typst-content-hint { | ||
position: absolute; | ||
display: inline-block; | ||
width: 1px; | ||
height: 1px; | ||
overflow: hidden; | ||
} | ||
|
||
:host ::ng-deep .typst-html-semantics a { | ||
position: absolute; | ||
display: inline-block; | ||
} | ||
|
||
/* set transparent itself */ | ||
:host ::ng-deep .typst-content-group { | ||
pointer-events: visible; | ||
} | ||
|
||
:host ::ng-deep .typst-html-semantics span::-moz-selection { | ||
color: transparent; | ||
background: #7db9dea0; | ||
} | ||
|
||
:host ::ng-deep .typst-html-semantics span::selection { | ||
color: transparent; | ||
background: #7db9dea0; | ||
} | ||
|
||
:host ::ng-deep .typst-html-semantics *::-moz-selection { | ||
color: transparent; | ||
background: transparent; | ||
} | ||
|
||
:host ::ng-deep .typst-html-semantics *::selection { | ||
color: transparent; | ||
background: transparent; | ||
} | ||
|
||
:host ::ng-deep .typst-content-fallback { | ||
color: transparent; | ||
background: transparent; | ||
} | ||
|
||
:host ::ng-deep .pseudo-link, | ||
:host ::ng-deep .typst-text { | ||
pointer-events: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters