Blueprint: Allow custom elevation for interactive mode in Card component

Created on 1 Nov 2018  路  6Comments  路  Source: palantir/blueprint

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
core feature request

Most helpful comment

@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.

All 6 comments

@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.

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adidahiya picture adidahiya  路  3Comments

adidahiya picture adidahiya  路  3Comments

havesomeleeway picture havesomeleeway  路  3Comments

westrem picture westrem  路  3Comments

giladgray picture giladgray  路  3Comments