- From: Håkon Wium Lie <howcome@opera.com>
- Date: Sat, 4 Oct 2014 12:54:31 +0200
- To: Alan Stearns <stearns@adobe.com>
- Cc: Christoph Päper <christoph.paeper@crissov.de>, "www-style\@w3.org" <www-style@w3.org>
Alan Stearns wrote: > Two separate properties make it easier to extend in the future > (both for defining a named grid and for snapping to different baselines). > The small benefit of using one declaration instead of two is a false > economy. So, your argument is that we should choose the most complex alternative today so that we can further complicate it tomorrow? Personally, I write my style sheets by hand and prefer the simple alternative -- especially since it solves more use cases than the complex alternative. But I understand this doesn't make economic sense for tool makers. > The line-snap property currently has one additional value - > contain. we were to use a single property there might need to be > something like engage-baseline and engage-contain (or perhaps just > baseline and contain?). Yes, 'engage' could be replaced by 'baseline' (or some other alignment principle). The 'contain' keyword doesn't tell me much and there are noe code or visual examples in the draft. I think it needs more explanation before it can be evaluated. > And I just had another thought. In my draft line-grid does not inherit, > but line-snap does. This maps well to what the properties are used for - > defining a grid is a singular operation, but it makes sense for snapping > to continue through all of the element’s children. The single property > can’t inherit, as you wouldn’t want a ‘new’ value to create a new grid on > each child. The engagement part of the single property is then carried > through to the element’s children just by definition, not inheritance. So > child elements have a 'baseline-grid:normal’ value and their content snaps > or not depending on the nearest ancestor with a baseline-grid value that > isn’t ‘normal’? The element snaps if a baseline grid is enganged, otherwise not. Simple. Think of the 'background' property, it doesn't inherit but still influences the presentation of child elements. > That also seems suboptimal to me - better to have two > properties so that the inherited value of line-snap can indicate what > snapping strategy is used for the element’s line boxes. Why is it suboptimal? Is 'background' suboptimal, too? > I am planning on allowing an ident on the line-snap property for named > grids in the future If deemed necessary, one can easily add named baseline grids to a single non-inherited property: body { baseline-grid: define(foo) } article { baseline-grid: define(bar) } p { baseline-grid: engage(foo) } But I think you'll have to dig deep to find a use case which cannot be solved with the simple solution currently described in CSS Books. https://books.spec.whatwg.org/#baseline-grids Cheers, -h&kon Håkon Wium Lie CTO °þe®ª howcome@opera.com http://people.opera.com/howcome
Received on Saturday, 4 October 2014 11:33:11 UTC