-
Notifications
You must be signed in to change notification settings - Fork 32
Add border gap and color #696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for the feedback and visual. Most (all) designs want outside and that is the default with CSS / Web. I've never seen an inside border before Lightning. Additionally, I'm not sure what a "center" alignment would be nor what value that would offer which makes it best to just drop that. A gap going inside might be weird as well. Inside border probably shouldn't support a gap. I don't think the graphic represents that correctly. I would think a gap is before the border starts, so you'd have Blue, redline, and an interior border after the gap. So if we do inside and outside alignment, gap would only be supported on outside. I think we're just increasing complexity for a feature folks won't use. I'll work on the Border and canvas shader.. @elsassph Any comment from you? |
|
Regarding the alignment: Vector Graphics & UI Design Software (e.g., Adobe Illustrator, Sketch, Figma) In applications like Figma, the default border (or stroke) alignment is typically "inside" the frame or path of the element.
The default is often "inside". Regarding the gap: It's fine if you only want to apply it only when the border falls outside of the node. However I'm kind of questioning if this is not one of those features most folks won't use either. |
|
We are very interested in seeing this feature supported natively in the renderer. The 'focus ring' on a selected component is a foundational pattern in modern TV UI design. Having this included and optimized at the renderer level would be a significant win for both performance and developer experience. |
|
I looked at a couple apps available on my tv, and all of them (Netflix, Prime, Youtube, Spotify) use an outer border to present the active element. Prime and Spotify also use an outer border gap, so I think this is a widely used feature and it would be great to add additional support for it ! |
| * | ||
| * @default 0 | ||
| */ | ||
| 'border-gap': number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add it directly to BorderProps instead ?

Update Rounded & Border shaders to add border-gap and border-gapColor properties to support offset borders and fill colors inside the gap.
This PR allows gap: 6, gap: 0, and gap: -6 to allow inset