mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-24 04:25:27 +08:00
[fix] View: guard against browser flexbox bugs
There are various flexbox bugs that can cause views to grow beyond the vertical or horizontal bounds of their container. The width and height styles avoid most of them manifesting.
This commit is contained in:
@@ -105,16 +105,21 @@ const styles = StyleSheet.create({
|
||||
flexBasis: 'auto',
|
||||
flexDirection: 'column',
|
||||
flexShrink: 0,
|
||||
listStyle: 'none',
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
position: 'relative',
|
||||
textDecoration: 'none',
|
||||
// button reset
|
||||
// button and anchor reset
|
||||
backgroundColor: 'transparent',
|
||||
color: 'inherit',
|
||||
font: 'inherit',
|
||||
textAlign: 'inherit'
|
||||
textAlign: 'inherit',
|
||||
textDecoration: 'none',
|
||||
// list reset
|
||||
listStyle: 'none',
|
||||
// fix flexbox bugs
|
||||
maxWidth: '100%',
|
||||
minHeight: 0,
|
||||
minWidth: 0
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user