-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Rename rounded-* to radius-*, switch to numeric scale #666
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
Conversation
|
Maybe I'm missing something obvious, but what was the context in which you were:
I don't think I've ever used I am slightly pro Part of the joy of Tailwind is that I don't need to care as much about the CSS property names and I like the flow of composing classes based on how you would talk: "a button with a blue background ( |
|
I agree with @swanson that "rounded" is the expected usage in this context. However, I also agree with @adamwathan that we should consider renaming the |
It's mainly to remove a radius at another screen size, e.g. It seems that the general direction for 1.0 is to as close to the metal (CSS) as possible while maintaining a great developer experience. I don't really mind these little abstractions, but I think I prefer consistency, and most class names reflect the underlying CSS property in some way. I was also not a fan of the The only name that strikes me as odd now is |
Yeah I could be persuaded to change that, I kept |
|
Well, |
Fixed it for you. |
|
Haha it creates ovals. That can work in some designs... |
|
For unsetting the border radius I would propose For the scale naming is very subjective, but I would stick to |
@adamwathan The scale should be proportional since it will come given by the micro-spacing scale (regardless this is something explicitly defined in Tailwind core or not). Here's the first link I found to a design system I remembered defined it this way: https://www.carbondesignsystem.com/guidelines/spacing/
+1 to @benface's note on
This could also be an option but since we're not using Also, imho this values should be given by the micro-spacing scale of the system, |
rounded-* to radius-*, switch to numeric scale|
I like the rounded classes. My vote is to leave it as-is. I usually only need one or two variants anyway. |
|
Going to keep everything as-is 👍 |
This PR changes the name of our border-radius classes from
rounded-*toradius-*.rounded-noneradius-0rounded-smradius-1roundedradius-2rounded-lgradius-4rounded-fullradius-fullThe primary motivation for this is to make the naming mirror the CSS property more closely, and because I was constantly typing
rounded-0instead ofrounded-none, and the whole idea of something being "rounded but not" is just stupid sounding.This PR also removes the idea of a
defaultborder radius value (therounded) class in favor of always specifying a modifier. That approach was okay with the nameroundedbut the classradiusdoesn't make as much sense without a modifier.I've switched to a numeric scale because
radius-0is more intuitive to me thanradius-none, but we could also just use0for the zero value, and a descriptive scale likesm,md,lg, etc. for the other values. Don't have a strong opinion on that either way, especially because the numeric scale I'm using in the PR at the moment doesn't match our spacing scale or anything anyways.If we do keep a numeric scale, I'm not sure if it should be proportional like I have right now (notice that
3is missing), or if it should just beradius-1,radius-2,radius-3.Interested in any feedback on this 👍