- From: David Hyatt <hyatt@apple.com>
- Date: Fri, 13 May 2011 17:01:24 -0500
- To: Vincent Hardy <vhardy@adobe.com>
- Cc: "www-style@w3.org CSS" <www-style@w3.org>
On May 13, 2011, at 4:08 PM, Vincent Hardy wrote:
> No, my concern is to separate out issues: one is to scope selectors that only apply to elements flowed in a region (which @region-style <region-sel> accomplishes), the other being the selection of elements (or lines) and the last one is extensibility.
>
> I like the idea of having a ::lines-in-region pseudo element and I think it expresses the selection part really well. For extensibility, I would like that we would do something like:
>
> @region-style <region_sel> {
> h1:before {
> content: "(continued)";
> }
> }
>
> in the future. To be able to have richer region styling in the future, I think we need to have a scoping syntax. I would prefer an @ rule over putting the additional scoping on individual selectors. For my previous example, we would otherwise have to write something like:
>
> h1:before-in-region(<region_sel>) {}
>
> or something of that sort.
Another idea might be to add a scoping qualifier that says you're only styling lines,
@region-style lines <region_sel>
{
h1 { color: red; font-size: larger } /* Only applies to the lines of h1 */
}
Then in the future we could say that the keyword is optional and/or introduce new types that might support different property subsets, e.g.,
@region-style all <region_sel>
{
}
or just
@region-style <region_sel>
{
}
You still have the computed style issue to deal with here though. You'd need a new method like getComputedRegionStyle that could indicate what you're asking for (the lines in a particular region). That's one advantage of the ::lines-in-region() pseudo-element syntax. It works with the existing CSS OM.
dave
(hyatt@apple.com)
Received on Friday, 13 May 2011 22:02:14 UTC