/*! UIkit 2.20.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ /* ======================================================================== Component: Search ========================================================================== */ /* * 1. Create position context for dropdowns * 2. Needed for `form` element */ .uk-search { display: inline-block; /* 1 */ position: relative; /* 2 */ margin: 0; &:before { content: "\f002"; position: absolute; top: 0; left: 0; width: 30px; line-height: 30px; text-align: center; font-family: FontAwesome; font-size: 14px; color: rgba(0, 0, 0, 0.2); } } /* * Icon */ /* Sub-object `uk-search-field` ========================================================================== */ /* * Removes inner padding and border in Firefox 4+. */ .uk-search-field { &::-moz-focus-inner { border: 0; padding: 0; } &::-webkit-search-cancel-button, &::-webkit-search-decoration { -webkit-appearance: none; } &::-ms-clear { display: none; } &::-moz-placeholder { opacity: 1; } /* 1 */ -moz-box-sizing: border-box; box-sizing: border-box; /* 2 */ margin: 0; /* 3 */ border-radius: 0; /* 4 */ font: inherit; color: #444444; /* 5 */ -webkit-appearance: none; /* 6 */ width: 120px; height: 30px; padding: 0 0 0 30px; border: 1px solid rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0); -webkit-transition: all linear 0.2s; transition: all linear 0.2s; vertical-align: middle; &:-ms-input-placeholder { color: #999999 !important; } &::-moz-placeholder, &::-webkit-input-placeholder { color: #999999; } &:focus { outline: 0; width: 180px; } } /* * Remove inner padding and search cancel button in Chrome, Safari and Opera on OS X. */ /* * Removes cancel button in IE10 */ /* * Removes placeholder transparency in Firefox. */ /* * 1. Define consistent box sizing. * 2. Address margins set differently in Firefox/IE and Chrome/Safari/Opera. * 3. Remove `border-radius` in iOS. * 4. Correct `font` properties and `color` not being inherited. * 5. Remove default style in iOS. * 6. Style */ /* Placeholder */ /* Focus */ /* Focus + Active */ .uk-search.uk-active .uk-search-field { width: 180px; } /* Dropdown modifier: `uk-dropdown-search` ========================================================================== */ .uk-dropdown-search { width: 300px; margin-top: 0; background: #f5f5f5; color: #444444; } .uk-open > .uk-dropdown-search { -webkit-animation: uk-slide-top-fixed 0.2s ease-in-out; animation: uk-slide-top-fixed 0.2s ease-in-out; } /* * Dependency `uk-navbar-flip` */ .uk-navbar-flip .uk-dropdown-search { margin-top: 5px; margin-right: -15px; } /* Nav modifier `uk-nav-search` ========================================================================== */ /* * Items */ .uk-nav-search { > li { > a { color: #444444; } &.uk-active > a { background: #00a8e6; color: #ffffff; /* 1 */ outline: none; } } .uk-nav-header { color: #999999; } .uk-nav-divider { border-top: 1px solid #dddddd; } ul a { color: #0077dd; &:hover { color: #005599; } } } /* * Active * 1. Remove default focus style */ /* * Sub-object: `uk-nav-header` */ /* * Sub-object: `uk-nav-divider` */ /* * Nested items */ /* Search in offcanvas ========================================================================== */ .uk-offcanvas { .uk-search { display: block; margin: 20px 15px; &:before { color: #777777; } } .uk-search-field { width: 100%; border-color: rgba(0, 0, 0, 0); background: #1a1a1a; color: #cccccc; &:-ms-input-placeholder { color: #777777 !important; } &::-moz-placeholder, &::-webkit-input-placeholder { color: #777777; } } }