Change old /archive/* links to /daily/*
This commit is contained in:
parent
661669f2a5
commit
538141466c
406 changed files with 457 additions and 457 deletions
|
@ -3,18 +3,18 @@ title: >
|
|||
Utility-first or utility-last?
|
||||
pubDate: 2023-01-06
|
||||
permalink: >-
|
||||
archive/2023/01/06/utility-first-or-utility-last
|
||||
daily/2023/01/06/utility-first-or-utility-last
|
||||
tags:
|
||||
- tailwind-css
|
||||
---
|
||||
|
||||
Tailwind CSS is based on the "utility-first" approach, where the majority of styling is done using utility CSS classes. You can still add additional custom styles if needed if there is something that can't be achieved with utilities or would be better placed in a custom CSS stylesheet.
|
||||
|
||||
Utility-last is the opposite approach, where a small number of utilities are used alongside other CSS styles or another framework. This is common when [adding a utility-based framework like Tailwind CSS]({{site.url}}/archive/2023/01/05/adding-tailwind-to-an-existing-project) to an existing project and you want to use it for a new page or component whilst keeping the existing styles.
|
||||
Utility-last is the opposite approach, where a small number of utilities are used alongside other CSS styles or another framework. This is common when [adding a utility-based framework like Tailwind CSS]({{site.url}}/daily/2023/01/05/adding-tailwind-to-an-existing-project) to an existing project and you want to use it for a new page or component whilst keeping the existing styles.
|
||||
|
||||
This is what I did when I started learning Tachyons, and later Tailwind CSS. My project already had styling from another CSS framework, I started using utility classes and over time refactored until only utilities were used and the other styles could be removed.
|
||||
|
||||
You could do the opposite too, and refactor groups of utilities into a CSS component, either by using Tailwind's `@apply` directive or [writing a plugin]({{site.url}}/archive/2023/01/03/tailwind-css-extensibility-is-one-of-its-best-features).
|
||||
You could do the opposite too, and refactor groups of utilities into a CSS component, either by using Tailwind's `@apply` directive or [writing a plugin]({{site.url}}/daily/2023/01/03/tailwind-css-extensibility-is-one-of-its-best-features).
|
||||
|
||||
If you did want to use Tailwind for a small number of utilities, by default, it will only generate classes that are used within HTML or template files, but it can also be configured to only use the core modules that you specify - preventing Developers from using unwanted utility based on the rules for that project.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue