Skip to content

Trying to understand how to set default border CSS property at specific scope #17789

Answered by wongjn
endigo9740 asked this question in Help
Discussion options

You must be logged in to vote

border compiles to:

.border {
  border-style: var(--tw-border-style);
  border-width: 4px;
}

Notice how the --default-border-width isn't referenced anywhere, hence why the data-theme selector has no effect. You can workaround this by using your own CSS variable: https://play.tailwindcss.com/j4uS9YN53T?file=css

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@endigo9740
Comment options

@wongjn
Comment options

wongjn Apr 25, 2025
Collaborator

@endigo9740
Comment options

Answer selected by endigo9740
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants