Intent to Implement: CSS Snap Size

114 views
Skip to first unread message

Koji Ishii

unread,
Feb 12, 2016, 2:01:23 AM2/12/16
to blink-dev
Contact emails

ko...@chromium.org


Spec

https://drafts.csswg.org/css-snap-size/


Summary

This spec provides a way to snap width/height to the multiple of a value. The most important use case is for web developers to create vertical rhythm using CSS.


Motivation

Vertical rhythm is one of the fundamental typographic techniques hard to achieve in CSS today. Its importance became higher when web introduced multi-column layout (examples.) This is also one of the top requests in the Japan web developer meetup in Sapporo TPAC last year, where other implementers mentioned that they hear the requests in other places too.


Today, web developers are trying tools such as Compass, typecast, or CSS generators to create such effects, but they're too easy to break.


CSS Line Grid tries to solve this request, but broader implementations are not reached after years due to its implementation complexity. Blink removed it a few years ago. This spec tries to find a different balance between the implementation feasibility and the feature usefulness.


In the CSS WG F2F discussion, it was pointed out that this could serve more use cases than the vertical rhythm.


Interoperability and Compatibility Risk

The plan is to implement behind the experimental web platform features flag to experiment implementation feasibility. The spec is in early stage and is still likely to change.


Ongoing technical constraints

None.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


OWP launch tracking bug

crbug.com/586413


Link to entry on the feature dashboard

https://www.chromestatus.com/features/5734273533345792


Requesting approval to ship?

No.

一丝

unread,
Feb 14, 2016, 10:06:07 PM2/14/16
to blink-dev
WebKit support line-grid,line-snap and line-align.

在 2016年2月12日星期五 UTC+8下午3:01:23,Koji Ishii写道:
Reply all
Reply to author
Forward
0 new messages