-
Notifications
You must be signed in to change notification settings - Fork 20
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
chore: optimize Tailwind CSS classes #549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nACK
Let's discuss each change first and submit smaller PRs for different changes.
As of now I think those points can have been submitted already:
- Remove conflicting class (flex and box simultaneous usage)
- Use shorthand classes when possible (w-[] z-[] to size-[])
- Replace invalid text-color class by text-skin-text
- Remove invalid button-outline classes, ported from snapshot v1
- Arbitrary classes should not start by -, use negative value instead (-mb-[5px] will become mb-[-5px])
Ideally those should be separated into each own PR so we can easily review it and test it doesn't break anything.
The rest should be discussed first.
Updated to revert all changes requiring any discussions. This PR was meant to be a no-brainer changes, and should include only obvious fixes which does not require any testing |
For |
removed |
@@ -304,7 +304,7 @@ input:placeholder-shown { | |||
.s-label:has(+ textarea), | |||
.s-base:has(textarea:only-child) { | |||
&::before { | |||
@apply block bg-gradient-to-b from-skin-border to-transparent h-2 w-full absolute top-[20px] left-0; | |||
@apply block bg-gradient-to-b from-skin-border to-transparent h-[8px] w-full absolute top-3.5 left-0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why h-2
was changed to h-[8px]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, everything that is not spacing related ((m|p|space|gap)-[0-9]
) is using arbitrary pixels value.
we're already using h-[32px]
for avatar, etc ...
Or should we keep using both h-2 and h-[8px] ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, let's keep it like this then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
@wa0x6e merge conflict needs to be resolved. |
Summary
Fix and cleanup css, in anticipation of adding eslint rules for scss.
Those are just regular and simple fixes, without any controversial rules
button-outline
classes, ported from snapshot v1text-color
w-[] z-[]
tosize-[]
)s-[4px]
tos-1
)-
, use negative value instead (-mb-[5px]
will becomemb-[-5px]
)flex-grow
->grow
,z-5
->z-10
, etc ...)flex
andbox
simultaneous usage)Todo in a later pr will be more heavy changes, like css classes ordering