You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if the inset-ring utility supported a --default-inset-ring-width theme variable, allowing users to customize the default width when using inset-ring without a value — just like ring, border, and outline already do.
Current behavior
Currently, the inset-ring utility hardcodes 1px as its default width, making it impossible to customize via @theme. This is inconsistent with how every other similar utility handles its default width:
Utility
Theme variable
Customizable via @theme?
border
--default-border-width
Yes
outline
--default-outline-width
Yes
ring
--default-ring-width
Yes
inset-ring
(none — hardcoded 1px)
No
Example: ring (works as expected)
@theme { --default-ring-width:3px; }
<!-- .ring uses 3px as the default ring width --><divclass="ring">...</div>
Example: inset-ring (not customizable)
@theme { /* This variable is never read — has no effect */--default-inset-ring-width:3px; }
<!-- .inset-ring always uses the hardcoded 1px regardless of any @theme config --><divclass="inset-ring">...</div>
Proposal
Add support for a --default-inset-ring-width theme variable so that inset-ring reads from the theme (falling back to 1px when unset), matching the established pattern used by ring, border, and outline.
This would allow users to customize the default inset ring width via @theme:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
It would be great if the
inset-ringutility supported a--default-inset-ring-widththeme variable, allowing users to customize the default width when usinginset-ringwithout a value — just likering,border, andoutlinealready do.Current behavior
Currently, the
inset-ringutility hardcodes1pxas its default width, making it impossible to customize via@theme. This is inconsistent with how every other similar utility handles its default width:@theme?border--default-border-widthoutline--default-outline-widthring--default-ring-widthinset-ring1px)Example:
ring(works as expected)Example:
inset-ring(not customizable)Proposal
Add support for a
--default-inset-ring-widththeme variable so thatinset-ringreads from the theme (falling back to1pxwhen unset), matching the established pattern used byring,border, andoutline.This would allow users to customize the default inset ring width via
@theme:Context
In the source (
packages/tailwindcss/src/utilities.ts), theringutility reads the default width from the theme:But the
inset-ringutility hardcodes the value:Prior art
This is the same class of inconsistency that was fixed for
outlinein #16469.Beta Was this translation helpful? Give feedback.
All reactions