I'm quite new to this, but i cannot figure out the problem.
In twitter bootstrap i would use :
<div class="row-fluid">
<div class="span2">Column1</div>
<div class="span6">Column2</div>
</div>
And it all works fine. But i do not want to write spanX and spanY directly into my html file, rather i would like to give meaningful class names, for example:
<div class="user-container">
<div class="user-filter">First Column</div>
<div class="user-list">Second Column</div>
</div>
Given the fact, that i'm using https://github.com/thomas-mcdonald/bootstrap-sass, how should i write my scss file? I've tried the following, and it does not work (two columns are not displayed):
@import "bootstrap";
@import "bootstrap-responsive";
.user-container {
@extend .row-fluid;
}
.user-filter {
@extend .span2;
}
.user-list {
@extend .span10;
}
If i look at the generated code, it seems to me that everything should be ok:
/* line 164, ../../../../../.rvm/gems/ruby-1.9.3-p125/gems/bootstrap-sass-2.0.0/vendor/assets/stylesheets/bootstrap/_mixins.scss */
.span2, .user-filter {
width: 140px;
}
and so on.
What am i doing wrong?
UPDATE:
ok, just to be clear what is wrong - the columns are laid out as rows (one after another) rather like true columns (one next to each other), eg.:
with bootstrap: Column1 Column2
with my custom classes:
First Column
Second Column
I've inspected the elements layout in Chrome and it seems that bootstrap classes have float property, and mine - no. Looking at css source i see classes like this:
[class*="span"] {
float: left;
margin-left: 20px;
}
So in my case i think it should generate something like : [class*="user-filter"] { float: left; margin-left: 20px; }
or not?