Skip to content

[css-pseudo] Click or Tap Location #12172

Open
@Crissov

Description

@Crissov

As part of the highlight pseudo-elements I think it might be helpful to introduce an empty pseudo-element that was located at the point of a mouse click or area of a finger tap, e.g. ::hit. This would enable authors to add visual clues for when and where a pointer interaction has happened, which is especially helpful in presentations for other spectators, although some users also employ it as an accessibility hint for themselves. Unlike OS or app features, a CSS-native solution could interact with other Selectors, so a click on a button or link could be styled differently than one on a paragraph, for instance.

I believe it has been proposed, but not added yet to css-anchor, to make the mouse pointer position a predefined and dynamic anchor reference. Combined with :active, this might look like a possible alternative, but it would involve another element box, whereas a designated pseudo-element could be styled directly. On the other hand, ::hit could solve this if it could be an anchor element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions