IssueRaiser

Resetting `show` and `set` to its default / Revoke rules

I think we need a way to reset [`show` rules](https://typst.app/docs/reference/styling/#show-rules) to their default. ```typst // introduce a custom style for all text objects #show text: box.with(stroke: .4pt + red, outset: (bottom: .3em, rest: .1em), radius: .1em) Some simple text. Some other text wrapped in a tight red box. // how do we turn it off?! #show text: it => it Ugh! ``` Similarly, after a [`set` rule](https://typst.app/docs/reference/styling/#set-rules) there is no simple way of "unsetting" it (reverting to the default), apart from explicitly writing the default or wrapping everything in a scope.

Posted by FedericoStra on Mar 29, 2023, 9:57 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments

github (SaaS)

Resetting `show` and `set` to its default / Revoke rules

FedericoStraMar 29, 2023, 9:57 AM

I think we need a way to reset [`show` rules](https://typst.app/docs/reference/styling/#show-rules) to their default. ```typst // introduce a custom style for all text objects #show text: box.with(stroke: .4pt + red, outset: (bottom: .3em, rest: .1em), radius: .1em) Some simple text. Some other text wrapped in a tight red box. // how do we turn it off?! #show text: it => it Ugh! ``` Similarly, after a [`set` rule](https://typst.app/docs/reference/styling/#set-rules) there is no simple way of "unsetting" it (reverting to the default), apart from explicitly writing the default or wrapping everything in a scope.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue