diff --git a/docs/2-advanced/10-scrollbars-customization.md b/docs/2-advanced/10-scrollbars-customization.md index 5bcc13d88a87..823727536ea5 100644 --- a/docs/2-advanced/10-scrollbars-customization.md +++ b/docs/2-advanced/10-scrollbars-customization.md @@ -8,13 +8,13 @@ By default, some of the components provide additional CSS styles, which are appl ## Setting Default Scrollbar Styles to Components -To use native scrollbar styles, you have to add the CSS style class `.ui5-content-native-scrollbars` to the body element of your application. +To use native scrollbar styles, you have to add the CSS style class `.ui5-content-native-scrollbars` to the HTML element of your application. **Note: Because of some browser restrictions, this setting takes effect if it is applied before the initial rendering of the components, which use it.** Example: ```html - + ... - + ``` diff --git a/packages/base/src/css/ScrollbarStyles.css b/packages/base/src/css/ScrollbarStyles.css index 3e998eecf820..98573cb78076 100644 --- a/packages/base/src/css/ScrollbarStyles.css +++ b/packages/base/src/css/ScrollbarStyles.css @@ -1,3 +1,3 @@ -html:not(:has(.ui5-content-native-scrollbars)) { +html:not(.ui5-content-native-scrollbars) { scrollbar-color: var(--sapScrollBar_FaceColor) var(--sapScrollBar_TrackColor); } \ No newline at end of file