Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user configuration of the Tailwind configuration rather than a single object for all files #26

Closed
Poimen opened this issue Sep 28, 2022 · 2 comments

Comments

@Poimen
Copy link
Owner

Poimen commented Sep 28, 2022

    Regarding the `safelist` option in the Tailwind config. Yeah, I've tried using that but it messes up the performance when starting the project for development. Takes minutes before it starts and I don't want that 馃槄. Basically, I need every text and background color to be present in the Tailwind output. This is because I have an `Avatar` component that gets it background  color and text color (when profile image is not available) based on the user that is currently logged in. So, it's dynamic.

image

I've tried the following patterns to add those classes. These aren't even all the available colors and it took too long to process. I even tried adding them manually in the safelist array. So I though adding one more file that contains all the classes I want in, into the source and content option would be far more performant. So I guess that's not an option then?

safelist: [
  'ux-bg-white',
  'ux-bg-black',
  'ux-text-white',
  'ux-text-black',
  {
      pattern: /ux-bg-(gray|red|yellow|green|blue|purple)-(50|100|200|300|400|500|600|700|800|900)/
  },
  {
      pattern: /ux-text-(gray|red|yellow|green|blue|purple)-(50|100|200|300|400|500|600|700|800|900)/
  }    
],

Regarding the warning. I got a lot of components (about 40 now) with loads of TW styling, so thats why I thought the warning weird 馃槈. Perhaps it is because I use ux- prefix for the TW classes? I don't know. Looks like it doesn't cause any problems though. Not sure if problems will arise in the near future while developing the UX project. I surely hope not 馃榾.

Originally posted by @dtaalbers in #23 (comment)

@Poimen
Copy link
Owner Author

Poimen commented Sep 29, 2022

@dtaalbers I have release v1.6.0

This should now the allow customisation that we chatted around in #23.

Just take note of the README parts on Configuration and considerations.

I'm closing this for now.

Feel free to log new issues for anything you pickup with this functionality 馃憤

@Poimen Poimen closed this as completed Sep 29, 2022
@dtaalbers
Copy link

Thanks! I will check it out ASAP!

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

No branches or pull requests

2 participants