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

Improvment to TailwindCSS article #23

Open
Exadra37 opened this issue Apr 21, 2020 · 0 comments
Open

Improvment to TailwindCSS article #23

Exadra37 opened this issue Apr 21, 2020 · 0 comments
Assignees

Comments

@Exadra37
Copy link

To tackle repeating utility classes you can use @apply as suggested in this article:

<button class="btn-gray">
  Button
</button>

<style>
.btn-gray {
  @apply bg-gray text-white font-bold py-2 px-4 rounded;
}
.btn-gray:hover {
  @apply bg-gray-dark;
}
</style>

So I would suggest that you can improve this part of your article by using @apply to tackle the repetition of css utility classes.

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