Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(elevation): Add elevation core styles #222

Closed

Conversation

traviskaufman
Copy link
Contributor

This commit replaces _shadows.scss within src/core/styles with
_elevation.scss, according to the proposed design outlined
here. All components that were dependent on the
old shadows have been modified to use elevation. Note however that none
of the values in those old components have been changed; it's simply a
to the new API.

Part of #48.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 22, 2016
// `md-elevation-z$zValue` where `$zValue` correspond to the z-space in which the element is
// elevated to.
@for $zValue from 0 through 24 {
.md-elevation-z#{$zValue} {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Material 1, we deprecated the z suffix, and decided to use dp. Is here another background?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I talk about this in the design doc. Essentially, z-space makes more sense to speak about elevation on the web platform. dp works great for a design spec but possibly isn't as semantic for web developers.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. dp always remembers me on a native app. Device Specific unit etc. I was just curious, because we deprecated those in Material 1.

* https://goo.gl/Kq0k9Z.
*/

$_umbra-color: rgba(black, 0.2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you able to comment on what each of umbra, penumbra and ambient mean?

@jelbourn
Copy link
Member

@traviskaufman The CI is failing due to the ``` characters in elevation.scss, which the inline-resources utility can't cope with.

This commit replaces `_shadows.scss` within `src/core/styles` with
`_elevation.scss`, according to the proposed design outlined
[here](https://goo.gl/Kq0k9Z). All components that were dependent on the
old shadows have been modified to use elevation. Note however that none
of the values in those old components have been changed; it's simply a
to the new API.

Part of angular#48.
@traviskaufman
Copy link
Contributor Author

@jelbourn all changes made and CI issue fixed

I moved the exported CSS classes into src/core/style/core.scss. I'm not sure if that's the best place to put it, but I noticed that src/core/style was on the load path and it reflects the name of the module as well. That being said do you think it would make more sense to simply put it in src/core?

@@ -0,0 +1,12 @@
// Core styles that can be used to apply material design treatments to any element.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good for now, but FYI I'm going to move it to src/main.scss once my outstanding PR lands.

@jelbourn
Copy link
Member

LGTM

Would be good if one of @kara / @hansl / @robertmesserle also took a look

@hansl
Copy link
Contributor

hansl commented Mar 24, 2016

👍 this LGTM.

@ross-nordstrom
Copy link

At risk of getting the famous "we haven't done theming yet" response, is there a way to use md-elevation in apps using Material2?

@Splaktar Splaktar mentioned this pull request Jan 25, 2017
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
alexeagle pushed a commit to alexeagle/material2 that referenced this pull request Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants