3 ms·
Perhaps my CSS is rusty and not keeping up with the new syntax but I need to know what with that "\" syntax? .Grid.\-stretch { align-items: stretch; }
by Brajeshwar 11y ago
Perhaps my CSS is rusty and not keeping up with the new syntax but I need to know what with that "\" syntax?
.Grid.\-stretch { align-items: stretch; }
- JackuB 11y agoAfaik it's just for escaping `-` It means that this `.-stretch` needs a class `.Grid` on the same element
- pbhjpbhj 11y agoI think they're just escaping the hyphen, I don't know of any hack that might use that [there are many "backslash hacks"] other than perhaps for IE5.5 (on Mac?). You're not supposed to start class names with hyphens by convention so there could be a pre-parser/checker that complains if it's not escaped?
- 0x4a42 11y agoI thought classes starting with an hyphen are reserved for browser vendors[1]. Maybe this changed since the last time I checked the spec. [1] = https://www.w3.org/TR/CSS21/syndata.html#vendor-keywords https://www.w3.org/TR/CSS21/syndata.html#vendor-keywords
- majewsky 11y agoThat's for properties and keywords, not for class names.