-
Notifications
You must be signed in to change notification settings - Fork 612
Description
🐛 Bug Report
In the shadow root of the fluent-tabs component, the div with the class "tabpanel" is missing the part="tabpanel" attribute.
Instead the part="tabpanel" attribute has been added to the slot element within the div.
This means we are unable to select it in CSS and therefore are unable to style it.
The workaround below uses JavaScript to manually add and remove styles.
💻 Repro or Code Sample
🤔 Expected Behavior
Expected behavior
div class="tabpanel" part="tabpanel"
😯 Current Behavior
Current behavior (our workaround due to this bug):
Unable to access the tabpanel css since it is in the shadom-root with no "part" attribute
Due to this we are:
- creating a @change listener to determine when a user changes tabs
-parsing the data to determine the current tab is "home-tab" - adding and removing classes to the :host to add specific styles to the "home-tab" tabpanel
-adding/removing classes when the connectedCallback() is called, so on refresh the correct styles are applied when the default tab ("home-tab") is open
💁 Possible Solution
div class="tabpanel" part="tabpanel"
🔦 Context
Instead the part="tabpanel" attribute has been added to the slot element within the div.
This means we are unable to select it in CSS and therefore are unable to style it.
The workaround below uses JavaScript to manually add and remove styles.


