|
112 | 112 | html {
|
113 | 113 | scrollbar-gutter: stable;
|
114 | 114 | }
|
| 115 | + |
| 116 | +/* |
| 117 | + This is a temporary fix for MUI Modals/Popovers until they are removed. |
| 118 | + When html has scrollbar-gutter: stable, the browser reserves space for the scrollbar. |
| 119 | + MUI Modals/Popovers, when locking body scroll, add `overflow: hidden` and `padding-right` |
| 120 | + to the body to compensate for the scrollbar they are hiding. This added padding-right |
| 121 | + conflicts with the already reserved gutter space, causing a layout shift. |
| 122 | + This rule overrides MUI's added padding-right on the body specifically when MUI |
| 123 | + is likely to have set both overflow:hidden and padding-right. |
| 124 | +*/ |
| 125 | +body[style*="overflow: hidden"][style*="padding-right"] { |
| 126 | +padding-right:0px!important; |
| 127 | +} |
115 | 128 | }
|