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

Improve Normalize CSS #180

Open
devenini opened this issue Jul 10, 2024 · 4 comments
Open

Improve Normalize CSS #180

devenini opened this issue Jul 10, 2024 · 4 comments

Comments

@devenini
Copy link
Member

Fix current issue of _normalize.scss overriding styling of different tags e.g.

// Remove list styles on ul, ol elements with a class, which suggests default styling will be removed
ul[class],
ol[class] {
    margin: 0;
    padding: 0;
    list-style: none;
}

...

// Remove a elements default styles if they have a class
a[class] {
    color: inherit;
    text-decoration: none;
}
@mcaskill
Copy link
Member

Can you provide an example of what is being overridden?

@devenini
Copy link
Member Author

@mcaskill here you can see the color property being overridden

image

@mcaskill
Copy link
Member

mcaskill commented Jul 10, 2024

Thanks.

Would using the :where() pseudo-class function be an acceptable solution? Example:

:where(a[class]) or a:where([class]) (whichever is more performant).

Both resolve the specificity issue.

This CSS function is Baseline since 2021-01.

@saadsrabon
Copy link

That's a great catch @ devenini

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

No branches or pull requests

3 participants