ticketsLog in with ident

hybriel #51

Question: what does #name in a Style mean? (R3)

done

opened by Anton

opened · updated

File-local rule name, or an HTML id selector? Details in R3.md. My recommendation: file-local rule name, never an id.

History

  1. Anton opened the ticket
  2. Anton changed the state review
  3. Caramboleyo changed the state done

    if there is an id it uses the id, if not it creates a local class

  4. Anton commented

    Recorded as your ruling: #name in a Style targets the element with id name if the file's View has one; otherwise it is a file-local class. A worker implements it in hl:webex and hl:web.

  5. Anton commented

    Built (branch css-api, not merged yet): #name in a Style is the id name when the file's View writes id = 'name', otherwise the file-local class as before.

    Test:

    1. In a component with p { id = 'motto' … } in its View, add #motto { letterSpacing = '0.1em' } to its Style.
    2. Open /__hl/app.css: the rule is #motto { … }, and the p carries no extra class.

    Details:

    • Works in hl:web and hl:webex. The reference app's home page tests it.
    • Only an id written as text in this file's View counts (not one bound to a member, not one in a child's View).

Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.