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

Its a good point about comma-delimited selectors reducing repetition, but constants offer other advantages, just as they do in any language.

One example is the ability to distinguish in code between !warningColor and !saleColor even if they happen to be the same value of red at a given point in time.

Another is increased readability, since scanning a stylesheet and quickly seeing that #f54e4f and #f5e4f4 are very different colors is difficult.

Additionally in Jeff's case constants would allow for one complex stylesheet which maps selectors to constants to be shared across all skins, and then each of the 10 skins can be simply definitions of constants.




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

Search: