On 03/31/2017 07:55 AM, L. David Baron wrote:
On Friday 2017-03-31 12:11 +0800, Tommy Kuo wrote:
**Summary**

I am intent to implement the property `line-height-step`. And it would be 
disabled behind the pref `layout.css.line-height-step.enabled` by default. It 
is a property to make authors create the content with vertical rhythm easier.

**Link to standard**

CSS Rhythmic Sizing
<https://drafts.csswg.org/css-rhythm/>

So in the discussions in the working group, I've been somewhat
skeptical that this feature does a good job of addressing the design
use cases that it's intended to address.

As the co-editor of the spec, I agree with David Baron's concerns.

Also, based on my discussions with Dave Cramer (CSSWG member who works
in the publishing industry), my understanding is that the the most
common problems are situations that need to be solved with block height
stepping, not line height stepping. An author can fairly easily ensure
that, within a paragraph, the line height follows a strict vertical
rhythm: as long as the text is not interrupted by atomic inline content
or text that has a larger font size / different vertical alignment (and
this covers the majority of text), it will maintain rhythm. But when the
paragraph text is interrupted by different content such as illustrations
and headings, then the rhythm can be thrown off. These are block-level
intrusions into the rhythm, and won't be solved (without hacks like
turning them into inline-blocks) by line height stepping. But they are
solved by block height stepping (which is also outlined in that draft).

I think we should endeavor to avoid “solutions” that require hacks, so
my advice would be to implement block height stepping first, since it
will more directly solve most of the use cases. I'm less convinced that
line height stepping is necessary; and also there are many issues with
inline layout that need to be addressed before it can be an effective
solution to the problems it addresses.

* Note that even for headings, which are text, it is the margin-box of
the heading as a whole which needs to fit into the rhythm, not necessarily
each line of it; headings usually have large margins, but the text is set
closely between lines. Similar concerns apply to blockquotes with smaller
text, figures with captions, and other block-level interruptions to prose.

~fantasai
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to