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

Add support for a toolbar-input #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

developit
Copy link
Contributor

Add toolbar-input. I couldnt decide on markup for a generic input with inset icon.
This at least partly addresses #14.

JSFiddle: http://jsfiddle.net/developit/aqu10kd9/ *

Preview:

preview

Markup:
<label class="toolbar-input">
    <span class="icon icon-search"></span>
    <input type="search" class="form-control" placeholder="Search...">
</label>

* the zoom border effect is not included in this PR

@connors
Copy link
Owner

connors commented Oct 31, 2015

@developit Awesome! However, I don't think this feature should be specific to toolbars. Icon inputs should be a feature available anywhere in the application.

So the base markup structure should probably be something like:

<div class="form-icon-text-group form-group">
  <span class="icon icon-search"></span>
  <input type="search" class="form-control" placeholder="Search...">
</div>

Then the SASS could be something like:

.form-icon-text-group {
  position: relative;

  .icon {
    position: absolute;
    top: 4px;
    left: 10px;
    z-index: 1;
  }

  .form-control {
    padding-left: 25px;
  }
}

Lastly, to get things working in the toolbar, all you have to do is remove the .form-group class.

@developit
Copy link
Contributor Author

Agreed regarding a generic solution. That markup works for me.

@szechyjs
Copy link

szechyjs commented Dec 1, 2016

any updates on this?

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

Successfully merging this pull request may close these issues.

3 participants