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

Changing up the look of box-shadows #607

Merged
merged 4 commits into from
Apr 2, 2018
Merged

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Mar 30, 2018

  • Shadow mixins now accept optional color and opacity arguments
  • Slight difference on small shadows
  • Button shadows now get a tint of the button’s main color
  • Small overlaying comps have slightly dark shadows but the also not bleed horizontally (not just below)
  • Large overlaying comps (like Modals) have much more pronounced shadows. Also had to alter the border colors a bit on these so that there is a crisp line before the shadow starts. With the default border it was fuzzy.
  • Had to add some new variables pertaining to shadows for better theming control.

Examples:

Primary button hover state. See the slight blue tint to from the primary style.

screen shot 2018-03-30 at 17 07 49 pm

Context menu/popover See the shadow is visible on the sides as well.

screen shot 2018-03-30 at 17 08 42 pm

Modals Large stylized shadow

screen shot 2018-03-30 at 17 08 54 pm

And in dark mode too

screen shot 2018-03-30 at 17 09 24 pm

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

The side shadow helps and the color is a nice touche. Big improvements.

I like softer shadows when they get further away so I'd change euiBottomShadow to .15 and euiBottomShadowLarge to .1 opacity.

Then the shadows kind of scale as they go up the "z".

I know these kind of comments can get subjective so feel free to ask another designer for their opinion if that doesn't sound right.

@cchaos
Copy link
Contributor Author

cchaos commented Apr 2, 2018

I do understand what you are saying, but I feel like that's leaning towards skeuomorphism, and that's not really what we're going for here. We're using shadows to emphasize and to distinguish it's self from other content (especially when it comes to overlays).

For example, here is the modal with .2 opacity (left) and .1 opacity (right). We're really losing that separation between object and background.

screen shot 2018-04-02 at 11 27 33 am

Same with flyout.

screen shot 2018-04-02 at 11 27 43 am

The other option is to increase the opacity at the smaller scales but then I think we're emphasizing the shadow too much.

It's definitely a give and take here about how we're using shadows. I spent almost a full day playing with opacities and spreads and I really feel like these are a good balance of aesthetics and utility.

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

I don't feel as strongly about it to hold it up. Sounds good to me.

cchaos added 3 commits April 2, 2018 12:54
- Slight difference on small shadows
- Button shadows now get a tint of the button’s main color
- Small overlaying comps have slightly dark shadows but the also not bleed horizontally (not just below)
- Large overlaying comps (like Modals) have much more pronounced shadows.
- Had to add some new variables pertaining to shadows for better theming control.
@cchaos cchaos merged commit 350b0d5 into elastic:master Apr 2, 2018
@cchaos cchaos deleted the shadows branch April 2, 2018 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants