Merge pull request #2232 from ecency/nt/table-div-fix

Nt/table-div-fix
This commit is contained in:
Feruz M 2022-03-20 19:03:07 +02:00 committed by GitHub
commit 3519e54e75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -281,9 +281,9 @@ export const PostHtmlRenderer = memo(
img: styles.img, img: styles.img,
table: styles.table, table: styles.table,
tr: { ...styles.tr, width: contentWidth }, //center tag causes tr to have 0 width if not exclusivly set, contentWidth help avoid that tr: { ...styles.tr, width: contentWidth }, //center tag causes tr to have 0 width if not exclusivly set, contentWidth help avoid that
th: {...styles.th, minWidth: _minTableColWidth}, th: { ...styles.th, minWidth: _minTableColWidth},
td: {...styles.td, minWidth: _minTableColWidth}, td: { ...styles.td, minWidth: _minTableColWidth},
div:{width:contentWidth}, div: { ...styles.div, maxWidth:contentWidth }, //makes sure width covers the available horizontal space for view and not exceed the contentWidth if parent bound id not defined
blockquote: styles.blockquote, blockquote: styles.blockquote,
code: styles.code, code: styles.code,
li: styles.li, li: styles.li,

View File

@ -12,13 +12,15 @@ export default EStyleSheet.create({
body: { body: {
color: '$primaryBlack', color: '$primaryBlack',
} as TextStyle, } as TextStyle,
div: {
width:'100%',
},
p:{ p:{
marginTop:6, marginTop:6,
marginBottom:6, marginBottom:6,
flexDirection:'row', flexDirection:'row',
alignItems:'center', alignItems:'center',
flexWrap:'wrap' flexWrap:'wrap'
} as TextStyle, } as TextStyle,
pLi:{ pLi:{
marginTop:0, marginTop:0,