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

Create separate CSS / LESS files #64

Open
slhck opened this issue Jul 18, 2012 · 0 comments
Open

Create separate CSS / LESS files #64

slhck opened this issue Jul 18, 2012 · 0 comments

Comments

@slhck
Copy link
Member

slhck commented Jul 18, 2012

We could split up bootstrap_and_overrides.css.less.erb into multiple .less files. One would just have to:

  • Convert application.css to application.css.less
  • Delete all the Sprockets directives
  • @import each individual file in the directory from application.css. Do this via require_self and individual requires.
  • Remove the .erb extension from any files that have it, and change ERB asset helpers to less-rails asset helpers.
  • Make sure annotations.css.less is imported after bootstrap_and_overrides – this is why it's usually not a good idea to use require_tree ., since you can't control the order in which the files are loaded. The way you have it now, annotations.css.less would be loaded before bootstrap_and_overrides – before the variable you want to use even exists.

We can use asset-path LESS helpers from the less-rails gem, which is already included.

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

No branches or pull requests

1 participant