Coder Social home page Coder Social logo

Form Inputs with inset icons about photon HOT 7 OPEN

connors avatar connors commented on August 22, 2024
Form Inputs with inset icons

from photon.

Comments (7)

brunowego avatar brunowego commented on August 22, 2024

Cool πŸ‘

from photon.

developit avatar developit commented on August 22, 2024

Here's my suggestion:
http://jsfiddle.net/developit/aqu10kd9/
preview

Markup

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

CSS

/* Here's my suggestion for the CSS */
.toolbar-input {
    position: relative;
    overflow: visible;
    margin: 0;
    padding: 0;
    .icon {
        position: absolute;
        left: 10px;
        top: 4px;
        z-index: 1;
        opacity: 0.5;  /* ~matches placeholder */
    }
    .form-control {
        padding: 3px 4px 1px 24px;
        border-radius: 12px;
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.4),
                    0 0 0 7px rgba(109,179,253,0);

        &:focus {
            /* something like this was already in place: */
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.4),
                        0 0 0 1px rgba(109,179,253,0.8);
            transition: box-shadow 250ms ease-out;
        }
    }
}

from photon.

connors avatar connors commented on August 22, 2024

Rad!

from photon.

goodseller avatar goodseller commented on August 22, 2024

πŸ‘

from photon.

sbruchmann avatar sbruchmann commented on August 22, 2024

@developit Mind sending a pull request?

from photon.

developit avatar developit commented on August 22, 2024

@sbruchmann: I did, #33.

from photon.

sbruchmann avatar sbruchmann commented on August 22, 2024

Sorry, @developit, I’ve overlooked that reference. Thanks for the work! Now we have to wait for @connors to merge it (at least, the folks who don’t know their way around git πŸ˜„)

from photon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.