-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(framework): reset scrollbar styles class (#5623)
- Loading branch information
Showing
9 changed files
with
54 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Scrollbars customization | ||
|
||
By default some of the components provide additional CSS styles, which are applied to their scrollbars, in order to achieve their target design. | ||
|
||
## Setting default scrollbar styles to components | ||
|
||
To use native scrollbar styles, you have to add the CSS style class `.ui5-content-native-scrollbars` on the body element of your application. | ||
|
||
**Note: Because of some browser restrictions this setting takes affect if it is applied before the initial rendering of the compontents, which are using it.** | ||
|
||
Example 1: | ||
``` | ||
<body class="ui5-content-native-scrollbars"> | ||
... | ||
</body> | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const NO_SCROLLBAR_STYLE_CLASS = "ui5-content-native-scrollbars"; | ||
|
||
const getEffectiveScrollbarStyle = () => document.body.classList.contains(NO_SCROLLBAR_STYLE_CLASS); | ||
|
||
export default getEffectiveScrollbarStyle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div | ||
class="ui5-list-root" | ||
class="{{classes.root}}" | ||
@focusin="{{_onfocusin}}" | ||
@keydown="{{_onkeydown}}" | ||
> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
::-webkit-scrollbar:horizontal { | ||
:not(.ui5-content-native-scrollbars) ::-webkit-scrollbar:horizontal { | ||
height: var(--sapScrollBar_Dimension); | ||
} | ||
|
||
::-webkit-scrollbar:vertical { | ||
:not(.ui5-content-native-scrollbars) ::-webkit-scrollbar:vertical { | ||
width: var(--sapScrollBar_Dimension); | ||
} | ||
|
||
::-webkit-scrollbar { | ||
:not(.ui5-content-native-scrollbars) ::-webkit-scrollbar { | ||
background-color: var(--sapScrollBar_TrackColor); | ||
border-left: var(--browser_scrollbar_border); | ||
} | ||
|
||
::-webkit-scrollbar-thumb { | ||
:not(.ui5-content-native-scrollbars) ::-webkit-scrollbar-thumb { | ||
border-radius: var(--browser_scrollbar_border_radius); | ||
background-color: var(--sapScrollBar_FaceColor); | ||
} | ||
|
||
::-webkit-scrollbar-thumb:hover { | ||
:not(.ui5-content-native-scrollbars) ::-webkit-scrollbar-thumb:hover { | ||
background-color: var(--sapScrollBar_Hover_FaceColor); | ||
} | ||
|
||
::-webkit-scrollbar-corner { | ||
:not(.ui5-content-native-scrollbars) ::-webkit-scrollbar-corner { | ||
background-color: var(--sapScrollBar_TrackColor); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters