Skip to content
Discussion options

You must be logged in to vote

@wongjn I think I misinterpreted your answer. I got it working like I wanted it to be with:

export = plugin.withOptions(
  () => {
    return ({ matchUtilities, theme }) => {
      matchUtilities(
        { text: (value: string) => ({ fontSize: value }) },
        { values: theme("fluidFontSize") }
      );
    };
  },
  (opts) => {
    const fontSizes = generateFontScales(opts);
    return {
      theme: { fluidFontSize: fontSizes },
    };
  }
);

I think the docs doesn't make the behaviour pretty clear but I got it right after tinkering with it.

Replies: 1 comment 3 replies

Comment options

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

@wongjn
Comment options

wongjn Apr 29, 2023
Collaborator

@schardev
Comment options

Answer selected by schardev
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