You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drawer header provides header-actions slot which docs state is used for inserting additional icons, preferrably sl-icon-button. We have reusable components which are icon button plus some additional markup&code and this is where default flex positioning for header-actions fails.
This issue happens everywhere where slot provides some default styling provided by SL but the inserted content is not exactly what the slot expects for instance slot might expect an sl-icon but what we insert is a custom component or a div around an icon.
Demo
Our structure
List/grid component will have a SL drawer component defined
In this case, an extra div will be present in the DOM within header-actions slot, so it will end up like this:
So there's an extra div and the Angular components host element, both of which mess up the default provided SL styles.
Obviously we cannot let go of using Angular components, we could in certain cases but not when there's clear reusable functionality and markup references with injection capabilities actually work great.
Screenshots
Flex positioning clearly fails due to the hierarchy being broken
It is also very painful to introduce styles that target those "in-between" levels in DOM. But atm this is my only option.
The text was updated successfully, but these errors were encountered:
Describe the bug
Drawer header provides header-actions slot which docs state is used for inserting additional icons, preferrably sl-icon-button. We have reusable components which are icon button plus some additional markup&code and this is where default flex positioning for header-actions fails.
This issue happens everywhere where slot provides some default styling provided by SL but the inserted content is not exactly what the slot expects for instance slot might expect an sl-icon but what we insert is a custom component or a div around an icon.
Demo
Our structure
List/grid component will have a SL drawer component defined
Details/edit page can provide contents for SL drawer's slot using Angular injection features:
In this case, an extra div will be present in the DOM within header-actions slot, so it will end up like this:
So there's an extra div and the Angular components host element, both of which mess up the default provided SL styles.
Obviously we cannot let go of using Angular components, we could in certain cases but not when there's clear reusable functionality and markup references with injection capabilities actually work great.
Screenshots
Flex positioning clearly fails due to the hierarchy being broken
It is also very painful to introduce styles that target those "in-between" levels in DOM. But atm this is my only option.
The text was updated successfully, but these errors were encountered: