I'm finding that I frequently need to put a border on one side of a UI component, but NativeScript currently does not support this. I'm requesting that the following CSS properties be added:
border-top-width
border-top-color
border-right-width
border-right-color
border-bottom-width
border-bottom-color
border-left-width
border-left-color
To be consistent with CSS, I would also like the border-width
and border-color
shorthands to work like they do in CSS.
Update: You can vote for this feature at https://nativescript.ideas.aha.io/ideas/NS-I-110.
Thanks.
Yes please :+1:
:+1:
:+1:
:+1:
@tjvantoll do you have any workaround now?
:+1:
So how do we set a border to a specific side right now?
What I’ve been doing is something like <stack-layout style="height: 2; border-color: red; border-width: 2;"></stack-layout>
, which is definitely hacky, but it works until per-side borders are truly supported.
Oh haha okay, thanks.
It feature is just vital! :+1:
+1
+1
+1
+1
So how do we set a border to a specific side right now? Like the TabView does for the border-bottom?
+1
+1
+5
+1
+1
+1
+1
+1
+1
Common, lets tag this with "high" we all need it, height:1 StackLayout is suuuuper bloaty and hacky
:+1:
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
Guys, vote here, please: https://nativescript.ideas.aha.io/ideas/NS-I-110
@tjvantoll would you mind add this link to your description?
great idea @Leo.
done!
On May 11, 2016 5:18 AM, "Leo Caseiro" [email protected] wrote:
Guys, vote here, please: https://nativescript.ideas.aha.io/ideas/NS-I-110
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/NativeScript/NativeScript/issues/859#issuecomment-218351516
@leocaseiro: @tjvantoll would you mind add this link to your description?
Done!
And just an fyi to everyone watching here, per-side borders are pretty easy to do on Android, but a complete pain on iOS—which is why this hasn’t been implemented in the modules yet. Getting per-side borders right on iOS is a big engineering challenge, and it’s not as simple as adding a few properties into a list. (Side note: I took a stab at implementing border-bottom on an iOS UITextField
and failed horribly myself.) That being said, we realize there’s a lot of demand here so we do want to tackle this. If you want to see this implemented add your vote to help us prioritize.
+1
👍
👍
+1
probably a dependency to #1763
Will it require :first-child and :last-child pseudo class selectors after it?
+1
+1
@tjvantoll iOS has sufficient APIs to draw it.
FWIW, I just use a background image for what i've needed so far ( a single line underneath an element)
+1
+1
https://github.com/NativeScript/NativeScript/pull/2743 adds basic support for non-uniform borders.
Current limitations are:
... So happy right now
:neckbeard:
Awesome!!!
NOTE: Progress, Slider, Switch and SearchBar do not render borders by design.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment