Hacker News new | past | comments | ask | show | jobs | submit login

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; }



I 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?


I 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


That's for properties and keywords, not for class names.


Afaik it's just for escaping `-`

It means that this `.-stretch` needs a class `.Grid` on the same element




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: