Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Only semi-relevant, but this is possible with SASS’s @extend: https://sass-lang.com/documentation/at-rules/extend



Because the output is still CSS, this would lead to a lengthened (redundant) selector though. Also, AFAIK it would be impossible with a class that is not part of your SCSS tree. If you are able to import the library CSS in to your own SCSS, OK, no problem. But that would introduce unneeded complexity. If using a bundler and one output file, copying the library CSS rules and applying them to your own could maybe even lead to the same output as @extend - a combined selector

.warn, warning

(you already kind of addressed all of that already in your "semi-relevant" disclaimer)


> (you already kind of addressed all of that already in your "semi-relevant" disclaimer)

You make some good points, and I wish I could still edit it to "kind of possible" ;)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: