Re: [csswg-drafts] [css-logical] Syntax for `margin`-like shorthands

Wow, okay! Here's some responses:

- I think it's pretty sure we are not doing a separate property to control interpretation of shorthands. First, as @MatsPalmgren mentions, this is harder to implement--we really want a switch that's syntactically part of the declaration and lets us handle this at parse time. Secondly, it creates an "action at a distance" effect, which is likely to result in confusion and errors as multiple parts of a stylesheet interact.
- Agree that `margin` vs `margins` is going to be confusing and we shouldn't go that route. :) For languages that pluralize with `s` such as English, it's a mostly-unnoticeable morpheme and not something we ever want to be a distinguishing factor in any CSS syntax.
- I agree with @inoas that using just `!` alone is likely a bit too obscure (and also a bit too general, imho, as we use `!keyword` for other things like `!important`). However, I also agree with the concerns about `!relative` or `relative` or `-relative` potentially being too much of a typing burden; as I mentioned in the OP, we do expect this to become the default mode of assignment for many authors, so I'd say it's fair to trade a bit of obscurity for a bit of typing efficiency.
- Wrt @MatsPalmgren’s comment about moving to flow-relative directions... CSS models like Grid tend to use flow-relative directions to begin with, however for anything that's analogous to an existing CSS feature like `margin` or `background-position`, consistency is a more important consideration. Hence `scroll-snap-margin` is physical, even though we would have preferred it to be flow-relative.
- `transpose` is not a bad name, the main downside is that it doesn't indicate what the mapping is!
- Fwiw, `margin-block` and `margin-inline` were [resolved to add](https://lists.w3.org/Archives/Public/www-style/2013May/0201.html) already, I just forgot to make the edits. :( I'll go do that now. ;)
- Wrt interleaving keywords... one of the great things about the 4-value shorthand syntax is the way that it can use 1, 2, 3, or 4 values to assign to the four sides, and pairs things up in ways that both correspond to common use cases and yet also unroll syntactically in a consistent way. I think we want to keep those qualities; and also be consistent with Grid which already has a 4-value shorthand in `grid-area`.

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1282#issuecomment-298091058 using your GitHub account

Received on Friday, 28 April 2017 19:50:41 UTC