The component should be transparent outside the border
See original GitHub issue- I have searched existing issues and this is not a duplicate
Version
0.6.2-SNAPSHOT (b0b286e1aeb45fd368b8e2764a6269f1590afa2e)
Issues and Steps to Reproduce
Apply rounded corner and background color on a component
Expected Behavior
The component should be transparent outside the border
Example code
Row.create(c)
.child(
Text.create(c)
.textSizeSp(20)
.text("This component has rounded corners + background color"))
.border(
Border.create(c)
.widthDip(YogaEdge.ALL, 10)
.color(YogaEdge.ALL, NiceColor.GREEN)
.cornerEffect(40f)
.build()
)
.backgroundColor(NiceColor.BLUE)
.paddingDip(YogaEdge.ALL, 10)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Can you set a border opacity in CSS? - Stack Overflow
I've added background-clip: padding-box; to the examples above to ensure the border remains transparent even if a solid background color is ...
Read more >Create a transparent border with CSS - GeeksforGeeks
In CSS, we can create a transparent border by using the border property in a nested div tag. The steps to create this...
Read more >Uses of Package javax.swing.border (Java Platform SE 7 )
A composite Border class used to compose two Border objects into a single border by nesting an inside Border object within the insets...
Read more >outline-offset - CSS: Cascading Style Sheets - MDN Web Docs
An outline is a line that is drawn around an element, outside the border edge. The space between an element and its outline...
Read more >How To Use Opacity and Transparency to Create a Modal in ...
You can accomplish these effects with the opacity property, the transparent color name, or alpha channels, which are an extension of color ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the report, I’ll see what I can do about this. The issue is that the background and border are both handled separately, so one does not know of the other.
So looking more into this, there are some issues with adding in support. The biggest issue is clipping to an arbitrary border outline. While technically possible, it will introduce pretty big performance issues, especially on lower API levels, since clipPath is only hardware accelerated on APIs 18+. Additionally, clipPath isn’t anti aliased with hardware acceleration.
We can definitely add in this support later on in the project’s lifetime if we update the min sdk to 21+