Re: [css3-regions] Feedback on regions document

Hi David,

On May 13, 2011, at 8:59 AM, David Hyatt wrote:

> On May 12, 2011, at 11:03 PM, Vincent Hardy wrote:
> 
>> 
>> I see. What about the following then:
>> 
>> @region-style <region_sel> {
>> 	p::lines-in-region {
>>        ...
>>        }
>> 
>>        h1::lines-in-region {
>>         ....
>>        }
>> }
>> 
> 
> The problem with this syntax is nothing stops an author from writing
> 
> @region-style <region_sel> {
> 	h1 { ... }
> }
> 
> and then not understanding why it doesn't work.
> 
> Is the concern with
> 
> h1::lines-in-region(<region_sel>) { }
> 
> that you have to repeat the region selector over and over potentially?  I wouldn't worry too much about that if so, since I can't imagine the customizations you'd do per-region would involve more than a handful of elements, and eventually we'll have CSS variables anyway, which will allow you to avoid repeating a complex selector expression.

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.

Vincent

Received on Friday, 13 May 2011 21:09:11 UTC