Tailwind 4.0? #8441
Replies: 13 comments 10 replies
-
You may want to share your thoughts instead of just downvoting! |
Beta Was this translation helpful? Give feedback.
-
Although I liked these, maybe you mean to add these classes instead of changing and letting the old code work. I have used Tailwind CSS a lot and if classes are changed, I will have to change many classes. That will be very time consuming. Tailwind CSS uses MIT license. So, you can build your own CSS framework by modifying Tailwind too.
By the way, your post is well formatted. Thank you very much |
Beta Was this translation helpful? Give feedback.
-
production mode, classes are renamed |
Beta Was this translation helpful? Give feedback.
-
What is the benefit of shortening so many class names? |
Beta Was this translation helpful? Give feedback.
-
group classes to a single renamed one, example: (hidden sm:inline-block sm:mt-0 sm:text-xl xl:text-4xl text-white font-bold) to (4764bfgdsh) |
Beta Was this translation helpful? Give feedback.
-
It seems like bootstrap classes? |
Beta Was this translation helpful? Give feedback.
-
Font Size |
Beta Was this translation helpful? Give feedback.
-
Maybe not change the names for now, but add them as new classes and remove the old classes in the next versions (mark as deprecated but still do the job) ? Maybe when rebuilding the project with v4, it changes everything for so you don't have to edit them yourself? |
Beta Was this translation helpful? Give feedback.
-
I have some suggestions for utility classes to simplify existing classes and to add new functionalities. In fact, I created the lib eleganceui-tailwind-utilities specifically for this purpose: https://www.npmjs.com/package/eleganceui-tailwind-utilities Example: - {/* before */}
- <div className="container mx-auto px-4">
- <div className="flex w-full flex-row flex-wrap gap-4">
- <div className="flex size-72 min-h-72 min-w-72 flex-col gap-4 overflow-hidden rounded-xl shadow border-2 border-blue-500">
- <div className="flex h-32 w-full animate-pulse bg-slate-200" />
- <div className="gap-4 rounded-lg p-4">
- <h3 className="truncate text-lg font-bold text-blue-500">
- Example long title omitted with ellipsis
- </h3>
- <hr className="border-0 rounded bg-slate-200 h-px w-full" />
- <p className="text-sm font-normal text-gray-800">Brief description.</p>
- </div>
- </div>
- {/* ... */}
- </div>
- </div>
+ {/* after */}
+ <div className="px-4 container-row g-4">
+ <div className="ov-hidden br-xl shadow col g-4 square-72 bw-2-blue-500">
+ <div className="h-32 col-full animate-skeleton" />
+ <div className="br-lg p-4 g-4">
+ <h3 className="ellipsis fs-lg-bold-blue-500">
+ Example long title omitted with ellipsis
+ </h3>
+ <hr className="hr-x" />
+ <p className="fs-sm-normal-gray-800">Brief description.</p>
+ </div>
+ </div>
+ {/* ... */}
+ </div>
|
Beta Was this translation helpful? Give feedback.
-
I like some of these ideas, but my main gripe - and how I stumbled onto this in the first place - is that font-normal exists at all. All the other names match what's expected : font-bold, font-medium, etc. But not regular? I need font-regular to exist... I've made this error SO MANY TIMES. 😭 |
Beta Was this translation helpful? Give feedback.
-
"text-sm font-bold text-center text-wrap text-gray-900" -> text-[s:sm,_a:center,_w:wrap,_c:rgay-900] font-[w:bold] Why not? |
Beta Was this translation helpful? Give feedback.
-
Is there a timeline for when v4 will become GA? |
Beta Was this translation helpful? Give feedback.
-
I remember that almost 15 years ago I read on Microsoft's documentation this sentence:
I think that counts up to this day, and to be honest, even for thousands of years to come. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
@adamwathan
Coming soon:?
1
xl:flex
=>xl(flex)
xl:hover:bg-white
=>xl:hover(bg-white)
xl:hover:bg-white xl:hover:text-gray-700
=>xl:hover(bg-white text-gray-700)
xl:bg-white xl:hover:text-gray-700
=>xl(bg-white hover(text-gray-700))
2
top-4
=>t-4
right-4
=>r-4
bottom-4
=>b-4
left-4
=>l-4
top-4 bottom-4
=>y-4
right-4 left-4
=>x-4
3
inline-block
=>iblock
inline-flex
=>iflex
inline-grid
=>igrid
4
leading-4
=>lh-4
5
min-w-4
=>minw:4
max-w-4
=>maxw:4
height
...6
Better class names for:
7
Add new 2xl(10px) size for Font Size. Maybe 8px too.
8
font-normal
=>font-regular
I confuse between
font-normal
andtext-base
. it's usually called "regular", in font name and etc.The hard opinions part begins😂
x1
Use
:
in class name to separate property name from it's value, like CSS.bg-white
=>bg:white
text-gray-700
=>text:gray-700
x2
jc
ji
js
ac
ai
as
pc
pi
ps
I while ago I wanted to work on the docs website, help to fix some bugs and UX issues, it didn't even took me 30min to hate React and be careless about helping at all😅. It was so buggy and so slow. Sense you guys are working on the new version, can you please build the website with Svelte and SvelteKit? It will be so much easier for you guys to build the website with Svelte, it will be less buggy and it will me much faster, also others be able to read the code and contribute easily.
That's all. Thank you for working so hard on this project❤️, it's very well appreciated🙏
Beta Was this translation helpful? Give feedback.
All reactions