Blueprint: Need an `is-active` class for menu-item

Created on 26 Dec 2016  路  6Comments  路  Source: palantir/blueprint

When I click a menu item, I want to keep the item looks focused (actived)

image

core feature request

Most helpful comment

I think we should go with .pt-active to be consistent with how button groups work: http://blueprintjs.com/docs/#components.button-group.css.fill

All 6 comments

I believe the docs site actually uses something like this, agreed that it would be useful to promote this to the core library

Let's agree on one naming for all these things: .pt-active or .pt-selected?

I think we should go with .pt-active to be consistent with how button groups work: http://blueprintjs.com/docs/#components.button-group.css.fill

Currently the default for .pt-menu-item on hover sets background: @blue3. This means that when using .pt-active on one item and hover over another, it'll look pretty awkward (attached). How about we add something like a .pt-selectable to .pt-menu to change the hover and active state colors to what the docs show right now? (I don't like that name, so open to suggestions) @llorca

screen shot 2017-01-16 at 14 13 20

Hmm, .pt-selectable doesn't seem necessary. Items are always selectable (unless they're disabled).

Maybe we can simply update the hover state of menus to be gray? @pkwi what do you think?

I was initially worried about it being troublesome to force the consumer to set the :hover state in the cases where it shouldn't be selectable (eg. in the screenshot). I just realised that's the intention of .pt-intent-primary, so I'm down for the defaults to be like the docs - it also keeps consistency with the default button being grey.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

henrify picture henrify  路  17Comments

zhaoyi0113 picture zhaoyi0113  路  21Comments

zsherman picture zsherman  路  33Comments

adidahiya picture adidahiya  路  18Comments

Hexxeh picture Hexxeh  路  18Comments