This pull request changes how to apply the CSS styles to the sidebar header when the sidebar_editable property is set as false. Instead of accesing the elements and change their CSS through their style property, fixed CSS rules are added to the sidebar custom CSSs, and these CSS rules are activated when a data-parameter is present in the menu element. On top of that, instead of querying the shadowRoot of the sidebar, the menu element is retrieved in an async way using query feature of home-assistant-query-selector.
coverage: 99.766% (+0.4%) from 99.318%
when pulling 7c1c68737e672c544e52ef65ef017b30d2502da0 on manage_menu_block_with_styles
into dc1c291fd572e34e906f02d76b8cf04a7fcaca57 on master.
This pull request changes how to apply the CSS styles to the sidebar header when the
sidebar_editable
property is set asfalse
. Instead of accesing the elements and change their CSS through theirstyle
property, fixed CSS rules are added to the sidebar custom CSSs, and these CSS rules are activated when adata-parameter
is present in the menu element. On top of that, instead of querying the shadowRoot of the sidebar, the menu element is retrieved in an async way using query feature ofhome-assistant-query-selector
.