Components: Unable to remove box shadow on md-card with class

Created on 9 Apr 2017  Â·  4Comments  Â·  Source: angular/components

Bug, feature request, or proposal:

Bug: Unable to remove box shadow with the addition of a class

What is the expected behavior?

Adding class "noshadow" to md-card with box-shadow: none should remove the box-shadow

What is the current behavior?

Class .noshadow is overriden by fix introduced in beta.3 https://github.com/angular/material2/commit/4ee16a93877af706dca13232d3cc1b9117bd782e#diff-9389c93dca7121685381d0e9e8e96ff3 by @crisbeto @andrewseguin - do either of you have a simple suggestion to keep the elevation fix while preventing the override to the standard md-card? Not sure what the issue was from before and if there's a way to fix this without breaking your use case.

What are the steps to reproduce?

Providing a Plunker (or similar) is the best way to get the team to see your issue.
http://plnkr.co/edit/dIBG9U58CqTrRSoxgq0g?p=preview

What is the use-case or motivation for changing an existing behavior?

Attempting to change back the ability to use a css class to adjust the box shadow (which existed prior to this breaking with a change introduced)

Which versions of Angular, Material, OS, browsers are affected?

Material beta.3
Chrome 57.0

Is there anything else we should know?

Currently able to override with !important, but that doesn't seem to be the best solution.

Most helpful comment

Try adding .mat-elevation-z0? It may not fix the root problem, but is a cleaner workaround than !important.

All 4 comments

Try adding .mat-elevation-z0? It may not fix the root problem, but is a cleaner workaround than !important.

@willshowell is right; adding .mat-elevation-z0 is the best way to remove the shadow.

Great, thank you!

From: Jeremy Elbourn notifications@github.com
Reply-To: angular/material2 reply@reply.github.com
Date: Tuesday, April 11, 2017 at 4:47 PM
To: angular/material2 material2@noreply.github.com
Cc: Vijay Goel vijay@goelinsights.com, Author author@noreply.github.com
Subject: Re: [angular/material2] Unable to remove box shadow on md-card with class (#3990)

@willshowell is right; adding .mat-elevation-z0 is the best way to remove the shadow.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

julianobrasil picture julianobrasil  Â·  3Comments

michaelb-01 picture michaelb-01  Â·  3Comments

vitaly-t picture vitaly-t  Â·  3Comments

3mp3ri0r picture 3mp3ri0r  Â·  3Comments

alanpurple picture alanpurple  Â·  3Comments