Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
MPP-3946: Fix warnings for mixed_decls, imports #5176
MPP-3946: Fix warnings for mixed_decls, imports #5176
Changes from all commits
5ec573b
4b0a43a
0838adc
78f2461
711fcc2
920bf6a
2b00198
4ce9832
86647a3
8c1bbca
7cd7a06
c1f42b6
cf181ba
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
questgestion (non-blocking): we can remove these lines, right? This
TODO
isTODONE
?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.
No, there are sass warnings from mozilla-protocol, and the lingering next.js API warning.
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.
question (non-blocking): TIL sass mixin content blocks. Did you dig into them any deeper than to update the syntax? Do you know if we should file a follow-up to try to utilize the new features of mixin content blocks to improve our sass code in other ways too?
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.
Yes, I think our style definitions should be updated with this in mind. No, I don't think it is worth a ticket, since we would close it as 'not planned' if someone else suggested it. I've thought a bit about it, so I'm writing my blog post here, but feel free to skip it.
We have no experienced front-end developers on staff, and I bet once we hire one, 'clean up style sheets' will be well below other tasks the design team is planning. In the end, we will probably follow the Mozilla Protocol CSS Coding Guide, after they figure out what to do with this change.
The goal with this update was to generate the exact same CSS, with no judgement or re-arrangement. This was mostly because I'm not qualified to judge if the CSS has the same effect, or if there is some gotcha in Chrome vs Firefox vs Vivaldi etc. It was also easiest to judge the output - same hash, same CSS.
This declaration keeps the CSS the same:
The CSS order is 1) the
text.title-xs
properties, then 2) the content block properties, then 3) the desktop-widthtext.title-xs
overrides:The post Poll Results: How do you order your CSS properties? says the strategies are:
Our coding standards doc says:
That document says:
I think the Relay team has not followed that one, because our linters do not enforce it.
If we grouped by type, such as Nicolas Gallagher's idiomatic CSS, which makes the most sense to me (an amateur front-end dev), the sass would be (without the comments):
This requires knowing what attributes go in what section. I had to use MDN to guess. This would be a good job for a linter.
A hypothetical alphabetical version would need to split the
text.title-xs
font declarations from the desktop-size overrides:This is ugly, requiring developers to remember to include both at-includes, so seems like a bad solution to me.
The marketing organization has a concentration of front-end developers. They have the same
mixed-decls
warning. They can address it by changingmozilla-protocol
. They've opened mozilla/protocol#998 to discuss it. I expect that it will be solved in a future release ofmozilla-protocol
, and battle-tested in bedrock.When they have a solution, we can update our code to match it. Our job is to make such that is a one-version update, not several versions like the present case. And maybe have a front-end dev on staff who can contribute to the conversation.