-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework style (again) #377
Rework style (again) #377
Conversation
fenjalien
commented
Dec 5, 2023
- Reworks styling to work in a kind of simpler way.
- Fixes wrong styling in an example in the manual
- Added detailed description of how styling works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small things only.
The changed arc
test image does not match the output. Current reference images are still Typst 0.9.0.
@@ -665,17 +666,21 @@ | |||
(calc.max(from.at(0), to.at(0)), calc.max(from.at(1), to.at(1))) | |||
) | |||
|
|||
let style = styles.resolve(ctx.style, style) | |||
if help-lines { | |||
let style = styles.resolve(ctx.style, merge: style, root: "grid", base: ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not having this in the default style dictionary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't really matter where the default of an element's style is. Really styles.default
can just have stroke, fill, radius, padding, shorten and mark keys in it. Then use base
for each element and it'll work just the same...