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
css: Use SCSS nesting in reactions.scss. #12351
Conversation
5e5e307
to
b0ae930
Compare
reactions.scss
Hey @timabbott. I broke this PR into multiple small commits so that it is easy for you to review. Still a WIP (the part inside |
The removed rule does not apply in any case since it's always overridden by `.message_reaction + .reaction_button` rule defined later on.
This atomically makes `.private-message` in same place too.
Precisely for `.private-message .message_reactions .message_reaction`.
a0938b1
to
45c8646
Compare
@timabbott This is ready for review. |
@vrongmeal cool! I was thinking while reviewing this that it might be worth our adding a bit of tooling around this migration. In theory, we should be able to check for commits that aren't supposed to change the output whether indeed that's their effect using a tool (e.g. run the preprocessor and then diff the output). Might be worth doing that to simplify the process here. |
Looks great, merged, thanks @vrongmeal! I squashed a few of the commits together into a20b485; I think that's just as easy to review as having those be separate. I think while we're working on this CSS file, we should:
The overall goal here should be something that's easy to read and understand, and I don't think we're there yet. |
I should say that overall this was very pleasant to review, and I think this approach could be successful for future refactors. I think you can proceed to do these files next with the same approach:
(I'm trying to pick ones that seem quick and I know don't have active PRs). |
This definitely would be tricky but I think it's worth to do some homework and see if we can come up with something. Would definitely make these refactors easier |
I was actually thinking just the opposite. Nesting in CSS is expensive and I think if we can reach a state where there is less nesting and more classes, that's just as readable and actually better IMO. It's going to be a little hard but I think it's worth looking once if we could actually eliminate some nesting. |
Yeah, I guess I have a few thoughts here:
Does that reasoning make sense?
Yeah, and also easier to review; if half of your commits can say "Verified no changes to CSS output" in the commit message, I could be a lot faster in reviewing those. A possible tool structure could be this:
|
Yeah it does. It's something I read some time back about how the nesting works. So when we write |
No description provided.