Skip to content
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

Prefer named sink args to prevent overriding defaults set with show rule #8

Open
jamesrswift opened this issue Jun 20, 2024 · 1 comment

Comments

@jamesrswift
Copy link

jamesrswift commented Jun 20, 2024

subpar/src/lib.typ

Lines 114 to 115 in cac5e07

placement: placement,
gap: gap,

By defining these to have a default value through the function signature, and passing them directly to figure, any values set through set/show rules are overridden. Taking sink arguments and destructuring named arguments into the parent figure should suitably retain control without applying defaults.

@tingerrr
Copy link
Owner

Hmm, I guess this makes sense to some degree. I initially went this route to ensure I can easily replicate the exact API of figure, from the allowed arguments to the type validation.

I'll probably change it then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants