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

User CSS should always take precedence over Widget CSS #595

Merged
merged 9 commits into from
Jun 29, 2022

Conversation

darrenburns
Copy link
Member

Adds an additional (greater) level of specificity (Specificity5), which means user-defined CSS (i.e. that inside a .css file) always takes precedence over CSS defined inside the CSS class var.

@darrenburns darrenburns marked this pull request as ready for review June 28, 2022 16:46
@darrenburns darrenburns linked an issue Jun 28, 2022 that may be closed by this pull request
Copy link
Collaborator

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Not a big change at all. A change to the data structure to consider.

src/textual/css/styles.py Outdated Show resolved Hide resolved
src/textual/css/stylesheet.py Outdated Show resolved Hide resolved
src/textual/css/stylesheet.py Outdated Show resolved Hide resolved
src/textual/css/stylesheet.py Outdated Show resolved Hide resolved
tests/css/test_stylesheet.py Show resolved Hide resolved
@darrenburns darrenburns requested a review from willmcgugan June 29, 2022 12:42
Copy link
Collaborator

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@willmcgugan willmcgugan merged commit 62f2ffe into css Jun 29, 2022
@willmcgugan willmcgugan deleted the user-css-over-widget-css branch June 29, 2022 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default versus User CSS
2 participants