/* * # Semantic - Search * http://github.com/semantic-org/semantic-ui/ * * * Copyright 2014 Contributor * Released under the MIT license * http://opensource.org/licenses/MIT * */ /******************************* Theme *******************************/ @type : 'module'; @element : 'search'; @import '../../semantic.config'; /******************************* Search *******************************/ .ui.search { position: relative; text-shadow: none; font-style: normal; font-weight: normal; } .ui.search input { border-radius: @promptBorderRadius; } /*-------------- Icon ---------------*/ .ui.search .prompt ~ .search.icon { cursor: pointer; } /*-------------- Results ---------------*/ .ui.search .results { display: none; position: absolute; z-index: 998; top: 100%; left: 0%; overflow: hidden; background: @resultsBackground; margin-top: @resultsDistance; width: @resultsWidth; border-radius: @resultsBorderRadius; box-shadow: @resultsBoxShadow; } /*-------------- Result ---------------*/ .ui.search .result { font-family: @pageFont; cursor: pointer; overflow: hidden; font-size: @resultFontSize; padding: @resultVerticalPadding @resultHorizontalPadding; color: @resultTextColor; line-height: @resultLineHeight; } .ui.search .result:first-child { border-top: none; } /* Image */ .ui.search .result .image { float: @resultImageFloat; overflow: hidden; background: @resultImageBackground; width: @resultImageWidth; height: @resultImageHeight; border-radius: @resultImageBorderRadius; } .ui.search .result .image img { display: block; width: auto; height: 100%; } /*-------------- Info ---------------*/ .ui.search .result .image + .content { margin: @resultImageMargin; } .ui.search .result .title { font-family: @resultTitleFont; font-weight: @resultTitleFontWeight; color: @resultTitleColor; } .ui.search .result .description { color: @resultDescriptionColor; } .ui.search .result .price { float: @resultPriceFloat; color: @resultPriceColor; } /*-------------- Message ---------------*/ .ui.search .message { padding: @messageVerticalPadding @messageHorizontalPadding; } .ui.search .message .header { font-family: @headerFont; font-size: @messageHeaderFontSize; font-weight: @messageHeaderFontWeight; color: @messageHeaderColor; } .ui.search .message .description { margin-top: @messageDescriptionDistance; font-size: @messageDescriptionFontSize; color: @messageDescriptionColor; } /* View All Results */ .ui.search .all { display: block; border-top: @allResultsBorder; background-color: @allResultsBackground; height: @allResultsHeight; line-height: @allResultsHeight; color: @allResultsColor; font-weight: @allResultsFontWeight; text-align: @allResultsAlign; } /******************************* States *******************************/ /*-------------- Hover ---------------*/ .ui.search .result:hover, .ui.search .results .category .result:hover { background: @resultHoverBackground; } .ui.search .all:hover { background: @allResultsHoverBackground; } /*-------------- Loading ---------------*/ .ui.search.loading .input .icon { background: url(@loaderPath) no-repeat 50% 50%; } .ui.search.loading .input .icon:before, .ui.search.loading .input .icon:after { display: none; } /*-------------- Active ---------------*/ .ui.search .results .category.active { background-color: @categoryActiveBackground; } .ui.search .results .category.active > .name { color: @categoryNameActiveColor; } .ui.search .result.active, .ui.search .results .category .result.active { border-left-color: @resultActiveBorderLeft; background-color: @resultActiveBackground; box-shadow: @resultActiveBoxShadow; } .ui.search .result.active .title { color: @resultActiveTitleColor; } .ui.search .result.active .description { color: @resultActiveDescriptionColor; } /******************************* Types *******************************/ /*------------------- Left / Right --------------------*/ .ui.right.aligned.search .results { right: 0%; left: auto; } /*-------------- Categories ---------------*/ .ui.search .results .category { background: @categoryBackground; box-shadow: @categoryBoxShadow; } .ui.search .results .category, .ui.search .results .category .result { position: relative; transition: @categoryResultTransition; } .ui.search .results .category:first-child { box-shadow: none; } .ui.search .results .category > .name { font-family: @categoryNameFont; float: @categoryNameFontSize; float: @categoryNameFloat; padding: @categoryNamePadding; font-weight: @categoryNameFontWeight; color: @categoryNameColor; } .ui.search .results .category .result { background-color: @categoryResultBackground; margin-left: @categoryNameWidth; border-left: @categoryResultLeftBorder; border-bottom: @categoryResultTopBorder; } /******************************* Variations *******************************/ .ui.search { font-size: @medium; } .ui.large.search { font-size: @large; } .loadUIOverrides();