chore: cleanup z-indices so that they're all clearly listed (#3855)
minor thing that was bugging me. we had a bunch of z-index vars that were "unregistered". this brings them back into a consistent place so we can see from a bird's eye view easily the stacking order of everything. also, a drive-by fix to not duplicate `--tl-text-outline` inside of `DefaultCanvas` ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [x] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know
This commit is contained in:
parent
cd96c35f72
commit
633a4e700d
3 changed files with 63 additions and 43 deletions
|
@ -69,11 +69,7 @@ export function DefaultCanvas({ className }: TLCanvasComponentProps) {
|
|||
const lodDisableTextOutline = z < editor.options.textShadowLod
|
||||
container.style.setProperty(
|
||||
'--tl-text-outline',
|
||||
lodDisableTextOutline
|
||||
? 'none'
|
||||
: `0 var(--b) 0 var(--color-background), 0 var(--a) 0 var(--color-background),
|
||||
var(--b) var(--b) 0 var(--color-background), var(--a) var(--b) 0 var(--color-background),
|
||||
var(--a) var(--a) 0 var(--color-background), var(--b) var(--a) 0 var(--color-background)`
|
||||
lodDisableTextOutline ? 'none' : `var(--tl-text-outline-reference)`
|
||||
)
|
||||
rMemoizedStuff.current.lodDisableTextOutline = lodDisableTextOutline
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue