Nativescript: Add linear gradient color in NS for CSS background

Created on 18 May 2016  路  10Comments  路  Source: NativeScript/NativeScript

Most helpful comment

Hey @karumurikiran,

I've recently added support for clip-path CSS property and I will extend this with linear-gradient as well!

Here is something for iOS already working:

 <Button text="rect" style="clip-path: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet); border-width:2; border-color: blue; " />

screen shot 2016-05-18 at 3 05 43 pm

All 10 comments

Hey @karumurikiran,

I've recently added support for clip-path CSS property and I will extend this with linear-gradient as well!

Here is something for iOS already working:

 <Button text="rect" style="clip-path: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet); border-width:2; border-color: blue; " />

screen shot 2016-05-18 at 3 05 43 pm

Actually it will be better if we can specify linear-gradient as CSS background. In this case we will have both gradient and shape if needed.

Lets get this bad-boy into the docs asap

@enchev; is linear-gradient actually supported; I'm not seeing any code for this in the tns-core-modules...

@NathanaelA Unfortunately still not. Not enough time to finish this.

has this been added yet?

Is it added or not ?

I suggest closing this issue and tracking further updates on support for CSS gradients in {N} here:
https://github.com/NativeScript/NativeScript/issues/539

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NordlingDev picture NordlingDev  路  3Comments

dhanalakshmitawwa picture dhanalakshmitawwa  路  3Comments

hshristov picture hshristov  路  3Comments

kn9ts picture kn9ts  路  3Comments

NickIliev picture NickIliev  路  3Comments