Skip to content

Conversation

phaux
Copy link

@phaux phaux commented May 25, 2025

I just think it would make sense:

@theme {
  --size-button: 2.5rem; /* should be usable with square buttons and wide buttons */
  --size-bar: 3.5rem; /* should be usable with horizontal and vertical toolbars */
}
<!-- vertical toolbar -->
<div class="flex flex-col w-bar">
  <!-- square button with icon -->
  <button class="size-button"><svg>...</svg></button>
</div>

<!-- horizontal toolbar -->
<div class="flex flex-row h-bar">
  <!-- wide button with text -->
  <button class="h-button">Text</button>
</div>

@phaux phaux requested a review from a team as a code owner May 25, 2025 18:46
@adamwathan
Copy link
Member

Hey! Going to say no to this one for now, want to keep the theme namespaces as light as we can. Can always revisit in the future if there's a lot of demand or strong reasons to add. Thanks regardless!

@adamwathan adamwathan closed this Aug 4, 2025
@rozsazoltan
Copy link
Contributor

Until then, you can implement the custom namespace for your own projects:

@utility w-* {
  width: --value(--size-*);
}

@utility h-* {
  height: --value(--size-*);
}

@utility min-w-* {
  min-width: --value(--size-*);
}

@utility min-h-* {
  min-height: --value(--size-*);
}

@utility max-w-* {
  max-width: --value(--size-*);
}

@utility max-h-* {
  max-height: --value(--size-*);
}

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.

3 participants