NativeScript-Vue button with linear gradient background and image
up vote
2
down vote
favorite
In NativeScript with vue.js, I'm trying to figure out if it is possible to have a button which has a linear gradient background and shows an image above the button text. When I set up the CSS to do that, it doesn't seem to work.
I set up a playground to demonstrate: https://play.nativescript.org/?template=play-vue&id=kICEBa&v=1.
Am I doing something wrong, or is this simply not supported by NativeScript-Vue?
If it's not supported by CSS, is there some other way to achieve this result?
vue.js nativescript nativescript-vue
add a comment |
up vote
2
down vote
favorite
In NativeScript with vue.js, I'm trying to figure out if it is possible to have a button which has a linear gradient background and shows an image above the button text. When I set up the CSS to do that, it doesn't seem to work.
I set up a playground to demonstrate: https://play.nativescript.org/?template=play-vue&id=kICEBa&v=1.
Am I doing something wrong, or is this simply not supported by NativeScript-Vue?
If it's not supported by CSS, is there some other way to achieve this result?
vue.js nativescript nativescript-vue
Have you tried that outside of a nativescript application?
– Jonas
Nov 10 at 20:56
Jonas, I only tried this inside NativeScript.
– ppritcha
Nov 12 at 22:25
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
In NativeScript with vue.js, I'm trying to figure out if it is possible to have a button which has a linear gradient background and shows an image above the button text. When I set up the CSS to do that, it doesn't seem to work.
I set up a playground to demonstrate: https://play.nativescript.org/?template=play-vue&id=kICEBa&v=1.
Am I doing something wrong, or is this simply not supported by NativeScript-Vue?
If it's not supported by CSS, is there some other way to achieve this result?
vue.js nativescript nativescript-vue
In NativeScript with vue.js, I'm trying to figure out if it is possible to have a button which has a linear gradient background and shows an image above the button text. When I set up the CSS to do that, it doesn't seem to work.
I set up a playground to demonstrate: https://play.nativescript.org/?template=play-vue&id=kICEBa&v=1.
Am I doing something wrong, or is this simply not supported by NativeScript-Vue?
If it's not supported by CSS, is there some other way to achieve this result?
vue.js nativescript nativescript-vue
vue.js nativescript nativescript-vue
asked Nov 10 at 16:35
ppritcha
885
885
Have you tried that outside of a nativescript application?
– Jonas
Nov 10 at 20:56
Jonas, I only tried this inside NativeScript.
– ppritcha
Nov 12 at 22:25
add a comment |
Have you tried that outside of a nativescript application?
– Jonas
Nov 10 at 20:56
Jonas, I only tried this inside NativeScript.
– ppritcha
Nov 12 at 22:25
Have you tried that outside of a nativescript application?
– Jonas
Nov 10 at 20:56
Have you tried that outside of a nativescript application?
– Jonas
Nov 10 at 20:56
Jonas, I only tried this inside NativeScript.
– ppritcha
Nov 12 at 22:25
Jonas, I only tried this inside NativeScript.
– ppritcha
Nov 12 at 22:25
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
I don't think having both on same element is yet supported. You may raise a feature request to support both.
Meanwhile wrap your button with a layout / content view and apply the gradient on it.
1
Wrapping the button in a content view works. I updated the playground with the solution: link
– ppritcha
Nov 10 at 17:13
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
I don't think having both on same element is yet supported. You may raise a feature request to support both.
Meanwhile wrap your button with a layout / content view and apply the gradient on it.
1
Wrapping the button in a content view works. I updated the playground with the solution: link
– ppritcha
Nov 10 at 17:13
add a comment |
up vote
2
down vote
accepted
I don't think having both on same element is yet supported. You may raise a feature request to support both.
Meanwhile wrap your button with a layout / content view and apply the gradient on it.
1
Wrapping the button in a content view works. I updated the playground with the solution: link
– ppritcha
Nov 10 at 17:13
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
I don't think having both on same element is yet supported. You may raise a feature request to support both.
Meanwhile wrap your button with a layout / content view and apply the gradient on it.
I don't think having both on same element is yet supported. You may raise a feature request to support both.
Meanwhile wrap your button with a layout / content view and apply the gradient on it.
answered Nov 10 at 17:00
Manoj
2,4111816
2,4111816
1
Wrapping the button in a content view works. I updated the playground with the solution: link
– ppritcha
Nov 10 at 17:13
add a comment |
1
Wrapping the button in a content view works. I updated the playground with the solution: link
– ppritcha
Nov 10 at 17:13
1
1
Wrapping the button in a content view works. I updated the playground with the solution: link
– ppritcha
Nov 10 at 17:13
Wrapping the button in a content view works. I updated the playground with the solution: link
– ppritcha
Nov 10 at 17:13
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241044%2fnativescript-vue-button-with-linear-gradient-background-and-image%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried that outside of a nativescript application?
– Jonas
Nov 10 at 20:56
Jonas, I only tried this inside NativeScript.
– ppritcha
Nov 12 at 22:25