[csswg-drafts] [css-rhythm-1] Should block-step-size establish an independent formatting context? (#11325)

sammygill has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-rhythm-1] Should block-step-size establish an independent formatting context?  ==
https://drafts.csswg.org/css-rhythm/#block-step-size

The spec states that `block-step-size` establishes an independent formatting context on the box the property is applied to. This seems to be generally okay, but one area this might have unexpected effects is in the presence of floats. In particular, if there is an intrusive float with some text content that flows down the side of it, this may result in the content jumping around unexpectedly as the BFC avoids the float. This seems like it could be slightly undesirable when the author's goal is to just adjust the size of the content in some fashion. 

Perhaps it may be a better author experience if this property did not end up establishing an independent formatting context? If that seems reasonable, then we may want to consider what to do if the extra spacing added ends up changing the constraints of the impacted lines. Some rough ideas of what could be done in those cases:

1.) Try to determine which lines would be impacted and how. If it turns out that there would be no difference with the constraints for the lines if the extra spacing was added on both ends, then we just proceed to add the extra space. Otherwise, just add the extra spacing to the end even if the author requested it at the start?

2.) Try to reflow/layout, maybe at a maximum one time to avoid pathological behavior, and fall back to something else if it increases the block size of the content?  

My preference is for 1 since with 2 you would still have to have some sort of heuristic as a safety net, but open to discussion!

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11325 using your GitHub account


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

Received on Thursday, 5 December 2024 01:02:44 UTC