Skip to content
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

Split global CSS code into smaller chunks #429

Closed
Brenosalv opened this issue Aug 5, 2024 · 4 comments · Fixed by #448
Closed

Split global CSS code into smaller chunks #429

Brenosalv opened this issue Aug 5, 2024 · 4 comments · Fixed by #448
Assignees
Labels
ongoing Work that is happening over a longer period of time / side effects of other work. tech debt This is a task that really only the engineers notice

Comments

@Brenosalv
Copy link
Collaborator

Brenosalv commented Aug 5, 2024

Contributes to
#455

Tech debt
Currently the global CSS code style.less includes a bunch of non-global classes and other styles. Having a single, large CSS file like style.less with around 5800 lines of code can impact both performance and maintainability.

Expected
Implement code splitting by moving each chunk of CSS to their specific folders where they are used and keep the style.less with only the global CSS code.

Screenshots
It has 5886 lines of code:
image

commons.css:
image
image

@Brenosalv
Copy link
Collaborator Author

Having multiple less css modules is returning these warnings:
image

It's like webpack does not handle conflicting importing order between the css modules with Gatsby.

Possible solutions:

@travjenkins
Copy link
Member

I think we are fine with this. We do not use a lot of nesting and specificity in our styling so it should not cause any big issues.

@Brenosalv
Copy link
Collaborator Author

Created an issue for the css order conflicts: #474.

@travjenkins travjenkins added the ongoing Work that is happening over a longer period of time / side effects of other work. label Sep 4, 2024
@Brenosalv
Copy link
Collaborator Author

Closed with the PR 480.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ongoing Work that is happening over a longer period of time / side effects of other work. tech debt This is a task that really only the engineers notice
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants