Re: [css3-background] clarify which properties in this module apply to ::first-letter and ::first-line

(12/03/28 7:25), Brian Manthos wrote:
> And now we're considering changing conformance requirements 
> because we want another new shiny?  Sounds like the responsible
> choice is to consider it for CSS4 rather than throwing another
> grenade at CSS3.

I can more or less share this position. When I raised this issue, my
major concern was that I don't know what "background properties" and
"border properties", as used by CSS 2.1 to describe what applies to
'::first-line/::first-letter', mean in the context of CSS3 B&B.

So I think our reasonable first step would be writing down the common
denominator of our interpretations of the conformance requirement of the
relevant paragraphs, which are

(12/03/28 9:51), Brian Manthos wrote:
> # The :first-line pseudo-element is similar to an inline-level
> # element, but with certain restrictions. The following properties
> # apply to a :first-line pseudo-element: font properties, color
> # property, background properties, 'word-spacing', 'letter-spacing',
> # 'text-decoration', 'text-transform', and 'line-height'. UAs may
> # apply other properties as well.
> # These are the properties that apply to :first-letter
> # pseudo-elements: font properties, 'text-decoration',
> # 'text-transform', 'letter-spacing', 'word-spacing' (when
> # appropriate), 'line-height', 'float', 'vertical-align' (only if
> # 'float' is 'none'), margin properties, padding properties, border
> # properties, color property, background properties. UAs may apply
> # other properties as well.

While Brian's interpretation is

> fantasai:
>>   All background properties
>>   All border-radius properties
>>   All border-image properties
>> How did you interpret the conformance requirements on those?
> My interpretation is thus:
> 1. For the 3 sets of properties above, there is no normative text in
> the CSS3 Background module.  Thus CSS2.1 is the normative reference.
> 2. CSS3 Background, section 4.4 ["Border Shorthand Properties"]
> suggests that "border properties" is expanded to include
> border-radius and border-image.
> 3. Conformance requires supporting background properties in both
> first-line and first-letter.
> 4. Given #2, conformance requires supporting border-radius in
> first-letter.
> 5. Given #2, conformance requires supporting border-image in
> first-letter.
> 6. Conformant UA may apply border-radius and border-image to
> first-line (i.e. not a requirement but not prohibited).

, regarding 2., I don't see section 4.4 mention anything about
border-radius (moreover, Chapter 4 Border almost never talks about
border-radius). Also, 'border-image' properties, albeit reset by
'border' shorthand, are describe into another chapter. Thus, 4. 5. don't
match my interpretation and they fall into the sad MAYs. I'm with 3.

Therefore, instead of

  # All properties in this module apply to the ::first-line and
  # ::first-letter pseudo-elements.

, I suggest we say

  | All properties in Chapter 3 apply to ::first-line and
  | ::first-letter. All properties in Chapter 4 apply to ::first-letter.

Now, can we safely say all properties in 5. Rounded Corners apply to
::first-letter? In all browsers besides Opera, 'border-radius' does
apply so I am inclined to think we should *add this new feature*, but I
think if anyone is opposed to it, we should defer this to CSS4, since it
is, rigorously speaking, a new feature and I don't think this is
seriously needed.

I think we'll have to do this on a case-by-case basis. I haven't tested
the applicability of other properties on '::first-letter/::first-line'.

> On 03/07/2012 02:03 PM, Brad Kemper wrote:
>> On Mar 6, 2012, at 5:31 PM, "Kang-Hao (Kenny)
Lu"<>  wrote:
> <>
>> [... explanation of how this is unclear ...]
>>> (A side question out of curiosity: the spec says
>>>   # The ‘box-shadow’ property applies to the ‘::first-letter’
>>>   # pseudo-element, but not the ‘::first-line’ pseudo-element.
>>> So, does this mean UA MUST NOT apply 'box-shadow' to '::first-line'
>>> or UA MAY apply 'box-shadow' to '::first-line' (because of CSS2.1) ?
>>> )
(12/03/28 7:25), Brian Manthos wrote:
> I think the #-referenced quote below is pretty clear:  conformance
> requires not applying box-shadow to first-line.  At least one
> implementation (IE9) respects that conformance requirement.

I never understand the logic used in the specs. So when a sentence (e.g.
the #-referenced one) is not tagged with a MUST or SHOULD, is this by
default a MUST? And would adding a SHOULD/MUST here help? (is
SHOULD/MUST stronger than a MAY if there's conflict?)

Anyway, this is a side question, but I prefer something like

  | UAs should not apply other properties in this module to
  | '::first-letter' and '::first-line', but a future specification may
  | change this.

to override the MAYS. The difference between this and the MAYs seems to
be whether we can write tests which assert that some properties do not
apply. See [1] for a CSS 2.1 test that's likely invalid because of the MAYs.



Received on Wednesday, 28 March 2012 11:33:27 UTC