Skip to content

Sidebar callout widget CSS specificity issues #35

@siliconforks

Description

@siliconforks

This bug report contains two separate issues, but they're kind of related so I thought I'd report them together.

When I look at the sidebar on the HoverCraft website (example: https://hovercraft.vip/philosophy/), the button has the same color for both the text and the background.

hovercraft

The sidebar on the SlickStack website (example: https://slickstack.io/about) has a similar but slightly different problem. At first the button appears to be working fine.

slickstack

However, when I hover the mouse over the button, the background color becomes the same as the text color. (Note that screenshots on Windows apparently do not capture the mouse pointer, but the screenshot was taken with the mouse pointer hovering over the button.)

slickstack-hover

The problem in both cases appears to be that the sidebar CSS rules have higher specificity than the button's own CSS rules. I'm not sure what is the best way to fix this, but there's a couple of new(ish) CSS features that may be helpful here:

  1. The :where pseudo-class

  2. Cascade layers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions