Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6a3215
commit 8c3bf35
Showing
8 changed files
with
101 additions
and
0 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,36 @@ | ||
@import "mixins/mixins"; | ||
|
||
$block: fd-scrollbar; | ||
|
||
.#{$block} { | ||
@include fd-reset(); | ||
|
||
overflow: auto; | ||
|
||
/** Firefox | ||
* Currently Firefox doesn't support changing scrollbar color on hover & width but it's allowed by Fiori. | ||
*/ | ||
scrollbar-color: var(--fdScrollbar_Thumb_Color) var(--fdScrollbar_Track_Color); | ||
|
||
/** Chrome, WebKit */ | ||
&::-webkit-scrollbar { | ||
width: var(--fdScrollbar_Dimension); | ||
height: var(--fdScrollbar_Dimension); | ||
} | ||
|
||
&::-webkit-scrollbar-track, | ||
&::-webkit-scrollbar-corner { | ||
background-color: var(--fdScrollbar_Track_Color); | ||
} | ||
|
||
&::-webkit-scrollbar-thumb { | ||
background-color: var(--fdScrollbar_Thumb_Color); | ||
|
||
&:hover, | ||
&:active { | ||
background-color: var(--fdScrollbar_Thumb_Hover_Color); | ||
} | ||
} | ||
|
||
/** For any other browser native scrollbar is used. */ | ||
} |
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
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,6 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots Components/Scrollbar Default 1`] = ` | ||
|
||
|
||
`; |
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,29 @@ | ||
export default { | ||
title: 'Components/Scrollbar', | ||
parameters: { | ||
description: ` | ||
Themeable scrollbar is the scrollbar component made accordingly to the Fiori 3 design guidelines. | ||
Using the themeable scrollbar is preferred over the browser's default in the components that support having scrollbars and made accordingly to the Fiori 3 design guidelines. | ||
Themeable scrollbar works in Chrome, Safari, and other WebKit-based browsers and partially works in Firefox (no hover effects). | ||
Component not working in the IE, default scrollbar is shown instead. | ||
`, | ||
docs: { iframeHeight: 400 }, | ||
tags: ['f3', 'theme', 'development'], | ||
components: ['scrollbar'] | ||
} | ||
}; | ||
|
||
export const defaultExample = () => ` | ||
<div style="width: 300px; height: 100px" class="fd-scrollbar"> | ||
<div style="width: 9000px; height: 9000px;"></div> | ||
</div> | ||
`; | ||
|
||
defaultExample.storyName = 'Default'; | ||
defaultExample.parameters = { | ||
docs: { | ||
iframeHeight: 950, | ||
storyDescription: `To use themeable scrollbar use \`fd-scrollbar\` class on scrollable element. | ||
` | ||
} | ||
}; |