porting bootstrap.scss from scratch

This commit is contained in:
davegandy 2013-06-12 10:49:37 -04:00
parent 8033f2571f
commit fb07367e33
2 changed files with 24 additions and 66 deletions

View File

@ -32,68 +32,47 @@
background-image: none; background-image: none;
} }
/* keeps Bootstrap styles with and without icons the same */ /* keeps Bootstrap styles with and without icons the same */
.btn, .nav { .btn, .nav {
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
//display: inline // display: inline;
&.icon-large { &.icon-large { line-height: .9em; }
line-height: 0.9em; &.icon-spin { display: inline-block; }
}
&.icon-spin {
display: inline-block;
} }
} }
}
.nav-tabs, .nav-pills { .nav-tabs, .nav-pills {
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
&, &.icon-large { &, &.icon-large { line-height: .9em; }
line-height: 0.9em;
} }
} }
}
.btn { .btn {
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
&.pull-left, &.pull-right { &.pull-left, &.pull-right {
&.icon-2x { &.icon-2x { margin-top: .18em; }
margin-top: 0.18em; }
&.icon-spin.icon-large { line-height: .8em; }
} }
} }
&.icon-spin.icon-large {
line-height: 0.8em;
}
}
}
.btn.btn-small { .btn.btn-small {
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
&.pull-left, &.pull-right { &.pull-left, &.pull-right {
&.icon-2x { &.icon-2x { margin-top: .25em; }
margin-top: 0.25em;
} }
} }
} }
}
.btn.btn-large { .btn.btn-large {
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
margin-top: 0; margin-top: 0; // overrides bootstrap default
&.pull-left, &.pull-right { &.pull-left, &.pull-right {
&.icon-2x { &.icon-2x { margin-top: .05em; }
margin-top: 0.05em; }
} &.pull-left.icon-2x { margin-right: .2em; }
} &.pull-right.icon-2x { margin-left: .2em; }
&.pull-left.icon-2x {
margin-right: 0.2em;
}
&.pull-right.icon-2x {
margin-left: 0.2em;
}
} }
} }

View File

@ -32,68 +32,47 @@
background-image: none; background-image: none;
} }
/* keeps Bootstrap styles with and without icons the same */ /* keeps Bootstrap styles with and without icons the same */
.btn, .nav { .btn, .nav {
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
//display: inline // display: inline;
&.icon-large { &.icon-large { line-height: .9em; }
line-height: 0.9em; &.icon-spin { display: inline-block; }
}
&.icon-spin {
display: inline-block;
} }
} }
}
.nav-tabs, .nav-pills { .nav-tabs, .nav-pills {
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
&, &.icon-large { &, &.icon-large { line-height: .9em; }
line-height: 0.9em;
} }
} }
}
.btn { .btn {
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
&.pull-left, &.pull-right { &.pull-left, &.pull-right {
&.icon-2x { &.icon-2x { margin-top: .18em; }
margin-top: 0.18em; }
&.icon-spin.icon-large { line-height: .8em; }
} }
} }
&.icon-spin.icon-large {
line-height: 0.8em;
}
}
}
.btn.btn-small { .btn.btn-small {
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
&.pull-left, &.pull-right { &.pull-left, &.pull-right {
&.icon-2x { &.icon-2x { margin-top: .25em; }
margin-top: 0.25em;
} }
} }
} }
}
.btn.btn-large { .btn.btn-large {
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
margin-top: 0; margin-top: 0; // overrides bootstrap default
&.pull-left, &.pull-right { &.pull-left, &.pull-right {
&.icon-2x { &.icon-2x { margin-top: .05em; }
margin-top: 0.05em; }
} &.pull-left.icon-2x { margin-right: .2em; }
} &.pull-right.icon-2x { margin-left: .2em; }
&.pull-left.icon-2x {
margin-right: 0.2em;
}
&.pull-right.icon-2x {
margin-left: 0.2em;
}
} }
} }