How to reuse (extend) bootstrap css classes in rails/sass -


In the core SCSS file

I import "Boostrop" which also imports other SCSS files (Example: _modals.css) .

In modals.css, I want to expand some Bootstrap sections:

  .modal-container {@extend .row; }   

and the extension does not work as expected:

on line 42 ...... / _ modals.css.scss Warning: "Line" "extension". The selector ".row" was not found. If this should be an error in Sass's future release, if the extension should be able to fail, then use "@extend .row! Optional".

  • The only way I can do this is to import "bootstrap" again in _modals.scss but it actually includes full bootstrap inside this file ...

    All other problems that define CSS in the core CSS file - in this case - CSS is very less structured ...

    How should I do this properly? The problem was because I imported the files through the sass / require_tree command.

    The problem was because I imported the files through the sass / require_tree command.

      @import "autoinclude / *";    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -