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

Is Tailwind the right choice? #41

Closed
laymonage opened this issue May 5, 2021 · 1 comment
Closed

Is Tailwind the right choice? #41

laymonage opened this issue May 5, 2021 · 1 comment
Labels
decision needed Needs considerations before implementing enhancement Nice to have

Comments

@laymonage
Copy link
Member

When starting this project, I chose Tailwind for a few reasons:

  • I love it
  • I'm already familiar with it, so I don't need the extra time to learn other frameworks
  • I want to see how far I can get by creating my own styles (and a few other small libraries, e.g. github-syntax-light) to match GitHub's design.

However, when I started adding support for themes and other complex Markdown features (e.g. permalink code snippets), it started to become trickier to apply the correct style. It's not Tailwind's fault, it's just that the generated HTML is optimized for use with @primer's utilities, e.g. @primer/components, @primer/css, @primer/primitives.

Downsides to switching the frameworks/libraries used are:

  • I need more time to learn @primer stuff
  • I need time to rework the components
  • Increased bundle size.
    I tried just including @primer/css and it increased the build output by tens of kilobytes. Considering that the current size is only ~30KB and we managed to get it running quite beautifully, I really want to keep it small.
@laymonage laymonage added enhancement Nice to have decision needed Needs considerations before implementing labels May 5, 2021
@laymonage laymonage mentioned this issue May 5, 2021
21 tasks
@laymonage
Copy link
Member Author

I still think Tailwind is okay to use, now that we have a custom solution that's more in sync with @primer/css.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decision needed Needs considerations before implementing enhancement Nice to have
Projects
None yet
Development

No branches or pull requests

1 participant