Skip to content

Instantly share code, notes, and snippets.

@stalinsky
Created October 9, 2014 11:25
Show Gist options
  • Select an option

  • Save stalinsky/7eb8ba675bf80c0ceac6 to your computer and use it in GitHub Desktop.

Select an option

Save stalinsky/7eb8ba675bf80c0ceac6 to your computer and use it in GitHub Desktop.
A Pen by Konstantin Stalinsky.
form.search
input.searchTerm placeholder="Enter your search term ..."
input.searchButton type="submit"
$('.searchButton').on('click',function(){
alert('You clicked search button');
});
@import "compass/css3";
@import url(http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css);
$iconColor: #fff;
$color: #8FC357;
.search {
width: 30%;
position: relative;
&:before {
position: absolute;
top: 0;
right: 0;
width: 40px;
height: 40px;
line-height: 40px;
font-family: 'FontAwesome';
content: '\f002';
background: $color;
text-align: center;
color: $iconColor;
border-radius: 5px;
-webkit-font-smoothing: subpixel-antialiased;
font-smooth: always;
}
}
.searchTerm {
@include box-sizing(border-box);
width: 100%;
border: 5px solid $color;
padding: 5px;
height: 40px;
border-radius: 5px;
outline: none;
}
.searchButton {
position: absolute;
top: 0;
right: 0;
width: 40px;
height: 40px;
opacity: 0;
cursor: pointer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment