Q&A: Aphrodite vs CSS Modules?
TRACK

Q&A: Aphrodite vs CSS Modules?

00:00

My friend Matt Winchester (https://twitter.com/mwinche) asked me (https://twitter.com/mwinche/status/718282311918362625) what I think of
Aphrodite (https://github.com/Khan/aphrodite) compared to css-modules (https://github.com/css-modules/css-modules). Here's my answer.
Here's an example of me migrating from CSS (processed with PostCSS (https://github.com/postcss/postcss)) to Aphrodite: https://github.com/javascriptair/site/commit/d8b8bf349f6c94a1d00539bb285240615baf5b7d (https://github.com/javascriptair/site/commit/d8b8bf349f6c94a1d00539bb285240615baf5b7d)
Oh! And one other thing I didn't mention as a benefit of Aphrodite that can be a killer feature is because your CSS is colocated with the components that are using it, you can ship only the styles that are needed and used, rather than shipping ALL of your styles. A lot of problems go away when you have an explicit relationship between your styles and your components πŸ‘
I hope this is helpful :-) Feel free to ask more questions on my

Comments

00:00