Skip to content

Commit

Permalink
fix for #294
Browse files Browse the repository at this point in the history
  • Loading branch information
FezVrasta authored and FezVrasta committed Dec 18, 2014
1 parent d5d44ac commit 98a54cc
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 2,940 deletions.
1,379 changes: 1 addition & 1,378 deletions dist/css/material-wfont.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/material-wfont.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/material-wfont.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/material-wfont.min.css.map

Large diffs are not rendered by default.

1,379 changes: 1 addition & 1,378 deletions dist/css/material.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/material.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/material.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/material.min.css.map

Large diffs are not rendered by default.

154 changes: 77 additions & 77 deletions less/_buttons.less
Original file line number Diff line number Diff line change
@@ -1,109 +1,109 @@
.btn {
position: relative;
padding: 8px 30px;
border: 0;
margin: 10px 1px;
cursor: pointer;
border-radius: 2px;
text-transform: uppercase;
text-decoration: none;
color: @darkbg-text;
position: relative;
padding: 8px 30px;
border: 0;
margin: 10px 1px;
cursor: pointer;
border-radius: 2px;
text-transform: uppercase;
text-decoration: none;
color: @darkbg-text;

&:hover:not(.btn-link):not(.btn-flat) {
.shadow-z-2-hover();
}
&:active:not(.btn-link):not(.btn-flat) {
.shadow-z-3();
}
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
outline: none !important;
&:hover:not(.btn-link):not(.btn-flat) {
.shadow-z-2-hover();
}
&:active:not(.btn-link):not(.btn-flat) {
.shadow-z-3();
}
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
outline: none !important;

.variations(~".btn-flat:not(.btn-link)", color, @lightbg-text);
.variations(~".btn-flat:not(.btn-link)", color, @lightbg-text);

.background-variations(~":not(.btn-link):not(.btn-flat)", @btn-default);

&.btn-flat {
background: none;
box-shadow: none;
font-weight: 500;
&:disabled {
color: @text-disabled !important;
}
&.btn-flat {
background: none;
box-shadow: none;
font-weight: 500;
&:disabled {
color: @text-disabled !important;
}
}

&.btn-raised {
.btn-shadow();
}
&.btn-raised {
.btn-shadow();
}

&.btn-fab {
margin: 0;
padding: 15px;
font-size: 26px;
width: 56px;
height: 56px;
&, &:hover {
.shadow-z-1();
.variations(~"", background-color, transparent);
}
&, .ripple-wrapper {
border-radius: 100%;
}
&.btn-fab-mini {
width: 40px;
height: 40px;
padding: 13px;
font-size: 15px;
}
i {
position: relative;
top: -5px;
}
&.btn-fab {
margin: 0;
padding: 15px;
font-size: 26px;
width: 56px;
height: 56px;
&, &:hover {
.shadow-z-1();
.variations(~"", background-color, transparent);
}
&, .ripple-wrapper {
border-radius: 100%;
}
&.btn-fab-mini {
width: 40px;
height: 40px;
padding: 13px;
font-size: 15px;
}
i {
position: relative;
top: -5px;
}
}
}

// This is needed to style buttons which has not a variation suffix (they must be stiled as btn-default)
.btn-link, .btn:not([class^="btn btn-"]), .btn-default {
color: @lightbg-text;
&:hover {
color: @lightbg-text;
&:hover {
color: @lightbg-text;
}
}
}
.btn:not([class^="btn btn-"]), .btn-default, .btn-flat:not(.btn-link) {
&:hover, &.active {
background-color: rgba(255,255,255,0.5);
}
&:hover, &.active {
background-color: rgba(255,255,255,0.5);
}
}
.open > .dropdown-toggle.btn {
.variations(~"", background-color, @btn-default);
.variations(~"", background-color, @btn-default);
}
.btn-group .btn+.btn, .btn-group .btn+.btn-group, .btn-group .btn-group+.btn, .btn-group .btn-group+.btn-group {
margin-left: 0;
}
.btn-group, .btn-group-vertical {
position: relative;
border-radius: 2px;
margin: 10px 1px;
position: relative;
border-radius: 2px;
margin: 10px 1px;

.btn-shadow();
&.open .dropdown-toggle {
box-shadow: none;
}
&.btn-group-raised {
.btn-shadow();
&.open .dropdown-toggle {
box-shadow: none;
}
&.btn-group-raised {
.btn-shadow();
}
.btn, .btn:active, .btn-group {
box-shadow: none !important;
margin: 0;
}
}
.btn, .btn:active, .btn-group {
box-shadow: none !important;
margin: 0;
}
}
.btn-group-flat {
box-shadow: none !important;
box-shadow: none !important;
}

.btn-shadow() {
.shadow-z-1();
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
&:active:not(.btn-link) {
.shadow-z-3();
}
.shadow-z-1();
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
&:active:not(.btn-link) {
.shadow-z-3();
}
}
149 changes: 48 additions & 101 deletions less/_mixins.less
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
// usage: .variations(~" .check", color, transparent);
.variations(@extra, @property, @default) {

// Bootstrap shades
&@{extra}, &-default@{extra} {
@{property}: @default;
}
&-primary@{extra} {
@{property}: @primary;
}
&-success@{extra} {
@{property}: @success;
}
&-info@{extra} {
@{property}: @info;
}
&-warning@{extra} {
@{property}: @warning;
}
&-danger@{extra} {
@{property}: @danger;
}
// Bootstrap shades
&@{extra}, &-default@{extra} {
@{property}: @default;
}
&-primary@{extra} {
@{property}: @primary;
}
&-success@{extra} {
@{property}: @success;
}
&-info@{extra} {
@{property}: @info;
}
&-warning@{extra} {
@{property}: @warning;
}
&-danger@{extra} {
@{property}: @danger;
}


.variations-factory(@material-color) {
.variations-factory-deep(@material-color-number) {

&-material-@{material-color}@{material-color-number}@{extra} {
@final-color: "@{material-color}@{material-color-number}";
@{property}: @@final-color;
@{property}: @@final-color;
}

}
Expand Down Expand Up @@ -67,63 +67,6 @@
.variations-factory(~"grey");
.variations-factory(~"blue-grey");

/*
// Material shades
&-material-red@{extra} {
@{property}: @red;
}
&-material-pink@{extra} {
@{property}: @pink;
}
&-material-purple@{extra} {
@{property}: @purple;
}
&-material-deeppurple@{extra} {
@{property}: @deeppurple;
}
&-material-indigo@{extra} {
@{property}: @indigo;
}
&-material-blue@{extra} {
@{property}: @blue;
}
&-material-lightblue@{extra} {
@{property}: @lightblue;
}
&-material-cyan@{extra} {
@{property}: @cyan;
}
&-material-teal@{extra} {
@{property}: @teal;
}
&-material-lightgreen@{extra} {
@{property}: @lightgreen;
}
&-material-lime@{extra} {
@{property}: @lime;
}
&-material-lightyellow@{extra} {
@{property}: @lightyellow;
}
&-material-orange@{extra} {
@{property}: @orange;
}
&-material-deeporange@{extra} {
@{property}: @deeporange;
}
&-material-grey@{extra} {
@{property}: @grey;
}
&-material-bluegrey@{extra} {
@{property}: @bluegrey;
}
&-material-brown@{extra} {
@{property}: @brown;
}
&-material-lightgrey@{extra} {
@{property}: @lightgrey;
}
*/
}

.background-variations(@extra, @default) {
Expand All @@ -132,28 +75,32 @@

.set-background-and-font-color(@bg-color) {
background-color: @bg-color;

color: contrast(@bg-color, @lightbg-text, @darkbg-text, @contrast-factor);
& when (@bg-color = @btn-default) {
color: @lightbg-text;
}
}

// bootstrap styles
&@{extra}, &-default@{extra} {
&@{extra}, &-default@{extra} {
.set-background-and-font-color(@default);
}
&-primary@{extra} {
}
&-primary@{extra} {
.set-background-and-font-color(@primary);
}
&-success@{extra} {
}
&-success@{extra} {
.set-background-and-font-color(@success);
}
&-info@{extra} {
}
&-info@{extra} {
.set-background-and-font-color(@info);
}
&-warning@{extra} {
}
&-warning@{extra} {
.set-background-and-font-color(@warning);
}
&-danger@{extra} {
}
&-danger@{extra} {
.set-background-and-font-color(@danger);
}
}

// given a color build multiples dephs
.background-variations-factory(@material-color) {
Expand Down Expand Up @@ -217,24 +164,24 @@
}

// bootstrap styles
&@{extra}, &-default@{extra} {
&@{extra}, &-default@{extra} {
.set-font-color(@default);
}
&-primary@{extra} {
}
&-primary@{extra} {
.set-font-color(@primary);
}
&-success@{extra} {
}
&-success@{extra} {
.set-font-color(@success);
}
&-info@{extra} {
}
&-info@{extra} {
.set-font-color(@info);
}
&-warning@{extra} {
}
&-warning@{extra} {
.set-font-color(@warning);
}
&-danger@{extra} {
}
&-danger@{extra} {
.set-font-color(@danger);
}
}

// given a color build multiples dephs
.background-variations-factory(@material-color) {
Expand Down

0 comments on commit 98a54cc

Please sign in to comment.