-
Notifications
You must be signed in to change notification settings - Fork 0
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
A retrospective on using tailwindui #170
Comments
Naming Conventions in TailwindA well-chosen variable name provides immediate impression on its purpose and usage in the code. Tailwind.css naming convention is a standard pattern that has been adopted in many UI systems.
|
Practices on using TailwindPractice on customizing colors in your code (design)Tailwind includes an expertly-crafted default color palette out-of-the-box. It also gives the exposure to customize colors, as following: Tailwind.css: /** @type {import('tailwindcss').Config} */
module.exports = {
theme: {
colors: {
transparent: 'transparent',
current: 'currentColor',
'white': '#ffffff',
'purple': '#3f3cbb',
'midnight': '#121063',
'metal': '#565584',
'tahiti': '#3ab7bf',
'silver': '#ecebff',
'bubble-gum': '#ff77e9',
'bermuda': '#78dcca',
},
},
} By default, these custom colors made avaible everywhere in the framework where you use colors, including text, border and background <div class="bg-midnight text-tahiti">
<!-- ... -->
</div> |
Practice on font sizeVery often, the font settings given from designer doesn't match the default settings of tailwind. The solution is to customize our own font settings /** @type {import('tailwindcss').Config} */
module.exports = {
theme: {
fontSize: {
'2xl': ['1.5rem', {
lineHeight: '2rem',
letterSpacing: '-0.01em',
fontWeight: '500',
}],
'3xl': ['1.875rem', {
lineHeight: '2.25rem',
letterSpacing: '-0.02em',
fontWeight: '700',
}],
}
}
} |
Introduction
This article is a retrospective on using tailwind.css. It covers topics.
The text was updated successfully, but these errors were encountered: