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

🚀 - Drawer should not define content styles #9680

Open
hakimio opened this issue Nov 4, 2024 · 7 comments
Open

🚀 - Drawer should not define content styles #9680

hakimio opened this issue Nov 4, 2024 · 7 comments
Labels
contributions welcome Architecture is clear and community can help P3 This issue has low priority

Comments

@hakimio
Copy link
Contributor

hakimio commented Nov 4, 2024

Description

When migrating from the old Sidebar to the new Drawer component I've noticed that the new component forces content styles on you.
Now in order to customize content CSS you have to use ::ng-deep on the .t-content element.
This is an issue not only if you want custom paddings, but also if you want custom background or custom content height (ie 100%).

I would suggest making .t-content into display: contents kind of element and let users supply their own content styles instead.

@waterplea
Copy link
Collaborator

waterplea commented Nov 5, 2024

We want it to follow our design specs out of the box but be easily customizable. Maybe we can move padding to host element and then compensate it with negative margins on header and footer? I assume if you want custom padding, you are not using header + footer? Alternatively to negative margins we can use box-shadow to cover content when header is sticky and some of the content might stick out to the padding area.

@hakimio
Copy link
Contributor Author

hakimio commented Nov 5, 2024

No, I am not using header and footer.
Negative margin workaround works for me.

@waterplea
Copy link
Collaborator

Would you like to make a PR to speed it up?

@hakimio
Copy link
Contributor Author

hakimio commented Nov 5, 2024

I can do it.

@waterplea waterplea added contributions welcome Architecture is clear and community can help P3 This issue has low priority and removed state: need triage labels Nov 5, 2024
@hakimio
Copy link
Contributor Author

hakimio commented Nov 6, 2024

Unfortunately, the simple trick with negative margins doesn't work because of the scrollbar:

Image

Feel free to look into this when you have some time.

@waterplea
Copy link
Collaborator

Ok, but that's not going to be soon because I'll be away for a few weeks

@hakimio
Copy link
Contributor Author

hakimio commented Nov 6, 2024

That's ok, it's not a major issue.

@waterplea waterplea removed the feature label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions welcome Architecture is clear and community can help P3 This issue has low priority
Development

No branches or pull requests

2 participants