forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelements.js
More file actions
21 lines (18 loc) · 689 Bytes
/
elements.js
File metadata and controls
21 lines (18 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import styled from 'styled-components';
import css from '@styled-system/css';
import { isIOS } from '@codesandbox/common/lib/utils/platform';
export const Container = styled.div(
css({
flex: 250,
width: 250,
color: 'sideBar.foreground',
zIndex: 10,
backgroundColor: 'sideBar.background',
overflow: 'auto',
fontFamily: 'Inter, sans-serif',
/* There is a bug with ios that causes the sidebar to be longer than the preview, when you then
* scroll the preview it scrolls the editor down (page is longer). If I set this to 100% scrolling
* is broken in Chrome though. That's why we have this check */
height: isIOS ? '100%' : '100vh',
})
);