maud
maud copied to clipboard
It is awkward to use classes containing numbers
Notably Bootstrap has alot of classes like mx-4, px-3, gy-2.
Hi @JohnDowson, thanks for the suggestion and PR!
My primary concern with this (and the reason why numbers weren't permitted originally) is that in Rust proper, 0000069 and 69 are considered to be the same number. But if we allow your proposal, then Maud will introduce a distinction between the two. I'm unsure what implications this might have.
In particular:
- Does Rust itself guarantee that number literal tokens are passed through unchanged to proc macros? (So that the token
0000069is not normalized to69or anything else.) - What about other tools, like IDEs or code formatters?
- Finally, from a user's point of view, would they be confused by this?
Also, consider that there is already an alternative syntax (."mx-4"). See #267.
For me this is more of a documentation issue than a matter of usability. However since I hit this problem myself and found this issue to resolve it, the documentation was updated and explains how to use the "alternative syntax" in order to use numbers in class names. From my point of view the docs are fine now and there is no need to spend (probably) a lot of time to evaluate the implications mentioned above.