-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update/publish calypso sass #36170
Update/publish calypso sass #36170
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~362 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~370 bytes added 📈 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
Let's wait for #36175 |
__dirname, | ||
'client/assets/stylesheets/shared/_utils.scss' | ||
) }';`, | ||
prelude: `@import '~@automattic/calypso-sass-prelude/sass/utils';`, |
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.
Should we also change packages/calypso-ui
accordingly? (See Automattic/jetpack#13490 (comment))
@Automattic/team-calypso I'd be curious to hear your thoughts on this, esp in the context of Automattic/jetpack#13490 (comment) (Does this approach make sense, is it viable?) Luna is spread a bit thin ATM, so it'd be cool to pick your brains 😅 |
There are two types of shared SCSS files that should be clearly separated: SCSS header/prelude files that don't output any CSS Base styles that don't belong to any component, but setup the CSS environment
The current The |
FYI, I just did a similar PR in Gutenberg: WordPress/gutenberg#17883
This could be turned into a mixin. See example in Gutenberg. |
Thanks for that overview, @jsnajdr! Are those things that Team Calypso can work on in the near future? You clearly seem to have a better grasp of what's going on with those files than I do -- not sure if you also have the time to work on them? 😅 |
💯
We can set clear rules here and add tooling to validate that this bit produces no output. We were recently burned by that when we started writing CSS custom properties over and over.
CSS variables is another one for this list 😉 |
Which bit specifically? 😁 Performance issues? (we should open an issue about that) |
CSS custom properties (like our color schemes) are part of a base style set that don't belong to any component. They belong to the environment and should be included exactly once (we had an issue recently where they were included in every component 😱 — that's the performance issue you mentioned). They're also necessary for more specific styles to work correctly. |
Adding to the CSS custom properties list: they're not linted. Nothing yells at you if you use a non-existing variable. |
This issue has been marked as stale and will be closed in seven days. This happened because:
You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation. |
Abandoning this work. |
This is a spike to make 3188-gh-happy-tools possible.
This was implemented by addressing issues one at a time as they came up without much thought. It serves to understand what blockers exist, but not necessarily how they should be addressed.