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

Arrow disappears after applying border style #91

Open
YeshanJay opened this issue May 3, 2017 · 4 comments
Open

Arrow disappears after applying border style #91

YeshanJay opened this issue May 3, 2017 · 4 comments

Comments

@YeshanJay
Copy link

Hi,
The arrow on the widget disappears after applying border styles on it. See the images below.
Is there any way to keep both border and arrow?

CSS style:

DropDown {
    margin: 10;
    padding: 2 2;
    font-size: 16;

    border-color: #000;
    border-width: 1;
    border-style: solid;
}

Without border:
dd_noborder

With border:
dd_border

@PeterStaev
Copy link
Owner

Hey @YeshanJay , this is a known limitation of the spinner android widget (not relative to {N}).

As a workaround you can wrap the drop down in a StackLayout with horizontalAlignment="stretch" and apply the border on the layout.

@PeterStaev PeterStaev added this to the Backlog milestone May 3, 2017
@YeshanJay
Copy link
Author

Hi @PeterStaev ,
Thanks a lot for the workaround. Makes me wonder why I couldn't think of that.. lol 😄

@DBhail
Copy link

DBhail commented Oct 12, 2017

How do you get rid of the underline within the dropdown (see image)? Tried the CSS to set bottom border to none but doesn't do anything. Would be nice to get rid of it:

image

  <StackLayout class="input-field">
    <Label text="Type" class="label font-weight-bold m-b-5" textWrap="true"></Label>
    <StackLayout horizontalAlignment="stretch" class="input input-border">
      <DropDown [disabled]="!isEditMode()" #ddtype [items]="typeSelectionItems" [(ngModel)]="typeSelectionIndex" [hint]="hint"
        (selectedIndexChanged)="onTypeSelectionChange($event)" backroundColor="white" color="black" class="drop-down">
      </DropDown>
    </StackLayout>
  </StackLayout>

.drop-down{
border: none;
text-decoration: none;
border-bottom-width: 0;
border-bottom-color: white;
border-bottom: none;
}

@PeterStaev
Copy link
Owner

@DBhail the border is a default android style of the spinner. You can remove it AND the indicator on the right by using the hack to apply a border to the element:

.drop-down {
    border-color: white;
    border-width: 1;
    border-style: solid;
}

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

No branches or pull requests

3 participants