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

Allow custom elevation for interactive mode in Card component #3108

Closed
shuyangli opened this issue Nov 1, 2018 · 6 comments
Closed

Allow custom elevation for interactive mode in Card component #3108

shuyangli opened this issue Nov 1, 2018 · 6 comments

Comments

@shuyangli
Copy link
Contributor

Feature request

Currently for the Card component, although we can customize the default elevation, we don't have an easy way to customize the elevation on hover. The current behavior has a couple drawbacks:

  1. for our current use case, the elevation on hover (3) is too high
  2. if the default elevation is 3, hover does nothing even when the card has interactive=true
@giladgray
Copy link
Contributor

@shuyangli we chose not to support this because the whole thing is done elegantly in CSS using :hover and box-shadow variables. customizing the hover requires either awkward JS or a ton more CSS.

@shuyangli
Copy link
Contributor Author

shuyangli commented Nov 16, 2018

Can we instead export the box-shadows variables for all elevations then? My current workaround is to override the :hover css, but the variable doesn't seem to be exported, which makes for sad copy-paste times

@giladgray
Copy link
Contributor

giladgray commented Nov 16, 2018

@shuyangli i got your back https://github.com/palantir/blueprint/blob/develop/packages/core/src/common/_variables.scss#L74-L106

@shuyangli
Copy link
Contributor Author

Oh sweet! That's exactly what I wanted. Do we want to add this to blueprint docs as well?

@giladgray
Copy link
Contributor

@shuyangli
Copy link
Contributor Author

Yeah, I don't see these specific ones on that page - I will submit a PR for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants