Skip to content

An extra keyword to disable inheritance? #9531

@simevidas

Description

@simevidas

The blog https://nerdy.dev/ has a transparent retractable sticky nav bar with a few buttons and links on the side. Since the bar is transparent, the website uses the following styles to allow the mouse cursor to go through the “empty” parts of the bar:

.Nav {
  pointer-events: none;
}

.Nav > * {
  pointer-events: auto;
}

This works, but I think the code would be more readable and robust if we didn’t have to set and unset none in two steps. Imagine if there existed an optional keyword that disabled inheritance for a declaration.

.Nav {
  pointer-events: none no-inherit;
}

Does something like this exist?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions