Re: [css3-selectors] LC issues #9+

Anton Prowse wrote:
> Congratulations on a very solid-looking specification!
> 
> Here are the things that I noticed when reading through the document.
> (Trivial editorial issues are listed separately at the end.)
> ...
> 8.2. Child combinators
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#child-combinators) :
> 
>   # A child combinator describes a childhood relationship between two
>   # elements. A child combinator is made of the "greater-than sign" (>)
>   # character and separates two sequences of simple selectors.
> 
> Issue 9:  s/"greater-than sign" (>)/"greater-than sign" (U+003E, >)/

Fixed, thanks.

> Trivial editorial matters
> -------------------------
> 
> General comments :
> 
> Issue 10:  Notes are currently not displayed consistently, cf "Note:",
> "Note.", subsequent capital letter or lowercase letter.  All notes
> should begin with "Note:" or similar; currently this is not the case in
> 6.6.1, 6.6.5, 7, 7.1 and 7.2.

Fixed.

> 1. Introduction
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#context) :
> 
>   # Selectors Level 1 and Selectors Level 2 are defined as the subsets
>   # of functionality defined in the CSS1 and CSS2.1 specifications,
>   # respectively.
> 
> Issue 11:  s/functionality/selector functionality/

Fixed.

> 6.3.4. Default attribute values in DTDs
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#def-values) :
> 
>   # Example:
>   #
>   # Consider an element EXAMPLE
> 
> Issue 12:  EXAMPLE should be typeset in the same monospace font as used
> for element names elsewhere in the examples.  Ditto the example in 6.4.
> Class selectors.

Done.

> 6.6.4. The UI element states pseudo-classes
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#UIstates) :
> 
>   # The :checked pseudo-class
>   #
>   # Radio and checkbox elements can be toggled by the user. Some menu
>   # items are "checked" when the user selects them. When such elements
>   # are toggled "on" the :checked pseudo-class applies. The :checked
>   # pseudo-class initially applies to such elements that have the HTML4
>   # selected and checked attributes as described in Section 17.2.1 of
>   # HTML4, but of course the user can toggle "off" such elements in
>   # which case the :checked pseudo-class would no longer apply. While
>   # the :checked pseudo-class is dynamic in nature, and is altered by
>   # user action, since it can also be based on the presence of the
>   # semantic HTML4 selected and checked attributes, it applies to all
>   # media.
> 
> Issue 13:  why such attention to HTML4 all of a sudden?  Explanation of
> the behaviour should be separated from examples (eg HTML4) which
> illustrate that behaviour.

Good catch. Rearranged the text to read:

   # Radio and checkbox elements can be toggled by the user. Some menu
   # items are "checked" when the user selects them. When such elements
   # are toggled "on" the :checked pseudo-class applies. While the
   # :checked pseudo-class is dynamic in nature, and can altered by user
   # action, since it can also be based on the presence of semantic
   # attributes in the document, it applies to all media. For example,
   # the :checked pseudo-class initially applies to such elements that
   # have the HTML4 selected and checked attributes as described in
   # Section 17.2.1 of HTML4, but of course the user can toggle "off"
   # such elements in which case the :checked pseudo-class would no
   # longer apply.

I believe that closes this issue.

> 6.6.5 :nth-child() pseudo-class
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#nth-child-pseudo) :
> 
>   # The :nth-child(an+b) pseudo-class notation represents an element
>   # that has an+b-1 siblings before it in the document tree, for a given
>   # positive integer or zero value of n, and has a parent element.
> 
> Issue 14:  s/an+b-1/(s x n) + b - 1/

I don't understand this suggestion. Did you want a multiplication sign
between a and n?

> 6.6.5 :nth-last-child() pseudo-class
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#nth-last-child-pseudo) 
> 
> :
> 
>   # See :nth-child() pseudo-class for the syntax of its argument.
> 
> Issue 15:  Linkify the text to point to the relevant place in the document.

Fixed.

> 6.6.5 :last-of-type pseudo-class
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#last-of-type-pseudo)
> :
> 
>   # Example:
>   #
>   # The following selector represents the last data cell td of a table
>   # row.
> 
> Issue 16:  s/a table row/a table row td/ or s/a table row/an HTML table 
> row/

Fixed. (You meant tr, I presume, not td.)

> 6.6.5. :first-child pseudo-class
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#first-child-pseudo) 
> :
> 
>   # Examples:
>   #
>   # [...]
>   #
>   # This selector can represent the p inside the div of the following
>   # fragment:
>   #
>   # [...]
>   #
>   # but cannot represent the second p in the following fragment:
>   #
>   # [...]
> 
> Issue 17:  s/fragment/HTML fragment/ (twice)

Actually, it does not matter whether it is HTML or not. So I will not
make this change.

> 6.6.5 :empty pseudo-class
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#empty-pseudo) :
> 
>   # Examples:
>   #
>   # p:empty is a valid representation of the following fragment:
>   #
>   # <p></p>
>   #
>   # foo:empty is not a valid representation for the following fragments:
>   #
>   # [...]
> 
> Issue 18:  s/fragment/HTML fragment/ (twice)

Or, for the same reason, this one.

> 6.6.6. Blank
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#UIfragments) :
> 
>   # This section intentionally left blank.
> 
> Issue 19:  Append a description of what was previously defined here. Cf
> 7.3. Blank.

Ok.

> 7. Pseudo-elements
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#pseudo-elements) :
> 
>   # Pseudo-elements create abstractions about the document tree beyond
>   # those specified by the document language. For instance, document
>   # languages do not offer mechanisms to access the first letter or
>   # first line of an element's content.  Pseudo-elements allow designers
>   # to refer to this otherwise inaccessible information. Pseudo-elements
>   # may also provide designers a way to refer to content that does not
>   # exist in the source document (e.g., the ::before and ::after
>   # pseudo-elements give access to generated content).
> 
> Issue 20a:  The wording of the first two sentences makes it sound like
> this is a limitation in the document language, but in the case of
> accessing the first line, this is something which is /meaningless/ in
> the document language.

Not sure what I can do about that, so I'm going to leave it.

> Issue 20b:  The reference to "designers" seems incongruous and does not
> appear in normative text anywhere else in the specification.
> s/designers/authors/ and ditto in the Note in 6.5. ID selectors.

Fixed.

> 7.1. The ::first-line pseudo-element
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#first-line) :
> 
>   # CSS example:
>   #
>   # p::first-line { text-transform: uppercase }
>   #
>   # The above rule means "change the letters of the first line of every
>   # paragraph to uppercase".
> 
> Issue 21a:  s/paragraph/p element/ or s/CSS example/CSS and HTML Example/

Fixed.

>   # The selector p::first-line does not match any real HTML element. It
>   # does match a pseudo-element that conforming user agents will insert
>   # at the beginning of every paragraph.
> 
> Issue 21b:  s/The selector p::first-line/In an HTML document, for
> example, the selector p::first-line/

Since the sentence technically isn't inaccurate, I'm going to leave this one.

>   # The "first formatted line" of an element may occur inside a
>   # block-level descendant in the same flow (i.e., a block-level
>   # descendant that is not positioned and not a float). E.g., the first
>   # line of the div in <DIV><P>This line...</P></DIV> is the first line
>   # of the p (assuming that both p and div are block-level).
>   #
>   # The first line of a table-cell or inline-block cannot be the first
>   # formatted line of an ancestor element. Thus, in
>   #
>   # <DIV><P STYLE="display: inline-block">Hello<BR>Goodbye</P>
>   # etcetera</DIV> the first formatted line of the div is not the line
>   # "Hello".
> 
> Issue 21c:  s/E.g., the first line of the div in <DIV>/E.g., the first
> line of the div in the HTML fragment <DIV>/
> or
>          s/div/DIV/ (twice) and s/p/P/ (twice)

Took the second option.

> Issue 21d:  Prepend "In CSS, " to the latter two paragraphs.

Added a new heading to mark all of this text as applying to CSS's definition
of "first formatted line".

> Issue 21e:  s/Here is an example. The fictional tag sequence for/For
> example, the fictional tag sequence for the HTML fragment/

Fixed.

>   # The ::first-line pseudo-element is similar to an inline-level
>   # element, but with certain restrictions. In CSS, the following
>   # properties apply to a ::first-line pseudo-element: font properties,
>   # color property, background properties, 'word-spacing',
>   # 'letter-spacing', 'text-decoration', 'vertical-align',
>   # 'text-transform', 'line-height'. UAs may apply other properties as
>   # well.
> 
> Issue 21f:  "In CSS" should be placed at the start of the first
> sentence, not the second.

Shifted the mention of CSS, but not to the start of the first sentence
since we have the header now.

> Issue 21g:  Should the following be inserted after the second sentence?
> "A future version of this specification may allow this pseudo-element to
> apply to more element types."  Cf. 7.2.

I think it's more likely that we'll add support for inline::first-letter
than inline::first-line. So I'm going to leave the text as-is.

>   # During CSS inheritance, the portion of a child element that occurs
>   # on the first line only inherits properties applicable to the
>   # ::first-line pseudo-element from the ::first-line pseudo-element.
>   # For all other properties inheritance is from the non-pseudo-element
>   # parent of the first line pseudo element. (The portion of a child
>   # element that does not occur on the first line always inherits from
>   # the parent of that child.)
> 
> Issue 21h:  Prepend the last sentence with "In CSS, ".  I interpret that
> sentence as a reminder of CSS behaviour, and so it might be better as a
> Note.

No, this is not normal CSS behavior, and this prose needs to be normative.
Normal CSS behavior inherits only through the element tree, and here we
have an element inheriting from two different parents.

> 7.2. The ::first-letter pseudo-element
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#first-letter) :
> 
>   # The ::first-letter pseudo-element represents the first letter of
>   # the first line of a block, if it is not preceded by any other
>   # content (such as images or inline tables) on its line. The
>   # ::first-letter pseudo-element may be used for "initial caps" and
>   # "drop caps", which are common typographical effects. This type of
>   # initial letter is similar to an inline-level element if its 'float'
>   # property is 'none'; otherwise, it is similar to a floated element.
> 
> Issue 22a:  Prepend the last sentence with "In CSS, ".

Done.

>   # In CSS, 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.
> 
> Issue 22b:  Should the following be inserted after that sentence?  "A
> future version of this specification may redefine which properties apply
> to this pseudo-element."  Cf. 7.2.

We already have an exception allowing UAs to apply other properties,
so I will leave this alone.

>   # Example:
>   #
>   # This example shows a possible rendering of an initial cap.
> 
> Issue 22c: s/Example:/CSS and HTML Example/

Changed.

>   # Example:
>   #
>   # The fictional tag sequence for this HTMLfragment:
> 
> Issue 22d: s/HTMLfragment/HTML fragment/

Fixed.

>   # The first letter of a table-cell or inline-block cannot be the
>   # first letter of an ancestor element. Thus, in
>   # <DIV><P STYLE="display: inline-block">Hello<BR>Goodbye</P>
>   # etcetera</DIV> the first letter of the div is not the letter "H". In
>   # fact, the div doesn't have a first letter.
>   #
>   # The first letter must occur on the first formatted line. For
>   # example, in this fragment: <p><br>First... the first line doesn't
>   # contain any letters and ::first-letter doesn't match anything
>   # (assuming the default style for br in HTML 4). In particular, it
>   # does not match the "F" of "First."
> 
> Issue 22e:  Prepend the first sentence with "In CSS, " .

Fixed.

> Issue 22f:  s/in this fragment/in this HTML fragment/

Fixed.

>   # Example:
>   #
>   # After the rule 'p::before {content: "Note: "}', the selector
>   # 'p::first-letter' matches the "N" of "Note".
>   #
>   # Note: In some cases the ::first-letter pseudo-element should
>   # include more than just the first non-punctuation character on a
>   # line. For example, combining characters must be kept with their base
>   # character. Additionally, some languages may have specific rules
>   # about how to treat certain letter combinations. The UA definition of
>   # ::first-letter should include at least the default grapheme cluster
>   # as defined by UAX29 and may include more than that as appropriate.
>   # In Dutch, for example, if the letter combination "ij" appears at the
>   # beginning of an element, both letters should be considered within
>   # the ::first-letter pseudo-element. [UAX29]
>   #
>   # If the letters that would form the ::first-letter are not in the
>   # same element, such as "'T" in <p>'<em>T..., the UA may create a
>   # ::first-letter pseudo-element from one of the elements, both
>   # elements, or simply not create a pseudo-element.
> 
> Issue 22g:  Typeset the selectors and rules in a monospace font as is
> done elsewhere in the specification, and remove the surrounding
> apostrophes.

Fixed.

>   # Example:
>   #
>   # The following example illustrates how overlapping pseudo-elements
>   # may interact. [...]
> 
> Issue 22h: s/Example/CSS and HTML Example/

Fixed.

> 8.1. Descendant combinator
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#descendant-combinators) 
> 
> :
> 
>   # Examples:
>   #
>   # For example, consider the following selector:
>   #
>   # h1 em
>   #
>   # It represents an em element being the descendant of an h1 element.
>   # It is a correct and valid, but partial, description of the following
>   # fragment:
>   #
>   # <h1>This <span class="myclass">headline
>   # is <em>very</em> important</span></h1>
>   #
>   # The following selector:
>   #
>   # div * p
>   #
>   # represents a p element that is a grandchild or later descendant of
>   # a div element. Note the whitespace on either side of the "*" is not
>   # part of the universal selector; the whitespace is a combinator
>   # indicating that the DIV must be the ancestor of some element, and
>   # that that element must be an ancestor of the P.
> 
> Issue 23a:  s/fragment/HTML fragment/

Not necessary, so leaving as-is.

> Issue 23b:  s/DIV/div/ and s/P/p/ and typeset both in a monospace font.

Fixed.

> 8.3.2. General sibling combinator
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#general-sibling-combinators) 
> 
> :
> 
>   # Example:
>   #
>   # h1 ~ pre
>   #
>   # represents a pre element following an h1. It is a correct and
>   # valid, but partial, description of:
>   #
>   # <h1>Definition of the function a</h1>
>   # <p>Function a(x) has to be applied to all figures in the table.</p>
>   # <pre>function a(x) = 12x/13.5</pre>
> 
> Issue 24:  s/description of/description of the following HTML fragment/

Not necessary, so leaving as-is.

> 10.1. Grammar
> (http://www.w3.org/TR/2009/WD-css3-selectors-20090310/#grammar) :
> 
>   # [...] note that most UA's should not use it directly [...]
> 
> Issue 25:  s/UA's/UAs/

Fixed.

~fantasai

Received on Tuesday, 13 October 2009 22:27:16 UTC