You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @aboalwi,
Thank you for interest in NativeScirpt.
Regaring to your issue, it would help if you could provide more info about your problem or sample project.
In NativeScript you could set background-color to Element using CSS file or just via adding the stile property in the open tag of the component in the XML. I am attaching examples.
What i'm saying (in web) background: red; will work just fine.. that's how css works.. it's just a little thing not a big deal it would be nice for it to work in nativescript too.. since we are used to it... yea
Reacted by Valentin Stoychev, Peter Kanev, hamorphis, Udith Ishara Madusanka, Victor Nascimento, James Parsons, Amin Mohamed Ajani, David Robertson, Gary Gozlan and Matan Cohen
Activity
tsonevn commentedon Oct 31, 2016
Hi @aboalwi,
Thank you for interest in NativeScirpt.
Regaring to your issue, it would help if you could provide more info about your problem or sample project.
In NativeScript you could set
background-colorto Element usingCSSfile or just via adding the stile property in the open tag of the component in theXML. I am attaching examples.XML
CSS
Hope this helps.
aboalwi commentedon Oct 31, 2016
What i'm saying (in web) background: red; will work just fine.. that's how css works.. it's just a little thing not a big deal it would be nice for it to work in nativescript too.. since we are used to it... yea
valentinstoychev commentedon Oct 31, 2016
This looks reasonable. The definition of how this property is used on web is here - http://www.w3schools.com/cssref/css3_pr_background.asp
@hshristov - is this something we can support, in order to have the same behavior with the web?
hshristov commentedon Oct 31, 2016
@valentinstoychev Yes we can support it.
wnas commentedon Oct 31, 2016
for proper documentation please do not refer to w3 fools. use MDN instead..
https://developer.mozilla.org/en-US/docs/Web/CSS/background-color
NordlingDev commentedon Oct 31, 2016
Same goes for the
borderproperty. We should be able to set the border with just one line:border: 1 #000000;Don't think border style is possible though, so having this wouldn't work (?):
border: 1 solid #000000;Correct me if I'm wrong about above.
hamorphis commentedon Nov 1, 2016
@NordlingArt Currently, we only support solid borders, i.e. no dotted, dashes, etc.
hamorphis commentedon Nov 1, 2016
By the way, in order to parse a shorthand value like this:
I would need to rip of the source code of one of the web browser engines. The formal syntax of the
backgroundproperty is way messed up: https://developer.mozilla.org/en-US/docs/Web/CSS/backgroundThe props can appear in any order they like and some of them may be omitted. Nice!
hamorphis commentedon Nov 1, 2016
https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties
6 remaining items
hamorphis commentedon Nov 22, 2016
@vjoao Thanks, I will check it out.
[-]background: color; does nothing[/-][+]CSS background shorthand property[/+]hgc2002 commentedon Apr 21, 2019
Animated GIF for background do not work, shorthanded or not.
The GIF is shown, but statically, not the animation it contains.
lock commentedon Apr 25, 2020
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.