Hello. What is the advantage of CSS modules versus scoped CSS?
Or what is the disadvantage of scoped CSS versus CSS modules?
Instead of file-scope, I use the main tag (a div) and in .js:
@gly: Off the top of my head, Iād say the number one advantage is browser support - Firefox is the only major browser that supports the scoped attribute. CSS modules works in all of the browsersā¦
Thank you. Now I understand the problem. Just a note: although it is not everywhere reported, chrome (20+) does support it (I use chrome for my tests): mozilla.org
EDIT: scoped was available in chrome, but it has been removed (google engineers removed it because of the code complexity). It works in my application probably because there is no collision.
@nathantreid, I have just installed your module with sugarss supportā¦ Well, now I pray for you! I have sugarss set to be as much similar to stylus as possible, so now I can say that I can easily use modular stylus w/o stylus itself. It works great!
Iāve started releasing 1.3.0 with sugarssā¦ unfortunately the Meteor build servers are being difficult again, so only the Linux versions are live right now.
After many build failures, I gave up on 1.3.0, and I just now released 2.0.2. As of 2.0.0, the node-sass, stylus, and sugarss npm packages are no longer bundled with the app, allowing the user to only install the ones they need via meteor npm install.
It also means I donāt have to use the Meteor build servers anymore, so publishing only takes 1 command and 30 seconds.
Finally got it! v2.1.0 includes support for .css files.
I was supposed to enjoy some light reading tonight before bed but instead my brain got caught on the .css issue and wouldnāt let go until I finished (that was about 4 hours ago, oopsā¦). Anyway, I dug into the build plugin system again and this time it clicked.
Just replied on the issue, but Iāll repost it here as well so others can see it:
Given the error message:
While processing files with nathantreid:css-modules (for target
web.browser):
/Users/thomasgoldenberg/.meteor/packages/nathantreid_css-modules/.2.1.0.x581y4++os+web.browser+web.cordova/plugin.mss.os/npm/node_modules/meteor/mss/node_modules/postcss/lib/input.js:61:22:
/Users/thomasgoldenberg/Desktop/agolo/agolo-v2/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css:14:1:
Unknown word
at Input.error
I am trying to integrate react-toolbox with meteor 1.4.2. I have followed all the steps you have mentioned, but whenever I import a component, I get the following error in the browser console.
So the issue with my project was that setting the specificArchitecture option with either āosā or false was causing scss import issues. Iāve reported the issue under the main repo here, waiting to hear back. Hopefully this provides a temporary solution for others.
Yeap, I just removed specificArchitecture from package.json entirely. So that means the server side of things right now, and it seems like Nathan is working on the issue. I referenced the open issue in my previous message above if you want to take a look.