Using grouped vars in custom utility #19209
-
| The text size utilities can set font size and also line height, making use of the  I tried this but it doesn't output anything: @theme {
  --frame-sm--start: 1;
  --frame-sm--end: 2;
  ...
}
@utility frame-* {
  grid-column-start: --value(--frame-*--start);
  grid-column-end: --value(--frame-*--end);
}Seems like having anything after the asterisk isn't supported? | 
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
| The same thing is not possible with custom utilities. You'd have to adjust the theme tokens such that the "name" comes at the end: @theme {
  --frame-start-sm: 1;
  --frame-end-sm: 2;
  ...
}
@utility frame-* {
  grid-column-start: --value(--frame-start-*);
  grid-column-end: --value(--frame-end-*);
} | 
Beta Was this translation helpful? Give feedback.
-
| It is possible, but the missing piece is that you also need to define  This is how we define a line-height in the framework:   --text-xs: 0.75rem;
  --text-xs--line-height: calc(1 / 0.75);Notice how we both have the  So in your case, if you add  That said, the fact that you would not be using  | 
Beta Was this translation helpful? Give feedback.

It is possible, but the missing piece is that you also need to define
--frame-smon its own.This is how we define a line-height in the framework:
Notice how we both have the
--text-xsand then the additional information.So in your case, if you add
--frame-sm: …;then it should work as expected, see: https://play.tailwindcss.com/IABpbnYko7?file=cssThat said, the fact that you would not be using
--frame-smat all might be a bug 🤔