Skip to content

Hovercolor should not apply on mobile #203

@EconomicTouristsArmLate

Description

@EconomicTouristsArmLate

The :hover state on mobile is sticky after a click on an element.

Thus it is undesirable to have a separate hover color applied to buttons etc on mobile.

This is especially jarring on active-btn / inactive-btn, where the hover color introduces a third visual state that is unexplainable for users.

cropped.mp4

You should only apply hover colors on desktop.
To do so use something like media query any-hover

@media (any-hover: hover) {
  .p-button:hover { ... }
}

Issue encountered in primeng v20.3.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions