Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
CSS Cascade Layers (ishadeed.com)
11 points by soheilpro on Feb 12, 2022 | hide | past | favorite | 1 comment


I couldn't get past 'The Problem' because it omits the simplest solution which would be to rename '.button--facebook' to '.button.button--facebook'.

In fact, you could then remove the duplicate 'color: #fff' declaration.

Furthermore, I'd redeclare '.button--ghost' as '.button.button--ghost'. In some editors, like Visual Studio, when you place rules in order and press CTRL+K+D, it will indent them in the form of a tree.




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

Search: