Re: [csswg-drafts] [css-grid-3] The initial value of `masonry-slack` should be 0 (#10882)

The CSS Working Group just discussed ``[css-grid-3] The initial value of `masonry-slack` should be 0``.

<details><summary>The full IRC log of that discussion</summary>
&lt;khush> oriol: it would be better to summarize the prop. another issue for naming it<br>
&lt;khush> with masonry we place the item into a track that is less filled.<br>
&lt;khush> with this prop you can provide a threshold so instead of doing it strictly order is preserved<br>
&lt;khush> current spec tentative initial value is 1m<br>
&lt;khush> i think it should be set to 0<br>
&lt;kbabbitt> s/1m/1em/<br>
&lt;khush> was investigating js frameworks which provide this<br>
&lt;khush> all of them have the strict value<br>
&lt;khush> they offer 2 possibilties: masonry-slack: 0 or infinite<br>
&lt;astearns> ack keithamus<br>
&lt;khush> when you set it to a positive value, no framework supports it<br>
&lt;khush> authors don't expect or ask for it<br>
&lt;khush> maybe it can be beneficial. exact value which will work well is highly dependent on the use-case<br>
&lt;khush> so just supporting 1em is confusing<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to point out they don't have a concept of masonry-slack<br>
&lt;khush> align with frameworks and set initial value to 0<br>
&lt;TabAtkins> +1 to fantasai's point<br>
&lt;khush> fantasai: the reason why frameworks don't have non-0 initial value since there is nothing other than infinity<br>
&lt;khush> this is a concept frameworks don't have<br>
&lt;khush> allows placements to occur in a more natural way for the user<br>
&lt;khush> slight diff of a few pixels jumping to a diff track breaks accessibility and sequencing order also<br>
&lt;khush> it would be better to have a non 0 initial value<br>
&lt;khush> 1em is used for gap<br>
&lt;khush> significantly more than 1px but less enoug<br>
&lt;khush> almost no use-case for anything less than this<br>
&lt;astearns> q+<br>
&lt;khush> oriol: i don't get the accessibility problem. reorder happens anyway in other cases<br>
&lt;khush> fantasai: when you start mixing span values, you have this problem. span: 1 doesn't cause jumping backwards.<br>
&lt;khush> the most common case won't have this jumping around<br>
&lt;khush> as long as your slack is big enough yoy're always moving fwd<br>
&lt;khush> masonry-slack being too small makes it not obvious why the movement happened<br>
&lt;khush> noticeable difference between 2 columns for you to go higher. user won't understand why we moved unless the slack is high<br>
&lt;khush> astearns: i don't understand the argument that an em's worth of slack is more natural when none of the current libs give you that facility<br>
&lt;khush> fantasai: they just didn't think of it<br>
&lt;khush> astearns: it's been long enough. why no feature request?<br>
&lt;khush> fantasai: we might be able to do better than the js framework though<br>
&lt;khush> astearns: 1em is currently spec'd?<br>
&lt;khush> fantasai: yea<br>
&lt;khush> TabAtkins: +1 to fantasai<br>
&lt;khush> oriol: this would align with col-gap. it's initial value is normal.<br>
&lt;khush> should we do something more along the lines?<br>
&lt;khush> not 0 but normal keyword<br>
&lt;khush> oriol: there may be different cases where the value changes due to other things and changing the initial value would be harder<br>
&lt;khush> so yes<br>
&lt;khush> fantasai: sounds good to me<br>
&lt;khush> oriol: i still believe defaulting to a positive value will trigger confusion<br>
&lt;khush> fantasai: happily surprised?<br>
&lt;khush> astearns: any implementations?<br>
&lt;khush> fantasai: not yet<br>
&lt;fantasai> s/happily surprised/surprised and delighted/<br>
&lt;dholbert> I have a concern that 1em as a magic value might produce unexpected layouts, if a user has a different font-size in their UA stylesheet etc<br>
&lt;dholbert> 1em as a threshold of "a distance that a user may notice" is a bit fiddly<br>
&lt;dholbert> which means I think I agree with a "normal" value, but I'm not sure how it should be defined. :)<br>
&lt;fantasai> dholbert, it's not 1rem, it's 1em :)<br>
&lt;khush> astearns: we don't have a basis to decide this issue. let's implement and get feedback from authors. revisit once we have that data<br>
&lt;fantasai> so it will always scale with the font the author chose<br>
&lt;kbabbitt> +1 astearns<br>
&lt;miriam> I would consider 1lh…<br>
&lt;khush> fantasai: let's resolve on what we have<br>
&lt;dholbert> fantasai: if a user sets a minimum font-size in their browser, I thought that still impacts 1em sizing? need to confirm<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10882#issuecomment-2378200125 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 27 September 2024 00:55:30 UTC