Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include css output in vendor.css rather than app.css? #1

Open
jmurphyau opened this issue Dec 6, 2015 · 5 comments
Open

Include css output in vendor.css rather than app.css? #1

jmurphyau opened this issue Dec 6, 2015 · 5 comments

Comments

@jmurphyau
Copy link

One problem with the documented approach in README is all the bootstrap css would go into the app.css rather than the vendor.css ..

I tried getting this working with an in repo addon but i think the order the addons are loading is causing me issues (not 100%)

@ef4
Copy link
Owner

ef4 commented Dec 7, 2015

Do you have a particular use case where it matters whether the scss ends up in app vs vendor? The difficulty is that Sass doesn't really respect such a distinction, so trying to force it ends up forcing people to step outside the Sass conventions.

@jmurphyau
Copy link
Author

I guess it was more so to stick with the Ember convention of vendor css in vendor.css and app css in app.css... I assume it's for allowing more frequently changed code (app.css) to be separated from the less frequently changed stuff (vendor.css) to provide better response & caching/etc when doing updates..

Its likely that once someone sets up the bootstrap stuff they would barely change it - but any update to their app code would incur the cost of re-downloading all the bootstrap code again.

I found this as something very difficult to try and work out how to do. I've ended up going with 3 css files: vendor.css (all addon css), app-vendor.css (my vendor.scss in app/styles) and app.css - by adding another entry in the sassOptions..

@ef4
Copy link
Owner

ef4 commented Dec 8, 2015

I think we can probably create a convention with a separate top-level file that goes into vendor. Something like app/styles/bootstrap.scss that's intended for just imports of bootstrap modules.

@jmurphyau
Copy link
Author

sounds like a good idea

@miguelcobain
Copy link

miguelcobain commented Jun 2, 2016

Sorry for bringing this up again. This happens in other projects as well.
Isn't it important for these styles to end up in vendor.css? Think, cache invalidations?

I assume that app-land css changes are more frequent. So, when such a change happens, the whole file invalidates and all the bootstrap styles are redownloaded with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants