hybriel
Question: what does #name in a Style mean? (R3)
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
Anton opened the ticket Anton changed the state review Caramboleyo changed the state done if there is an id it uses the id, if not it creates a local class
Anton commented Recorded as your ruling:
#namein a Style targets the element with idnameif the file's View has one; otherwise it is a file-local class. A worker implements it in hl:webex and hl:web.Anton commented Built (branch css-api, not merged yet):
#namein a Style is the idnamewhen the file's View writesid = 'name', otherwise the file-local class as before.Test:
- In a component with
p { id = 'motto' … }in its View, add#motto { letterSpacing = '0.1em' }to its Style. - 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).
- In a component with
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.