Skip to content

Commit

Permalink
update sass files to match bootstrap v2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
m5o committed Dec 9, 2012
1 parent 369204a commit 0f3dc9c
Show file tree
Hide file tree
Showing 26 changed files with 438 additions and 247 deletions.
14 changes: 14 additions & 0 deletions lib/_alerts.scss
Expand Up @@ -13,6 +13,10 @@
background-color: $warningBackground;
border: 1px solid $warningBorder;
@include border-radius($baseBorderRadius);
}
.alert,
.alert h4 {
// Specified for the h4 to prevent conflicts of changing $headingsColor
color: $warningText;
}
.alert h4 {
Expand All @@ -36,17 +40,27 @@
border-color: $successBorder;
color: $successText;
}
.alert-success h4 {
color: $successText;
}
.alert-danger,
.alert-error {
background-color: $errorBackground;
border-color: $errorBorder;
color: $errorText;
}
.alert-danger h4,
.alert-error h4 {
color: $errorText;
}
.alert-info {
background-color: $infoBackground;
border-color: $infoBorder;
color: $infoText;
}
.alert-info h4 {
color: $infoText;
}


// Block alerts
Expand Down
10 changes: 5 additions & 5 deletions lib/_breadcrumbs.scss
Expand Up @@ -9,14 +9,14 @@
list-style: none;
background-color: #f5f5f5;
@include border-radius($baseBorderRadius);
li {
> li {
display: inline-block;
@include ie7-inline-block();
text-shadow: 0 1px 0 $white;
}
.divider {
padding: 0 5px;
color: #ccc;
> .divider {
padding: 0 5px;
color: #ccc;
}
}
.active {
color: $grayLight;
Expand Down
69 changes: 27 additions & 42 deletions lib/_button-groups.scss
Expand Up @@ -24,9 +24,9 @@
font-size: 0; // Hack to remove whitespace that results from using inline-block
margin-top: $baseLineHeight / 2;
margin-bottom: $baseLineHeight / 2;
.btn + .btn,
.btn-group + .btn,
.btn + .btn-group {
> .btn + .btn,
> .btn-group + .btn,
> .btn + .btn-group {
margin-left: 5px;
}
}
Expand All @@ -40,59 +40,44 @@
margin-left: -1px;
}
.btn-group > .btn,
.btn-group > .dropdown-menu {
.btn-group > .dropdown-menu,
.btn-group > .popover {
font-size: $baseFontSize; // redeclare as part 2 of font-size inline-block hack
}

// Reset fonts for other sizes
.btn-group > .btn-mini {
font-size: 11px;
font-size: $fontSizeMini;
}
.btn-group > .btn-small {
font-size: 12px;
font-size: $fontSizeSmall;
}
.btn-group > .btn-large {
font-size: 16px;
font-size: $fontSizeLarge;
}

// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
.btn-group > .btn:first-child {
margin-left: 0;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
border-top-left-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
border-bottom-left-radius: 4px;
@include border-top-left-radius($baseBorderRadius);
@include border-bottom-left-radius($baseBorderRadius);
}
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
.btn-group > .btn:last-child,
.btn-group > .dropdown-toggle {
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-top-right-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
border-bottom-right-radius: 4px;
@include border-top-right-radius($baseBorderRadius);
@include border-bottom-right-radius($baseBorderRadius);
}
// Reset corners for large buttons
.btn-group > .btn.large:first-child {
margin-left: 0;
-webkit-border-top-left-radius: 6px;
-moz-border-radius-topleft: 6px;
border-top-left-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
border-bottom-left-radius: 6px;
@include border-top-left-radius($borderRadiusLarge);
@include border-bottom-left-radius($borderRadiusLarge);
}
.btn-group > .btn.large:last-child,
.btn-group > .large.dropdown-toggle {
-webkit-border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
border-top-right-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
-moz-border-radius-bottomright: 6px;
border-bottom-right-radius: 6px;
@include border-top-right-radius($borderRadiusLarge);
@include border-bottom-right-radius($borderRadiusLarge);
}

// On hover/focus/active, bring the proper btn to front
Expand Down Expand Up @@ -218,25 +203,25 @@
display: inline-block; // makes buttons only take up the width they need
@include ie7-inline-block();
}
.btn-group-vertical .btn {
.btn-group-vertical > .btn {
display: block;
float: none;
width: 100%;
max-width: 100%;
@include border-radius(0);
}
.btn-group-vertical .btn + .btn {
.btn-group-vertical > .btn + .btn {
margin-left: 0;
margin-top: -1px;
}
.btn-group-vertical .btn:first-child {
@include border-radius(4px 4px 0 0);
.btn-group-vertical > .btn:first-child {
@include border-radius($baseBorderRadius $baseBorderRadius 0 0);
}
.btn-group-vertical .btn:last-child {
@include border-radius(0 0 4px 4px);
.btn-group-vertical > .btn:last-child {
@include border-radius(0 0 $baseBorderRadius $baseBorderRadius);
}
.btn-group-vertical .btn-large:first-child {
@include border-radius(6px 6px 0 0);
.btn-group-vertical > .btn-large:first-child {
@include border-radius($borderRadiusLarge $borderRadiusLarge 0 0);
}
.btn-group-vertical .btn-large:last-child {
@include border-radius(0 0 6px 6px);
.btn-group-vertical > .btn-large:last-child {
@include border-radius(0 0 $borderRadiusLarge $borderRadiusLarge);
}
12 changes: 5 additions & 7 deletions lib/_buttons.scss
Expand Up @@ -14,7 +14,6 @@
margin-bottom: 0; // For input.btn
font-size: $baseFontSize;
line-height: $baseLineHeight;
*line-height: $baseLineHeight;
text-align: center;
vertical-align: middle;
cursor: pointer;
Expand All @@ -30,8 +29,6 @@
&:hover {
color: $grayDark;
text-decoration: none;
background-color: darken($white, 10%);
*background-color: darken($white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
background-position: 0 -15px;

// transition is only when going to hover, otherwise the background
Expand All @@ -47,8 +44,6 @@
// Active state
&.active,
&:active {
background-color: darken($white, 10%);
background-color: darken($white, 15%) \9;
background-image: none;
outline: 0;
@include box-shadow(inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05));
Expand All @@ -58,7 +53,6 @@
&.disabled,
&[disabled] {
cursor: default;
background-color: darken($white, 10%);
background-image: none;
@include opacity(65);
@include box-shadow(none);
Expand All @@ -79,7 +73,7 @@
}
.btn-large [class^="icon-"],
.btn-large [class*=" icon-"] {
margin-top: 2px;
margin-top: 4px;
}

// Small
Expand All @@ -92,6 +86,10 @@
.btn-small [class*=" icon-"] {
margin-top: 0;
}
.btn-mini [class^="icon-"],
.btn-mini [class*=" icon-"] {
margin-top: -1px;
}

// Mini
.btn-mini {
Expand Down
30 changes: 15 additions & 15 deletions lib/_carousel.scss
Expand Up @@ -15,50 +15,50 @@
position: relative;
}

.carousel {
.carousel-inner {

.item {
> .item {
display: none;
position: relative;
@include transition(.6s ease-in-out left);
}

// Account for jankitude on images
.item > img {
> .item > img {
display: block;
line-height: 1;
}

.active,
.next,
.prev { display: block; }
> .active,
> .next,
> .prev { display: block; }

.active {
> .active {
left: 0;
}

.next,
.prev {
> .next,
> .prev {
position: absolute;
top: 0;
width: 100%;
}

.next {
> .next {
left: 100%;
}
.prev {
> .prev {
left: -100%;
}
.next.left,
.prev.right {
> .next.left,
> .prev.right {
left: 0;
}

.active.left {
> .active.left {
left: -100%;
}
.active.right {
> .active.right {
left: 100%;
}

Expand Down
3 changes: 3 additions & 0 deletions lib/_code.scss
Expand Up @@ -19,6 +19,7 @@ code {
color: #d14;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
white-space: nowrap;
}

// Blocks of code
Expand Down Expand Up @@ -46,6 +47,8 @@ pre {
code {
padding: 0;
color: inherit;
white-space: pre;
white-space: pre-wrap;
background-color: transparent;
border: 0;
}
Expand Down
14 changes: 5 additions & 9 deletions lib/_dropdowns.scss
Expand Up @@ -115,6 +115,7 @@
text-decoration: none;
background-color: transparent;
background-image: none; // Remove CSS gradient
@include reset-filter();
cursor: default;
}

Expand Down Expand Up @@ -168,9 +169,7 @@
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px 6px;
border-radius: 0 6px 6px 6px;
@include border-radius(0 6px 6px 6px);
}
.dropdown-submenu:hover > .dropdown-menu {
display: block;
Expand All @@ -182,9 +181,7 @@
bottom: 0;
margin-top: 0;
margin-bottom: -2px;
-webkit-border-radius: 5px 5px 5px 0;
-moz-border-radius: 5px 5px 5px 0;
border-radius: 5px 5px 5px 0;
@include border-radius(5px 5px 5px 0);
}

// Caret to indicate there is a submenu
Expand Down Expand Up @@ -215,9 +212,7 @@
> .dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
@include border-radius(6px 0 6px 6px);
}
}

Expand All @@ -232,6 +227,7 @@
// Typeahead
// ---------
.typeahead {
z-index: 1051;
margin-top: 2px; // give it some space to breathe
@include border-radius($baseBorderRadius);
}

0 comments on commit 0f3dc9c

Please sign in to comment.