NativeScript icon indicating copy to clipboard operation
NativeScript copied to clipboard

Allow borders to be applied on a per-side basis in CSS

Open tjvantoll opened this issue 11 years ago • 58 comments

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.

screen shot 2015-09-30 at 8 17 47 am

Update: You can vote for this feature at https://nativescript.ideas.aha.io/ideas/NS-I-110.

Thanks.

tjvantoll avatar Sep 30 '15 12:09 tjvantoll

Yes please :+1:

lscown avatar Oct 01 '15 01:10 lscown

:+1:

PeterStaev avatar Oct 01 '15 10:10 PeterStaev

:+1:

tsvetan-ganev avatar Oct 01 '15 23:10 tsvetan-ganev

:+1:

kishmiryan-karlen avatar Oct 05 '15 20:10 kishmiryan-karlen

@tjvantoll do you have any workaround now?

kishmiryan-karlen avatar Oct 05 '15 20:10 kishmiryan-karlen

:+1:

kvelikov avatar Oct 14 '15 10:10 kvelikov

So how do we set a border to a specific side right now?

rclai avatar Nov 05 '15 19:11 rclai

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.

tjvantoll avatar Nov 05 '15 20:11 tjvantoll

Oh haha okay, thanks.

rclai avatar Nov 05 '15 21:11 rclai

It feature is just vital! :+1:

tenorok avatar Nov 22 '15 16:11 tenorok

+1

stevetayloruk avatar Nov 23 '15 11:11 stevetayloruk

+1

sitefinitysteve avatar Dec 08 '15 14:12 sitefinitysteve

+1

karlix avatar Dec 08 '15 14:12 karlix

+1

firescript avatar Dec 16 '15 20:12 firescript

So how do we set a border to a specific side right now? Like the TabView does for the border-bottom?

RusEu avatar Jan 02 '16 04:01 RusEu

+1

tiagordc avatar Jan 07 '16 08:01 tiagordc

+1

sudomf avatar Jan 19 '16 00:01 sudomf

+5

ghost avatar Feb 01 '16 04:02 ghost

+1

lelong37 avatar Feb 08 '16 13:02 lelong37

+1

dragGH102 avatar Feb 11 '16 16:02 dragGH102