Add support for borderRadius
See original GitHub issueWe already have support for specifying border width and border color on a component. Now we would like to have an ability to specify the border radius which will draw curved edges on the component. The API might look like this:
Row.create(c)
.child(
Row.create(c)
....)
.child(
Text.create(c)
.text("Sample with border radius")
.textSizeDip(14))
.child(
Row.create(c)
....)
.borderColor(Color.BLUE)
.borderWidthDip(YogaEdge.BOTTOM, 33)
.borderRadiusDip(TOPLEFT, 2)
.borderRadiusDip(TOPRIGHT, 2)
.build();
Or you can specify one value for all edges something like:
Row.create(c)
.....
.borderRadiusDip(ALL, 2)
.build();
Besides specifying radius in Dip, you should be able to specify it in pixel value, resource attribute, dimension, similar to how borderWidth is defined.
Point of contact: @muraziz
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:8 (4 by maintainers)
Top Results From Across the Web
border-radius - CSS: Cascading Style Sheets - MDN Web Docs
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, ......
Read more >border-radius - CSS-Tricks
You can give any element “rounded corners” by applying a border-radius through CSS. You'll only notice if there is a color change involved....
Read more >CSS border-radius property - W3Schools
The border-radius property defines the radius of the element's corners. Tip: This property allows you to add rounded corners to elements!
Read more >How to add border radius on table row - css - Stack Overflow
The code is as follows (and as theazureshadow noted, for earlier browser support, the various vendor prefixes for border-radius need added).
Read more >border-radius - Can I email
Partially supported in Outlook, Yahoo! Mail. ... The border-radius CSS property rounds the corners of an element's outer border edge.
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
Yes, Border API supports not only border radius, but also other effects such as dotted, dash, multi-color borders. Entry at docs about this API is coming soon.
Rounded corner borders are already supported, now you can add border radius like this:
See https://fblitho.com/docs/borders