Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar callout widget CSS specificity issues #35

Open
siliconforks opened this issue Jan 18, 2024 · 3 comments
Open

Sidebar callout widget CSS specificity issues #35

siliconforks opened this issue Jan 18, 2024 · 3 comments

Comments

@siliconforks
Copy link

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

@jessuppi jessuppi changed the title Sidebar CSS specificity issues Sidebar callout widget CSS specificity issues Jan 28, 2024
@jessuppi
Copy link
Member

Thanks again @siliconforks

This temporary fix should help: c98ed8e

We may have to think about how many settings we want for these elements vs. default/hardcode CSS rules. For example, do we really want separate text/link/hover/etc CSS rules for this or not?

@jessuppi
Copy link
Member

Another tweak: 054070e

@jessuppi
Copy link
Member

Still not enough, so added a few !important flags for now: efcf1c6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants