Skip to content
Discussion options

You must be logged in to vote

Hey! The --modifier(…) (and --value(…)) is only available in functional utilities, meaning they are defined as @utility foo-* (with the -*). The idea is that this way you accept values, without the -* it's a "static" utility.

Do you only want to have this utility available for current or for any kind of color?

For example, you could setup a column-rule-color namespace:

@theme {
  --column-rule-color-current: currentColor;
}

@utility rule-col-* {
  column-rule-color: --value(--column-rule-color-*);
  column-rule-color: --alpha(--value(--column-rule-color-*) / calc(--modifier(integer) * 1%));
  column-rule-color: --alpha(--value(--column-rule-color-*) / --modifier([percentage]));
}

This wa…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jonnitto
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants