File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/react/src/scroll-area/viewport Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import * as React from 'react';
33import * as ReactDOM from 'react-dom' ;
44import { useStableCallback } from '@base-ui-components/utils/useStableCallback' ;
55import { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect' ;
6+ import { isWebKit } from '@base-ui-components/utils/detectBrowser' ;
67import { useTimeout } from '@base-ui-components/utils/useTimeout' ;
78import type { BaseUIComponentProps } from '../../utils/types' ;
89import { useScrollAreaRootContext } from '../root/ScrollAreaRootContext' ;
@@ -31,7 +32,12 @@ let scrollAreaOverflowVarsRegistered = false;
3132 * under the "Improving CSS variable performance" section.
3233 */
3334function removeCSSVariableInheritance ( ) {
34- if ( scrollAreaOverflowVarsRegistered ) {
35+ if (
36+ scrollAreaOverflowVarsRegistered ||
37+ // When `inherits: false`, specifying `inherit` on child elements doesn't work
38+ // in Safari. To let CSS features work correctly, this optimization must be skipped.
39+ isWebKit
40+ ) {
3541 return ;
3642 }
3743
You can’t perform that action at this time.
0 commit comments