css - How do I import bootstrap-sass once and use it in several files? -
in docs can read following:
import bootstrap sass file (for example, application.css.scss) of bootstrap's styles, mixins , variables!
@import "bootstrap";
https://github.com/twbs/bootstrap-sass
i have several scss files. 1 every major section of app (user-page.scss, admin.scsss etc).
i tried making 1 application.scss , imported bootstrap in docs. added file in index.html after bootstrap.scss , before other scss files.
<link rel="stylesheet" href="bower_components/bootstrap-sass-official/assets/stylesheets/_bootstrap-compass.scss" /> <link rel="stylesheet" href="styles/application.css"> <link rel="stylesheet" href="styles/intro.css"> <link rel="stylesheet" href="styles/admmin.css">
i next error:
/usr/bin/scss --no-cache --update intro.scss:intro.css error intro.scss (line 22: undefined mixin 'make-row'.)
so seems not find bootstrap. works if import bootstrap in each file. right apporach? think not. problem when seek manually override bootstrap variable.
how can have several scss files , import bootstrap once?
think you're mixing scss import html css links. bit here wrong:
<link rel="stylesheet" href="bower_components/bootstrap-sass-official/assets/stylesheets/_bootstrap-compass.scss" /> <link rel="stylesheet" href="styles/application.css"> <link rel="stylesheet" href="styles/intro.css"> <link rel="stylesheet" href="styles/admmin.css">
i assume built html file. html not know scss file is. scss must processed css file before usable in final html file.
the way import scss file utilize import command inside parent scss file @ top. if main scss file application.scss
, @ top of that, import other scss files:
@import "bootstrap";
but need create sure _bootstrap.scss
file in same directory application.scss
file import work.
css twitter-bootstrap sass
No comments:
Post a Comment