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

Set initial header height #4593

Open
4 tasks
Tracked by #4561
gfellerph opened this issue Feb 4, 2025 · 2 comments · May be fixed by #4633
Open
4 tasks
Tracked by #4561

Set initial header height #4593

gfellerph opened this issue Feb 4, 2025 · 2 comments · May be fixed by #4633
Assignees
Labels
Header Everything related to our composible header components request 📦 styles Related to the @swisspost/design-system-styles package
Milestone

Comments

@gfellerph
Copy link
Member

gfellerph commented Feb 4, 2025

Web components are only shown when they are defined - meaning when the JavaScript has been downloaded and parsed. At this moment, the HTML and CSS have already rendered on the page and web components are plopping in. To prevent layout shift, the styles package should set the height of <post-header> initially. The styles should also take into account that the header is flexible, for example the title is optional and has an influence on the height.

Tasks

Preview Give feedback
@gfellerph gfellerph added the 📦 styles Related to the @swisspost/design-system-styles package label Feb 4, 2025
@gfellerph gfellerph added this to the PPNL Support milestone Feb 4, 2025
@gfellerph gfellerph added the Header Everything related to our composible header components label Feb 4, 2025
@gfellerph gfellerph moved this from 👀 Triage to 💻 Ready for development in Design System Production Board Feb 5, 2025
@alionazherdetska alionazherdetska added the needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers label Feb 11, 2025
@alionazherdetska
Copy link
Contributor

Image

@alizedebray
Copy link
Contributor

Resolution:
Header custom properties will be moved to the styles package, they can then be used to add a min-height to the post-heade:not(:defined) element.

@alionazherdetska alionazherdetska removed the needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Header Everything related to our composible header components request 📦 styles Related to the @swisspost/design-system-styles package
Projects
Status: 💻 Ready for development
Development

Successfully merging a pull request may close this issue.

4 participants