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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink purge settings and dist #7

Open
stephiescastle opened this issue Sep 20, 2021 · 4 comments
Open

Rethink purge settings and dist #7

stephiescastle opened this issue Sep 20, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@stephiescastle
Copy link
Member

Right now, the compiled CSS is purged according to usage in www-frontend. (note: I think we'd change this to purge against our HTML stories once those are ready.)

This means that other tailwind classes are removed from explorer-1.min.css. Should we also provide a version that doesn't purge them? The file would be much larger, but then users could have access to other Tailwind classes that we aren't using and purge them on their own.

I noticed this when testing BaseCarouselCards in index.html. I used p-28 for each slide. When testing this same HTML with the purged CSS, p-28 was purged, so some formatting was lost.

@stephiescastle
Copy link
Member Author

Response from @Scotchester:

This means that other tailwind classes are removed from explorer-1.min.css. Should we also provide a version that doesn't purge them? The file would be much larger, but then users could have access to other Tailwind classes that we aren't using and purge them on their own.

I think it could be nice to offer this as an extra CSS distribution, like explorer-1_tailwind-complete.min.css or something.

Or at least offer advice on how a consumer of Explorer 1 can get access to those. I think the options for this would be:

  • Including a Tailwind CSS dist if they're using the Explorer 1 CSS dist
  • By overriding the purge settings if you're using Explorer 1 in conjunction with your own front-end build process

Does that sound right?

@stephiescastle
Copy link
Member Author

I think the options for this would be:

  • Including a Tailwind CSS dist if they're using the Explorer 1 CSS dist

  • By overriding the purge settings if you're using Explorer 1 in conjunction with your own front-end build process

Does that sound right?

@Scotchester Yes, I agree with that approach!

@stephiescastle stephiescastle added the enhancement New feature or request label Sep 20, 2021
@stephiescastle
Copy link
Member Author

Another approach that users can take that would eliminate this problem:

  • use the Tailwind CDN
  • use our custom TailwindCSS config with it
  • include only the scss partials for Explorer 1 (we could create another dist file that's just the scss minus Tailwind)

@stephiescastle stephiescastle changed the title Rethink purge settings Rethink purge settings and dist Jul 19, 2022
@stephiescastle
Copy link
Member Author

stephiescastle commented Jul 19, 2022

Other versions of compiled CSS we should consider providing:

  • internal styles
  • just the components (no foundations)
  • just the app bar
  • everything included (no purging)
  • [...:thinking:...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant