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

new feature request: Placeholder Selected? #258

Closed
jimiwhite1020 opened this issue Dec 3, 2014 · 1 comment
Closed

new feature request: Placeholder Selected? #258

jimiwhite1020 opened this issue Dec 3, 2014 · 1 comment
Milestone

Comments

@jimiwhite1020
Copy link

If the dropkick element is showing a placeholder text ( a disabled tag ), can the generated elements have a class saying "placeholder-selected"? Then it will be easy to style the placeholder of the dropkick.
Thanks,
image

@Robdel12 Robdel12 added this to the 2.1 milestone Dec 23, 2014
wwilsman added a commit that referenced this issue Jan 6, 2015
@wwilsman
Copy link
Collaborator

wwilsman commented Jan 6, 2015

We've added a very simple feature that will allow you to do this. Simply supply your option element with a class similar to how you would hide it from the list, except now you can target styles when it is the currently selected option.

For example, where you might've previously done

<select>
    <option class="placeholder-option">Select Option</option>
    <option>Up</option>
    <option>Down</option>
</select>

and styled it to hide .placeholder-option like so

.placeholder-option {
    display: none;
}

You can now, similarly, do this (and be a little more specific)

.dk-option.placeholder-option {
    display: none;
}

.dk-selected.placeholder-option {
    color: #CCCCCC;
}

@wwilsman wwilsman closed this as completed Jan 6, 2015
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