diegomura / diegomura/react-pdf
Style order affects borderColor rendering
- Dominant language
- TypeScript
- Stars
- 16.8k
- Forks
- 1.3k
- Avg merge
- 5h 6m
- Merged PRs (30d)
- 52
Description
**Describe the bug**
There appears to be a style property order dependency issue when using `borderColor` with `borderBottom` together. When `borderColor` is defined before `borderBottom`, the border color remains black (default) instead of taking the specified color.
However, when the properties are reversed (with `borderBottom` first, followed by `borderColor`), the border displays correctly with the specified color.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a PDF document with a `Text` component
2. Apply styling with `borderColor` defined BEFORE `borderBottom`
3. Render the document
4. Observe that the border remains black instead of the specified color
Code snippet that demonstrates the issue:
```jsx
// This doesn't work - border stays black
const notWorkingStyle = {
borderColor: "#15803d",
borderBottom: 2,
};
// This works correctly - border shows green
const workingStyle = {
borderBottom: 2,
borderColor: "#15803d",
};
...
This text has a black border (incorrect)
This text has a green border (correct)
Contributor guide
Assessment
This issue has not been assessed yet.