Skip to content

Border of View with radius gets overlayed with background color of inner View #3251

@tomer-amir-pan

Description

@tomer-amir-pan

Describe the bug
When I have a View with a border radius and an inner View with a background color, the background seems to be overlayed on top of the border.

To Reproduce

const Doc = () => (
  <Document>
    <Page style={styles.body}>
      <View style={styles.content}>
        <View style={styles.inner}>
        	<Text>content</Text>
        </View>
      </View>
    </Page>
  </Document>
);

Font.register({
  family: 'Oswald',
  src: 'https://fonts.gstatic.com/s/oswald/v13/Y_TKV6o8WovbUd3m_X9aAA.ttf'
});

const styles = StyleSheet.create({
  content: {
    margin: 10,
    borderWidth: 1,
    borderRadius: 5,
  },
  inner: {
    padding: 10,
    backgroundColor: '#ccc'
  },
});

ReactPDF.render(<Doc />);

See live demo here

Expected behavior
Border to be on top of the background

Screenshots
Image

Desktop (please complete the following information):

  • React-pdf version: 4.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions