Skip to content

fix: clarify Tailwind scoping with .zenuml class #284

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

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

MrCoder
Copy link
Collaborator

@MrCoder MrCoder commented Jul 23, 2025

Summary

  • Moved .zenuml class to wrapper div in core.tsx for proper Tailwind scoping
  • Removed redundant .zenuml class from DiagramFrame component
  • Added comments explaining the Tailwind configuration

Problem

The Tailwind configuration uses important: ".zenuml" which generates selectors like .zenuml .p-1 (with a space). This means Tailwind utilities only work on elements that are descendants of .zenuml, not on elements that have the .zenuml class themselves.

Having .zenuml on the DiagramFrame component along with Tailwind utilities like p-1 bg-skin-canvas inline-block was confusing because those utilities wouldn't actually work there.

Solution

  • Keep .zenuml only on the parent wrapper div in core.tsx
  • Remove it from DiagramFrame to avoid confusion
  • Add clear comments explaining how the scoping works

This maintains the same DOM structure and functionality while making the code clearer.

🤖 Generated with Claude Code

- Move .zenuml class to wrapper div in core.tsx for proper Tailwind scoping
- Remove redundant .zenuml class from DiagramFrame component
- Add comments explaining how Tailwind's important: ".zenuml" configuration works
- This ensures Tailwind utilities work correctly as child selectors (.zenuml .p-1)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@MrCoder MrCoder merged commit e387439 into main Jul 23, 2025
11 checks passed
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.

1 participant