Open NickIliev opened 1 year ago
The described issue is not explicitly related to the Pager component but to all ThemeBuilder templates where the component supports different states (e.g., active, hover, selected, etc.).
That said, the proper solution requires re-designing the ThemeBuilder state template in multiple ThemeBuilder templates. The team is researching the best approach to handle the case, requiring significant rework.
Meanwhile, the temporary workaround is for the user to set the state style in a specific order - where the style he wants to have higher specificity should be placed last, and the state style with the lowest specificity should be set first. For example:
Important: In the current state, once the order is set, it can't be reset through the ThemeBuilder's UI. The only possible approach to reset the order is to explicitly delete the affected selectors from the project's metadata (that requires export metadata > delete the affected selectors > import metadata). Note that deleting metadata will result in reverting the styles of that component/template to their original state.
+1 from t.1648665
Reproducible with ButtonGroup when using the Selected and Hover templates and triggering both states.
Describe the bug
Currently, in the ThemeBuilder template for Pager > Pages, the styles for Hover will always overwrite (or mask) the color styles for the Selected state if the Hover styles are applied after the Selected styles.
As a result, the combination of Hover + Selected produces undesired results (like unexpected masking of colors that are explicitly set for a specific state). If you set the Hover state before the Selected state style, the issue is not present.
However, the bug is critical as there is no means to recover if the ThemeBuilder project already has wrongly set styles (resetting and removing styles does not resolve the issue).
To Reproduce Steps to reproduce the behavior:
Expected behavior When styles are explicitly set, the 'Selected' template should overwrite the 'Hover' template, and no color masking should appear.
Additional context Reported through t.1625874 Discussed with @kvelikov