News for hackers. Stuff that matters.
Re:CSS Reminification: A crazy idea that worked by saagarjha on Wednesday March 08, 2017 @08:07PM (#13825793)
Oh, is that why I see websites like Facebook and Google using ids like .u-123-gz instead of something like .search-bar?
Re:CSS Reminification: A crazy idea that worked by ht85 on Wednesday March 08, 2017 @08:33PM (#13825970)
That's only a secondary reason, the main reason for this is to avoid having to deal with CSS' "everything is global" flaw.

CSS Modules [1] and other tools allow you to require CSS like you would with any other dependency, and replace named classes by unique hashes at build time. This prevents your CSS from leaking to elements that do not explicitly require it.

[1] https://github.com/css-modules/css-modules