Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styling Dropdown List created using NativeScript-Drop-Down plugin #183

Closed
phatakrajan opened this issue Jun 29, 2018 · 4 comments
Closed
Labels

Comments

@phatakrajan
Copy link

phatakrajan commented Jun 29, 2018

I am trying to style a dropdown created using NativeScript-Drop-Down plugin in such a way that i should be seeing only border at bottom with grey color. I tried doing it via CSS by taking border-color and border properties (with different combinations). However i was unable to get it. Here is what i am trying to achieve.

image

Can you please suggest on how can i style the dropdown?

Here is my html

<DropDown [items]="itemSource" (selectedIndexChanged)="onchange($event)" (opened)="onopen()" (closed)="onclose()" class="item-drop-down" verticalAlignment="center"></DropDown>

Here is CSS

.item-drop-down{
    font-size: 20;
    height: 40;
    padding: 4;
    width: 100%;
    border: 2;
    border-color:#D3D3D3;
}

Nativescript playground URL where my sample code resides.

https://play.nativescript.org/?template=play-ng&id=4ca5Yw&v=1

@phatakrajan phatakrajan changed the title Styling Dropdown List Styling Dropdown List created using NativeScript-Drop-Down plugin Jun 29, 2018
@PeterStaev
Copy link
Owner

Hey @phatakrajan , couple of problems with your playground:

  1. You have not imported the DropDownModule as it is explained in the Readme for the plugin
  2. The shorthand border operator does NOT work in {N}. You need to use the border-width and border-color style properties.

See the updated playground: https://play.nativescript.org/?template=play-ng&id=4ca5Yw&v=4

@phatakrajan
Copy link
Author

Hi @PeterStaev

  1. Probably i did not save module file and hence DropDownModule was not available. However i was not facing problem showing the dropdown.
  2. As you mentioned, i corrected issue w.r.t. border. However problem was that as soon as i added the border-bottom-width: 2 and border-bottom-color: #D3D3D3, i could get bottom border but lost the caret sign. Can you please guide me on how to bring it back? I have updated playground.

@PeterStaev
Copy link
Owner

This is a know issue not relative you {N}. You can see this comment for a workaround: #91 (comment)

@PeterStaev
Copy link
Owner

No further response so closing this one for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants