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

fix: reduce cls caused by nav #378

Merged
merged 4 commits into from
Apr 15, 2024
Merged

fix: reduce cls caused by nav #378

merged 4 commits into from
Apr 15, 2024

Conversation

fkakatie
Copy link

Description

Currently, all header height styles are located in block/header/header.css, which is lazy-loaded. This generates significant CLS when the loaded content in main is shoved down to accommodate the newly loaded stylesheets impacting header and nav. Proposing to move header nav styles impacting height into styles.css so circumvent this issue. Also proposing the removal of duplicative styles.

Screenshot 2024-04-15 at 2 06 53 PM Screenshot 2024-04-15 at 2 13 11 PM

Before vs. After

Changed

  • header nav and main height set in styles.css, rather than in the lazy-loaded header block

Removed

  • duplicative css

Test URLs

Copy link

aem-code-sync bot commented Apr 15, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@fkakatie fkakatie requested a review from amol-anand April 15, 2024 12:15
Copy link

aem-code-sync bot commented Apr 15, 2024

Page Scores Audits Google
/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
/blog PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
/clinical-development PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@amol-anand
Copy link
Collaborator

Looks good to me. Thanks @fkakatie !

@helms-charity please take a look and merge when you have a moment.

@fkakatie fkakatie requested a review from helms-charity April 15, 2024 14:10
Copy link
Collaborator

@helms-charity helms-charity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate the fix, looks good

@helms-charity helms-charity merged commit 1373360 into main Apr 15, 2024
2 checks passed
@helms-charity helms-charity deleted the nav-cls branch April 15, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants