FluentPopover and z-index #3744
-
As far as I have understood correctly, z-index is set to 9999 for the FluentPopover component. Since I have to display a different div via FluentPopover (it is about help dialogue) I have reduced z-index at FluentPopover via Style but without result. So it seems that this does not work. my question: Is this by design or are there certain reasons why this does not work? I finally solved the problem by assigning z-index=10000 to my div, which I don't really like. I would have preferred to set z-index at FluentPopover down to e.g. 100 and then set 999 for my div. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
We had to make some choices to define the zindex used by the components. But all these values come from the |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, it works as you have described. But I have one more suggestion. While reviewing the Z-Index.cs design token definitions, I noticed that the current values are clustered very close to the upper end of the z-index scale (e.g., DatePickerPopup = 9995, AnchoredRegion = 9995, Menu = 9990, etc.). While this may be functionally sufficient, it raises a few concerns from a scalability and architectural standpoint:
It could be interesting to rethink the ZIndex system with a cleaner and more scalable structure, independent of legacy patterns from older frameworks. For example, instead of using values close to 10000, one could imagine a dedicated range between 0 and 1000, with clearly separated value zones for different component categories and enough space for extensibility. This might improve maintainability, clarity, and developer experience when extending FluentUI with custom components. Not a pressing issue of course, just something to consider for future evolution of the system 😊 Thanks again for your great work and this awesome component library! Best regards |
Beta Was this translation helpful? Give feedback.
Thanks for your feedback and this good reflection.
The version v5 will have less of these zindex because a majority of these features are included in the new web components and often use the
dialog
HTML element.That will solve many of these issues.