Rails 3: Access to twitter bootstrap variables + mixins without importing it

后端 未结 2 665
灰色年华
灰色年华 2021-02-15 15:12

I\'m using Rails 3 for the first time (especially asset pipelining and less-rails-bootstrap), so I might be missing some really basic concept here. I\'ve tried two approaches fo

2条回答
  •  温柔的废话
    2021-02-15 16:07

    I figured out a possible way to do this without leading to (too much) repetition of CSS code.

    application.css

    /*
     *= require twitter/bootstrap
     *= require mystyles
     */
    

    mystyles.css

    @import "twitter/bootstrap/variables.less";
    @import "twitter/bootstrap/mixins.less";
    /* My styles come here, which use variables & mixins defined in twitter bootstrap code */
    

提交回复
热议问题