Skip to content

Commit

Permalink
Fixes twbs#6935: Use standard decimal points for .opacity() mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Mar 1, 2013
1 parent 0dea8b0 commit b19eb88
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 12 deletions.
3 changes: 2 additions & 1 deletion docs/assets/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -3095,7 +3095,7 @@ button.close {
.nav li.dropdown.open a:hover .caret {
border-top-color: #fff;
border-bottom-color: #fff;
.opacity(100);
.opacity(1);
}
// Dropdowns in stacked tabs
Expand Down Expand Up @@ -3839,6 +3839,7 @@ button.close {

.modal-backdrop.fade {
opacity: 0;
filter: alpha(opacity=0);
}

.modal-backdrop.fade.in {
Expand Down
2 changes: 1 addition & 1 deletion less/buttons.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
&[disabled],
fieldset[disabled] & {
cursor: default;
.opacity(65);
.opacity(.65);
.box-shadow(none);
}

Expand Down
4 changes: 2 additions & 2 deletions less/carousel.less
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
left: 0;
bottom: 0;
width: 15%;
.opacity(50);
.opacity(.5);
font-size: 20px;
color: #fff;
text-align: center;
Expand Down Expand Up @@ -105,7 +105,7 @@
&:focus {
color: #fff;
text-decoration: none;
.opacity(90);
.opacity(.9);
}

// Toggles
Expand Down
4 changes: 2 additions & 2 deletions less/close.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
line-height: @line-height-base;
color: #000;
text-shadow: 0 1px 0 rgba(255,255,255,1);
.opacity(20);
.opacity(.2);
&:hover,
&:focus {
color: #000;
text-decoration: none;
cursor: pointer;
.opacity(50);
.opacity(.5);
}
}

Expand Down
6 changes: 4 additions & 2 deletions less/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,10 @@

// Opacity
.opacity(@opacity) {
opacity: @opacity / 100;
filter: ~"alpha(opacity=@{opacity})"; // IE8
opacity: @opacity;
// IE8 filter
@opacity-ie: @opacity * 100;
filter: ~"alpha(opacity=@{opacity-ie})";
}


Expand Down
4 changes: 2 additions & 2 deletions less/modals.less
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
z-index: @zindex-modal-background - 10;
background-color: #000;
// Fade for backdrop
&.fade { opacity: 0; }
&.fade.in { .opacity(50);}
&.fade { .opacity(0); }
&.fade.in { .opacity(.5); }
}

// Modal header
Expand Down
2 changes: 1 addition & 1 deletion less/navs.less
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
.nav li.dropdown.open a:hover .caret {
border-top-color: #fff;
border-bottom-color: #fff;
.opacity(100);
.opacity(1);
}
// Dropdowns in stacked tabs
Expand Down
2 changes: 1 addition & 1 deletion less/tooltip.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
line-height: 1.4;
.opacity(0);

&.in { .opacity(100); }
&.in { .opacity(1); }
&.top { margin-top: -3px; padding: 5px 0; }
&.right { margin-left: 3px; padding: 0 5px; }
&.bottom { margin-top: 3px; padding: 5px 0; }
Expand Down

0 comments on commit b19eb88

Please sign in to comment.