PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

Cannot Style with Class #79

Closed lukeramsden closed 7 years ago

lukeramsden commented 7 years ago

This is reproducible in the demo app.

Expected Behavior

A dropdown with the id of dd and the cssClass of input, should be styled the same way by:

#dd
{
padding: 5;
background-color: red;
color: yellow;
}

and

.input
{
padding: 5;
background-color: red;
color: yellow;
}

Actual Behavior

When styling #dd, it works fine, but when styling .input the styles aren't applied,

lukeramsden commented 7 years ago

I'd like to add, it used to work with class, but it doesn't now, so it must be the latest version that broke it. And, it seems to be only certain styles that don't apply (or do apply). padding, border-*and background-color work on the class, but not color.

PeterStaev commented 7 years ago

Hey @lukeramsden , you should be using the class property. With the recent changes cssClass property has been deprecated.

lukeramsden commented 7 years ago

@PeterStaev Really? Was that 2.5? EDIT: Wow, that was added in 1.4.0, but the docs I followed for 2.3 still said cssClass... Thanks! Also, the problem with the styling seems to be a problem with the new tns run functionality, because it started working again after a clean build.

PeterStaev commented 7 years ago

@lukeramsden, glad it worked even w/ the old property! Yes, it has been marked depreciated for a while 😄