Skip to content

Commit

Permalink
fix(buttons): raised button shadows. Fixes angular#1
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Jul 1, 2014
1 parent 00f2e9f commit 80c7e20
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/components/buttons/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@

&.material-button-raised {
background-color: $button-raised-background;

@extend .material-shadow-bottom-z-1;

&:hover {
background-color: $button-raised-hover-background;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/buttons/demo1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
</section>

<section class="margin">
<button class="material-button material-button-raised">Button</button>
<button class="material-button">Button</button>
<br>
<button class="material-button material-button-raised material-button-colored">Colored</button>
<button class="material-button material-button-colored">Colored</button>
<br>
<div class="label">flat + focused</div>
</section>
Expand Down
6 changes: 3 additions & 3 deletions src/components/card/demo1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<material-content>

<material-card>
<img src="/img/washedout.png" class="material-card-image">
<img src="/dist/docs/img/washedout.png" class="material-card-image">
<h2>Paracosm</h2>
<p>
The titles of Washed Out's breakthrough song and the first single from Paracosm share the
Expand All @@ -13,7 +13,7 @@ <h2>Paracosm</h2>
</material-card>

<material-card>
<img src="/img/washedout.png" class="material-card-image">
<img src="/dist/docs/img/washedout.png" class="material-card-image">
<h2>Paracosm</h2>
<p>
The titles of Washed Out's breakthrough song and the first single from Paracosm share the
Expand All @@ -22,7 +22,7 @@ <h2>Paracosm</h2>
</material-card>

<material-card>
<img src="/img/washedout.png" class="material-card-image">
<img src="/dist/docs/img/washedout.png" class="material-card-image">
<h2>Paracosm</h2>
<p>
The titles of Washed Out's breakthrough song and the first single from Paracosm share the
Expand Down
22 changes: 20 additions & 2 deletions src/theme/_utils.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@mixin theme-bg-and-color($bg, $color) {
background-color: $bg;
color: $color;
background-color: $bg !important;
color: $color !important;
}
@mixin theme-input-text-and-border($color) {
&.material-input-has-value, &.material-input-focused {
Expand Down Expand Up @@ -50,3 +50,21 @@
.material-input-group-theme-orange { @include theme-input-text-and-border($theme-orange); }
.material-input-group-theme-purple { @include theme-input-text-and-border($theme-purple); }
.material-input-group-theme-red { @include theme-input-text-and-border($theme-red); }

.material-shadow {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
border-radius: inherit;
pointer-events: none;
}

.material-shadow-bottom-z-1 {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
}

.material-shadow-animated.material-shadow {
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

0 comments on commit 80c7e20

Please sign in to comment.