Closed sparr closed 7 years ago
I chose x=
instead of *=
because *
has meaning in yaml and would require values to be quoted.
Yeah we can do this. The x=
is a little unintuitive for me. Does it work to put quotes around it?
x: "*= 5"
Any chance I could get a unit test too? Add some to: https://github.com/andymeneely/squib/blob/master/spec/layout_parser_spec.rb and you can modify this test file (or make your own in this folder) https://github.com/andymeneely/squib/blob/master/spec/data/layouts/extends-units-mixed.yml
x=
felt unintuitive for me, too. quotes around *=
will work, but then it will be the only one of the four that requires quotes. I guess that's a reasonable price to pay for otherwise intuitiveness.
will follow up with adjusted syntax and docs and unit test momentarily.
Yeah I can't decide which is worse. The error message you get when forgetting the quotes is cryptic too and I'll bet we'll get questions about it. Let me think about it for a day or so and we'll decide.
THANK YOU!! Are you on BoardGameGeek? I can give you GeekGold for a microbadge.
I am on BGG, and just made a more complicated question as a comment to the squib thread there, along with an easier(?) question on stackexchange.
Maybe support both x= and *=? that has its own problems, too.
@andymeneely ping regarding deciding between x= or *= or both or something else
This allows inherited values to be multiplied or divided, which is a feature I want for relative font sizes.
Also snuck in a couple of fixes for what look like copy/paste mistakes in the doc examples for +=