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

[Minor] Impossible to customize CSS properties without increasing CSS selector specificity or using !important #6994

Open
franciscolourenco opened this issue Jul 1, 2024 · 0 comments
Labels
created-by: Contributor status: needs-triage Possible bug which hasn't been reproduced yet v2

Comments

@franciscolourenco
Copy link
Contributor

franciscolourenco commented Jul 1, 2024

Link to reproduction

https://github.com/payloadcms/payload/compare/franciscolourenco:reproduce-css-specificity

Describe the Bug

When using custom CSS to style Payload, currently Payload styles take precedence over custom styles. This means that in order to override Payload styles, it is necessary to use a CSS selector of higher specificity, or use the !important keyword. None of the options is ideal.

image

To Reproduce

Try to modify a CSS property of an already styled Payload element, using the same CSS selector as the Payload styles (see reproduction link).

Payload Version

2.23.1

Adapters and Plugins

No response

@franciscolourenco franciscolourenco added status: needs-triage Possible bug which hasn't been reproduced yet v2 labels Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Contributor status: needs-triage Possible bug which hasn't been reproduced yet v2
Projects
None yet
Development

No branches or pull requests

1 participant