diff --git a/addons/a11y/src/components/__snapshots__/A11YPanel.test.js.snap b/addons/a11y/src/components/__snapshots__/A11YPanel.test.js.snap
index fd6ba69231f6..491016a4c4a7 100644
--- a/addons/a11y/src/components/__snapshots__/A11YPanel.test.js.snap
+++ b/addons/a11y/src/components/__snapshots__/A11YPanel.test.js.snap
@@ -105,7 +105,9 @@ exports[`A11YPanel should render loader when it's running 1`] = `
exports[`A11YPanel should render report 1`] = `
.emotion-0 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
}
.emotion-4 {
@@ -215,7 +217,6 @@ exports[`A11YPanel should render report 1`] = `
"110qmus": true,
"1551xjo": true,
"15paq49": true,
- "176o2y5": true,
"1977chw": true,
"19mcg9j": true,
"1ez3l8h": true,
@@ -225,6 +226,7 @@ exports[`A11YPanel should render report 1`] = `
"1vwgrhn": true,
"4ryd4s": true,
"6hqipu": true,
+ "6z0ulf": true,
"animation-u07e3c": true,
"aq4p19": true,
"fg630j": true,
@@ -241,9 +243,9 @@ exports[`A11YPanel should render report 1`] = `
"key": "css",
"nonce": undefined,
"registered": Object {
- "emotion-0": "overflow-y:auto;overflow-x:auto;",
"css-1977chw": "height:10px;width:10px;min-width:10px;color:#999999;margin-right:10px;transition:transform 0.1s ease-in-out;align-self:center;display:inline-flex;",
"css-1l7fvsg": "height:12px;width:12px;margin-right:4px;",
+ "emotion-0": "overflow-y:auto;height:100%;overflow-x:auto;width:100%;",
"css-jb2puo": "height:12px;width:12px;margin-right:4px;animation:animation-u07e3c 1s linear infinite;;",
"css-tkevr6": "display:flex;align-items:center;justify-content:center;height:100%;",
},
@@ -254,7 +256,7 @@ exports[`A11YPanel should render report 1`] = `
data-emotion="css-global"
>
- [data-simplebar]{position:relative;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;width:inherit;height:inherit;max-width:inherit;max-height:inherit;}
+ [data-simplebar]{position:relative;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}
,
diff --git a/examples/official-storybook/stories/__snapshots__/addon-info.stories.storyshot b/examples/official-storybook/stories/__snapshots__/addon-info.stories.storyshot
index 8bb2ec3fcf2e..38d1c48e41de 100644
--- a/examples/official-storybook/stories/__snapshots__/addon-info.stories.storyshot
+++ b/examples/official-storybook/stories/__snapshots__/addon-info.stories.storyshot
@@ -1252,7 +1252,9 @@ exports[`Storyshots Addons|Info/Markdown Displays Markdown in description 1`] =
.emotion-2 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
@@ -4612,7 +4614,9 @@ exports[`Storyshots Addons|Info/Parameters Overwrite the parameters with markdow
.emotion-2 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
@@ -5258,7 +5262,9 @@ exports[`Storyshots Addons|Info/Parameters Overwrite the text parameter with mar
.emotion-2 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
@@ -9500,7 +9506,9 @@ exports[`Storyshots Addons|Info/deprecated Displays Markdown in description 1`]
.emotion-2 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
diff --git a/examples/official-storybook/tests/__snapshots__/storyshots.test.js.snap b/examples/official-storybook/tests/__snapshots__/storyshots.test.js.snap
index 38694b527cc6..6da1f644e7f3 100644
--- a/examples/official-storybook/tests/__snapshots__/storyshots.test.js.snap
+++ b/examples/official-storybook/tests/__snapshots__/storyshots.test.js.snap
@@ -2538,8 +2538,8 @@ exports[`Storyshots Basics|ScrollArea both 1`] = `
.emotion-401 {
white-space: nowrap;
line-height: 0px;
- max-width: 500px;
- max-height: 500px;
+ width: 500px;
+ height: 500px;
overflow: hidden;
}
@@ -2557,14 +2557,16 @@ exports[`Storyshots Basics|ScrollArea both 1`] = `
.emotion-400 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
}
.emotion-401 {
white-space: nowrap;
line-height: 0px;
- max-width: 500px;
- max-height: 500px;
+ width: 500px;
+ height: 500px;
overflow: hidden;
}
@@ -2582,7 +2584,9 @@ exports[`Storyshots Basics|ScrollArea both 1`] = `
.emotion-400 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
}
`;
+exports[`Storyshots Basics|ScrollArea withOuterBorder 1`] = `
+.emotion-1 {
+ white-space: nowrap;
+ line-height: 0px;
+ width: 500px;
+ height: 500px;
+ overflow: hidden;
+}
+
+.emotion-0 {
+ overflow-y: auto;
+ height: 100%;
+ overflow-x: auto;
+ width: 100%;
+}
+
+.emotion-1 {
+ white-space: nowrap;
+ line-height: 0px;
+ width: 500px;
+ height: 500px;
+ overflow: hidden;
+}
+
+.emotion-0 {
+ overflow-y: auto;
+ height: 100%;
+ overflow-x: auto;
+ width: 100%;
+}
+
+
+`;
+
exports[`Storyshots Core|Decorators all 1`] = `
Array [
@@ -5893,6 +5990,7 @@ exports[`Storyshots UI|Settings/ShortcutsScreen default shortcuts 1`] = `
.emotion-8 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
@@ -6385,6 +6483,7 @@ exports[`Storyshots UI|Settings/ShortcutsScreen default shortcuts 1`] = `
.emotion-8 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
@@ -7728,6 +7827,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = `
.emotion-77 {
overflow-y: auto;
+ height: 100%;
overflow-x: hidden;
}
@@ -8087,6 +8187,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = `
.emotion-77 {
overflow-y: auto;
+ height: 100%;
overflow-x: hidden;
}
@@ -8866,6 +8967,7 @@ exports[`Storyshots UI|Sidebar/Sidebar simple 1`] = `
.emotion-48 {
overflow-y: auto;
+ height: 100%;
overflow-x: hidden;
}
@@ -9354,6 +9456,7 @@ exports[`Storyshots UI|Sidebar/Sidebar simple 1`] = `
.emotion-48 {
overflow-y: auto;
+ height: 100%;
overflow-x: hidden;
}
diff --git a/lib/components/src/ScrollArea/ScrollArea.stories.tsx b/lib/components/src/ScrollArea/ScrollArea.stories.tsx
index 93e558795458..349024ae9ce2 100644
--- a/lib/components/src/ScrollArea/ScrollArea.stories.tsx
+++ b/lib/components/src/ScrollArea/ScrollArea.stories.tsx
@@ -17,8 +17,8 @@ const Block = styled.span({
const Wrapper = styled.div({
whiteSpace: 'nowrap',
lineHeight: '0px',
- maxWidth: 500,
- maxHeight: 500,
+ width: 500,
+ height: 500,
overflow: 'hidden',
});
@@ -70,3 +70,16 @@ export const both = () => (
))}
);
+
+export const withOuterBorder = () => (
+
+
+
+);
diff --git a/lib/components/src/ScrollArea/ScrollArea.tsx b/lib/components/src/ScrollArea/ScrollArea.tsx
index c95b5c6fffa7..10a289b64e64 100644
--- a/lib/components/src/ScrollArea/ScrollArea.tsx
+++ b/lib/components/src/ScrollArea/ScrollArea.tsx
@@ -21,6 +21,7 @@ const Scroll = styled(({ vertical, horizontal, ...rest }: ScrollProps) =>
!horizontal
@@ -29,6 +30,7 @@ const Scroll = styled(({ vertical, horizontal, ...rest }: ScrollProps) => Interpolation = (theme: Them
justifyContent: 'flex-start',
alignContent: 'flex-start',
alignItems: 'flex-start',
- width: 'inherit',
- height: 'inherit',
- maxWidth: 'inherit',
- maxHeight: 'inherit',
},
'.simplebar-wrapper': {
@@ -39,7 +35,6 @@ export const getScrollAreaStyles: (theme: Theme) => Interpolation = (theme: Them
'.simplebar-offset': {
direction: 'inherit !important' as 'inherit',
- boxSizing: 'inherit !important' as 'inherit',
resize: 'none !important' as 'none',
position: 'absolute',
top: 0,
@@ -51,18 +46,11 @@ export const getScrollAreaStyles: (theme: Theme) => Interpolation = (theme: Them
WebkitOverflowScrolling: 'touch',
},
- '.simplebar-content': {
+ '.simplebar-content-wrapper': {
direction: 'inherit',
- boxSizing: 'border-box !important' as 'border-box',
position: 'relative',
display: 'block',
- height:
- '100% /* Required for horizontal native scrollbar to not appear if parent is taller than natural height */',
- width: 'auto',
visibility: 'visible',
- overflow: 'scroll',
- maxWidth: '100% /* Not required for horizontal scroll to trigger */',
- maxHeight: '100% /* Needed for vertical scroll to trigger */',
},
'.simplebar-placeholder': {
@@ -73,7 +61,6 @@ export const getScrollAreaStyles: (theme: Theme) => Interpolation = (theme: Them
},
'.simplebar-height-auto-observer-wrapper': {
- boxSizing: 'inherit !important' as 'inherit',
height: '100%',
width: 'inherit',
maxWidth: 1,
@@ -91,7 +78,6 @@ export const getScrollAreaStyles: (theme: Theme) => Interpolation = (theme: Them
},
'.simplebar-height-auto-observer': {
- boxSizing: 'inherit',
display: 'block',
opacity: 0,
position: 'absolute',
@@ -112,36 +98,39 @@ export const getScrollAreaStyles: (theme: Theme) => Interpolation = (theme: Them
right: 0,
bottom: 0,
pointerEvents: 'none',
+ overflow: 'hidden',
+ },
+
+ '[data-simplebar].simplebar-dragging .simplebar-track': {
+ pointerEvents: 'all',
},
'.simplebar-scrollbar': {
position: 'absolute',
right: 2,
- width: 6,
+ width: 7,
minHeight: 10,
},
'.simplebar-scrollbar:before': {
position: 'absolute',
content: '""',
- borderRadius: 6,
+ background: 'black',
+ borderRadius: 7,
left: 0,
right: 0,
opacity: 0,
transition: 'opacity 0.2s linear',
- background: theme.base === 'light' ? theme.color.darkest : theme.color.lightest,
},
'.simplebar-track .simplebar-scrollbar.simplebar-visible:before': {
- /* When hovered, remove all transitions from drag handle */
- opacity: 0.2,
+ opacity: 0.5,
transition: 'opacity 0s linear',
},
'.simplebar-track.simplebar-vertical': {
top: 0,
- width: 10,
- right: 0,
+ width: 11,
},
'.simplebar-track.simplebar-vertical .simplebar-scrollbar:before': {
@@ -151,8 +140,7 @@ export const getScrollAreaStyles: (theme: Theme) => Interpolation = (theme: Them
'.simplebar-track.simplebar-horizontal': {
left: 0,
- height: 10,
- bottom: 0,
+ height: 11,
},
'.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before': {
@@ -165,26 +153,14 @@ export const getScrollAreaStyles: (theme: Theme) => Interpolation = (theme: Them
right: 'auto',
left: 0,
top: 2,
- height: 6,
+ height: 7,
minHeight: 0,
minWidth: 10,
width: 'auto',
},
- /* Rtl support */
'[data-simplebar-direction="rtl"] .simplebar-track.simplebar-vertical': {
right: 'auto',
left: 0,
},
-
- '.hs-dummy-scrollbar-size': {
- direction: 'rtl',
- position: 'fixed',
- opacity: 0,
- visibility: 'hidden',
- height: 500,
- width: 500,
- overflowY: 'hidden',
- overflowX: 'scroll',
- },
});
diff --git a/lib/components/src/syntaxhighlighter/__snapshots__/syntaxhighlighter.stories.storyshot b/lib/components/src/syntaxhighlighter/__snapshots__/syntaxhighlighter.stories.storyshot
index a64d29eba110..93be86c3fca9 100644
--- a/lib/components/src/syntaxhighlighter/__snapshots__/syntaxhighlighter.stories.storyshot
+++ b/lib/components/src/syntaxhighlighter/__snapshots__/syntaxhighlighter.stories.storyshot
@@ -3,7 +3,9 @@
exports[`Storyshots Basics|SyntaxHighlighter bash 1`] = `
.emotion-2 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
@@ -280,7 +282,9 @@ exports[`Storyshots Basics|SyntaxHighlighter bordered & copy-able 1`] = `
.emotion-2 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
@@ -771,7 +775,9 @@ exports[`Storyshots Basics|SyntaxHighlighter bordered & copy-able 1`] = `
exports[`Storyshots Basics|SyntaxHighlighter jsx 1`] = `
.emotion-2 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
@@ -1239,7 +1245,9 @@ exports[`Storyshots Basics|SyntaxHighlighter jsx 1`] = `
exports[`Storyshots Basics|SyntaxHighlighter padded 1`] = `
.emotion-2 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
@@ -1677,7 +1685,9 @@ exports[`Storyshots Basics|SyntaxHighlighter padded 1`] = `
exports[`Storyshots Basics|SyntaxHighlighter showLineNumbers 1`] = `
.emotion-2 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
@@ -2147,7 +2157,9 @@ exports[`Storyshots Basics|SyntaxHighlighter showLineNumbers 1`] = `
exports[`Storyshots Basics|SyntaxHighlighter story 1`] = `
.emotion-2 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
diff --git a/lib/components/src/tabs/__snapshots__/tabs.stories.storyshot b/lib/components/src/tabs/__snapshots__/tabs.stories.storyshot
index 38f94e45e796..a936ac0a198e 100644
--- a/lib/components/src/tabs/__snapshots__/tabs.stories.storyshot
+++ b/lib/components/src/tabs/__snapshots__/tabs.stories.storyshot
@@ -4,6 +4,7 @@ exports[`Storyshots Basics|Tabs stateful - dynamic 1`] = `
.emotion-9 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
@@ -347,6 +348,7 @@ exports[`Storyshots Basics|Tabs stateful - no initial 1`] = `
.emotion-9 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
@@ -646,6 +648,7 @@ exports[`Storyshots Basics|Tabs stateful - static 1`] = `
.emotion-5 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
@@ -903,6 +906,7 @@ exports[`Storyshots Basics|Tabs stateless - absolute 1`] = `
.emotion-9 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
@@ -1276,6 +1280,7 @@ exports[`Storyshots Basics|Tabs stateless - bordered 1`] = `
.emotion-9 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
@@ -1650,6 +1655,7 @@ exports[`Storyshots Basics|Tabs stateless - with tools 1`] = `
.emotion-10 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
diff --git a/lib/ui/src/components/panel/__snapshots__/panel.stories.storyshot b/lib/ui/src/components/panel/__snapshots__/panel.stories.storyshot
index 53ac79a14eb3..e47ade3cbf0d 100644
--- a/lib/ui/src/components/panel/__snapshots__/panel.stories.storyshot
+++ b/lib/ui/src/components/panel/__snapshots__/panel.stories.storyshot
@@ -17,6 +17,7 @@ exports[`Storyshots UI|Panel default 1`] = `
.emotion-12 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
diff --git a/lib/ui/src/components/preview/__snapshots__/preview.stories.storyshot b/lib/ui/src/components/preview/__snapshots__/preview.stories.storyshot
index 6c0bc9320fe5..0f95e084a9ff 100644
--- a/lib/ui/src/components/preview/__snapshots__/preview.stories.storyshot
+++ b/lib/ui/src/components/preview/__snapshots__/preview.stories.storyshot
@@ -73,6 +73,7 @@ Array [
.emotion-23 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
@@ -512,6 +513,7 @@ Array [
.emotion-29 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
diff --git a/lib/ui/src/settings/__snapshots__/about.stories.storyshot b/lib/ui/src/settings/__snapshots__/about.stories.storyshot
index 32a0682a7f34..59762040f62c 100644
--- a/lib/ui/src/settings/__snapshots__/about.stories.storyshot
+++ b/lib/ui/src/settings/__snapshots__/about.stories.storyshot
@@ -17,6 +17,7 @@ exports[`Storyshots UI|Settings/AboutScreen failed to fetch new version 1`] = `
.emotion-8 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
@@ -599,6 +600,7 @@ exports[`Storyshots UI|Settings/AboutScreen new version required 1`] = `
.emotion-8 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;
@@ -1446,7 +1448,9 @@ exports[`Storyshots UI|Settings/AboutScreen new version required 1`] = `
.emotion-20 {
overflow-y: auto;
+ height: 100%;
overflow-x: auto;
+ width: 100%;
position: relative;
}
@@ -2111,6 +2115,7 @@ exports[`Storyshots UI|Settings/AboutScreen up to date 1`] = `
.emotion-8 {
overflow-y: hidden;
overflow-x: auto;
+ width: 100%;
color: #999999;
width: 100%;
height: 40px;