Class being Overwritten by :is
I have the following code :
For some reason that I can't figure out it is getting overwritten by the following:
That is what the dev tools is showing. Any suggestions? TIA
Here is here is the repo:
https://github.com/andrewteece/faq-accordion-card
GitHub
GitHub - andrewteece/faq-accordion-card
Contribute to andrewteece/faq-accordion-card development by creating an account on GitHub.
8 Replies
can you show a screenshot of the inspector?
as Mark already is here I'm not getting involved but @Andrew when I looked at your repo's code (that you linked above) there was no
:is
inside of your styles.
sometimes its a little bit hard to troubleshoot without code to reference. please keep things up to date inside of the question to help anyone who is helping youYes, I have NO styles in my CSS using
From what I can detect it is getting the from the user agent stylesheet
yup, that would be coming in from your browser but the specificity level is off to over-write the .cardheader
mayhaps you will need to specify that the h1 is within the cardheader to increase the specificity
.card__header h1
i suspect some sort of broweser extension is inserting that.
Mark - I found this which I thought was interesting. https://web.dev/learn/html/text-basics#headings_revisited
There is a code snippet in this section that talks about the selectors being present in the agent stylesheets
I didn't think browsers were implementing this but apparently they are according to the article which was last updated in 2022.
Kind of odd considering containers coming in and all imo
Doing
That did it. Thank you both for your help on this.
I don't have any browser extension enabled. I tested the problem in both Firebox and Chrome, and both showed the same result in the dev tools.