File size: 689 Bytes
84c1942
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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',
  })
);