Skip to content

Conversation

@Hari-varshan
Copy link

Fixes #3951

Summary

Clarified the documentation regarding CSS variables. While variables are globally defined in the Theme, this update adds a note explaining that their usage follows standard CSS inheritance rules:

  • Values are inherited by descendants (waterfall).
  • Values are isolated from siblings.

Note: Skipped CHANGELOG.md update as this is a documentation-only clarification.

@TomJGooding
Copy link
Collaborator

TomJGooding commented Dec 19, 2025

I don't think this is the 'variable scope' referred to in the issue:

For example, it would seem that if you're using CSS_PATH, you can't define a series of variables in one file earlier in the path, and then use those variables in files later on in the path.

Explaining basic CSS rules seems pretty redundant. But I strongly suspect this PR was just generated with AI.

@Hari-varshan
Copy link
Author

Hi, thanks for your feedback. I'm new to contributions. I picked this issue because I felt it was easy and thought the requirement was just a basic CSS rule. Yes, I used AI to draft the sentences for the documentation.

After reading your comment carefully, I realized the issue is about file scope. I ran some local tests and confirmed that CSS_PATH does not act as a collective store that inherits variables from one file to the next; instead, it isolates the file variables separately.

Is my understanding correct now? Should I close this PR and open a new one?

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.

The documentation for CSS variables should clearly state the scope of variables

2 participants