You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-scroll-snap-1] Unclear what mapping the 4-value longhands use #1050
scroll-padding and scroll-snap-margin shorthands are unclear as to which longhand properties are set (specifically physical or logical).
My guess is that the intent is the shorthand follows the standard TRBL pattern, and then physical sides are mapped to logical longhands based on writing mode, but this is not clear from reading the spec.
Sorry, this doesn't address my concern at all, first the link to 'border-image-outset' is completely irrelevant as it has neither physical or logical longhands, nor any way to set the values in logical directions (afaict). Second, the link to 'margin' in css2.1 has no reference to or mention of logical properties.
The concern here came up during TAG review, scroll-snap specifies a shorthand, and both physical and logical longhands, but has absolutely no information that explains how the shorthand maps to the longhands, and the links given don't help. While I could make an educated guess, others couldn't. At the least, a brief sentence explaining that the shorthand sets all the longhands, in the manner described by css-logical §3.2 (or a better link) would be helpful. I get that this is probably obvious to the editors, but it's not obvious to a casual reader (which is the real issue).
It's an improvement (and I accept that you gave me exactly what I asked for), but I still think it could be better.
the description of the scroll-snap-margin and scroll-snap-padding shorthands are referring to margin and padding respectively in CSS2.x, but neither margin nor padding in CSS2.x have any information about how the shorthands relate to the logical longhand properties
I accept that css-logical does define how the margin and padding shorthands relate to the physical and logical properties, but since css-logical doesn't list the scroll-snap properties, then css-scroll-snap should define that interaction. (I do see the first paragraph of appendix A, but it leaves a bit to be inferred.)
Appendix A goes on to describe the scroll-padding-* and scroll-snap-margin-* longhands as being longhands for scroll-padding and scroll-snap-margin, but has no description of the physical/logical split.
There's no mention of the 'logical' keyword being valid in the values of scroll-padding or scroll-snap-margin (unless I missed it).
Reading css-scroll-snap without having css-logical fully swapped in, can lead a reader to think that a declaration of scroll-padding: 1em will set both the physical and logical longhands, where my (current) understanding of css-logical is that it should only set the physical longhands and leave the logical longhands alone. (Where scroll-padding: logical 1em would set only the logical longhands.)
Perhaps a paragraph in each of the physical and flow-realtive longhand descriptions in Appendix A stating that the physical longhands are only set by the shorthand when the 'logical' is not present and the flow-relative longhands are only set when the 'logical' keyword is present...
The logical keyword is not currently valid in scroll-padding or scroll-snap-margin, because that part of css-logical is insufficiently stable (note the bright red issue!). Whether you treat the shorthand as setting all longhands or only the physical ones is actually irrelevant: both interpretations yield the same result. I'd be perfectly happy to say the shorthands only set the physical longhands, but then we may need to update the spec later if we decide otherwise for css-logical.
Ok, so if css-logical isn't stable enough then I accept that it doesn't make sense to be overly specific in this spec. Perhaps an additional sentence in the beginning of Appendix A indicating that the mapping between the shorthand and longhand properties is also determined by css-logical? With that I'd be satisfied.
(I'm also not sure that the shorthand setting all longhands vs just the physical/logical longhands is irrelevant, while the end result may not be observable in layout/scroll behavior, it will be observable in the CSSOM.)
Activity
[-][css-scroll-snap-1] [/-][+][css-scroll-snap-1] Unclear what mapping the 4-value longhands use[/+]tabatkins commentedon May 15, 2017
We specify this:
plinss commentedon May 20, 2017
Sorry, this doesn't address my concern at all, first the link to 'border-image-outset' is completely irrelevant as it has neither physical or logical longhands, nor any way to set the values in logical directions (afaict). Second, the link to 'margin' in css2.1 has no reference to or mention of logical properties.
The concern here came up during TAG review, scroll-snap specifies a shorthand, and both physical and logical longhands, but has absolutely no information that explains how the shorthand maps to the longhands, and the links given don't help. While I could make an educated guess, others couldn't. At the least, a brief sentence explaining that the shorthand sets all the longhands, in the manner described by css-logical §3.2 (or a better link) would be helpful. I get that this is probably obvious to the editors, but it's not obvious to a casual reader (which is the real issue).
fantasai commentedon Jun 19, 2017
OK, I checked in some changes. @plinss could you review?
plinss commentedon Jun 19, 2017
It's an improvement (and I accept that you gave me exactly what I asked for), but I still think it could be better.
Reading css-scroll-snap without having css-logical fully swapped in, can lead a reader to think that a declaration of
scroll-padding: 1emwill set both the physical and logical longhands, where my (current) understanding of css-logical is that it should only set the physical longhands and leave the logical longhands alone. (Wherescroll-padding: logical 1emwould set only the logical longhands.)Perhaps a paragraph in each of the physical and flow-realtive longhand descriptions in Appendix A stating that the physical longhands are only set by the shorthand when the 'logical' is not present and the flow-relative longhands are only set when the 'logical' keyword is present...
fantasai commentedon Jun 20, 2017
The
logicalkeyword is not currently valid inscroll-paddingorscroll-snap-margin, because that part of css-logical is insufficiently stable (note the bright red issue!). Whether you treat the shorthand as setting all longhands or only the physical ones is actually irrelevant: both interpretations yield the same result. I'd be perfectly happy to say the shorthands only set the physical longhands, but then we may need to update the spec later if we decide otherwise for css-logical.plinss commentedon Jun 20, 2017
Ok, so if css-logical isn't stable enough then I accept that it doesn't make sense to be overly specific in this spec. Perhaps an additional sentence in the beginning of Appendix A indicating that the mapping between the shorthand and longhand properties is also determined by css-logical? With that I'd be satisfied.
(I'm also not sure that the shorthand setting all longhands vs just the physical/logical longhands is irrelevant, while the end result may not be observable in layout/scroll behavior, it will be observable in the CSSOM.)
fantasai commentedon Jun 21, 2017
Ok, added 393d993
Let me know if that looks okay!
[css-scroll-snap] 各種更新
plinss commentedon Jun 27, 2017
Works for me, thanks!