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

[app-layout] Assign part to content div to allow easier "global" styling #7363

Open
stefanuebe opened this issue Apr 26, 2024 · 1 comment
Open
Labels
documentation Improvements or additions to documentation vaadin-app-layout

Comments

@stefanuebe
Copy link

Describe your motivation

I want content shown in the app layout to be of full size by default. To not having the dev to set this for each view, I simply want to do that via css. Unfortunately there is no direct way to target the content div inside the shadow dom nor is the slotted component marked in any way (like slot="content").

Describe the solution you'd like

The content div should have a part attribute "content" similar to all the other parts of the app layout (like "drawer", "navbar", etc.)

Describe alternatives you've considered

Using themes plus the "components" folder and shadow dom styling.
Override the showRouterLayoutContent() / setContent() methods in the app layout (in Flow).

Additional context

This issue came up in Flow, not sure if it is also a problem using the webcomponent in Hilla or similar.

@web-padawan web-padawan added enhancement New feature or request vaadin-app-layout labels Apr 26, 2024
@rolfsmeds
Copy link
Contributor

There is in fact a way to target the child of the content slot:
vaadin-app-layout > :not([slot])

(We should mention this in the selector list on the Styling tab.)

@rolfsmeds rolfsmeds added documentation Improvements or additions to documentation and removed enhancement New feature or request labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation vaadin-app-layout
Projects
None yet
Development

No branches or pull requests

3 participants