- From: Lea Verou <lea@verou.me>
- Date: Mon, 22 Feb 2016 03:09:59 -0500
- To: www-style list <www-style@w3.org>
- Message-Id: <2FFCB26F-9AD0-4C1B-BED0-4D5F36462682@verou.me>
I really like this new Snap Size draft, badly needed functionality! But why restrict to width and height? Surely, these are the most common cases, but it comes up with other <length> properties too. E.g. for vertical rhythm, you might want to snap the line-height. Why not a generic way to apply snap to a bunch of properties, instead of defining new snap-xxx properties? It could be a list-valued snap shorthand (snap-property, snap-length), or a snap() function. The property could be defined as only accepting width and height for now, and we can gradually add more properties. As it currently stands, enabling snap on new properties means adding new snap-propertyname properties. Also, code that just overrides width/height without overriding snap-width, snap-height would produce very unexpected results. This is also the case with a snap property, but not a snap() function. Thoughts? [1]: https://drafts.csswg.org/css-snap-size/ Lea Verou ✿ http://lea.verou.me ✿ @leaverou
Received on Monday, 22 February 2016 08:10:25 UTC