Rails 4: how do I use Sass Mappings?
As @dinocarl kindly pointed out, the map
and list
features of SASS are in version 3+. I had to upgrade sass-rails
gem to version 5+ because that version of the gem packages SASS 3+. Worked like a charm after I upgraded the gem version (also were few additional dependencies I had to update).
Sass source map support on chrome isn't working
Try following the tutorial in this link. I just set this up this morning and it's working fine for me.
This will let you inspect an element and then find what the corresponding SCSS declaration is.
SASS, Rails 3.1: Loading stylesheets in vendor/assets
If I'm understanding you correctly, I think this might help.
Add the following to config/application.rb
, inside the class Application < Rails::Application
block:
config.sass.load_paths << File.expand_path('../../lib/assets/stylesheets/')
config.sass.load_paths << File.expand_path('../../vendor/assets/stylesheets/')
I've just added the above to an app, and the following directives are now both working:
- Import Sass:
@import 'grid'
inapp/assets/stylesheets/application.css.scss
finds the filevendor/assets/stylesheets/_grid.scss
; - Import regular CSS:
@import 'background'
, again inapplication.css.scss
, findsvendor/assets/stylesheets/background.css
.
Does that help? Sorry if I've misunderstood the problem!
Related Topics
Allowed Characters for CSS Identifiers
Bootstrap Modal Sitting Behind Backdrop
Hover on Child Without Hover Effect on Parent
Multiple Font-Weights, One @Font-Face Query
Webfont Smoothing and Antialiasing in Firefox and Opera
Select Inputs and Text Inputs in HTML - Best Way to Make Equal Width
Why Don't Margin-Top: Auto and Margin-Bottom:Auto Work the Same as Their Left and Right Counterparts
::Before Pseudo-Element Stacking Order Issue
How to Implement Wordwrap on Jqgrid Which Works on IE7, IE8 and Ff
CSS Selector to Get Deepest Element of Specific Class in the HTML Tree
Can Type Selectors Be Repeated to Increase Specificity
Why Does Stacking Order Change on Webkit Filter Hover
Is Box Sizing Inherited If Declared Inside Universal Selector