UNPKG

lc-select

Version:

Superlight vanilla javascript plugin, for modern web dropdowns. Supporting multi-options, search and images. Designed to be seamlessly themed

185 lines (174 loc) 4.08 kB
/* LC Select - Light theme - by LCweb */ /* container */ .lcslt { border: 1px solid #aaa; background: #fafafa; border-radius: 2px; transition: all .25s ease; } .lcslt:not(.lcslt-disabled):hover, .lcslt.lcslt_dd-open, #lc-select-dd { border-color: #8f8f8f; background: #fefefe; } .lcslt.lcslt_dd-open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; } .lcslt-opt { background: #bbb; border-radius: 3px; } .lcslt:not(.lcslt-multiple):after { border-top-color: #888 !important; } .lcslt:not(.lcslt-multiple):hover:after, .lcslt.lcslt_dd-open:not(.lcslt-multiple):after { border-top-color: #666 !important; } .lcslt:not(.lcslt-multiple) > span { padding: 2px 0; } .lcslt.lcslt-multiple > span:not(.lcslt-multi-callout) { padding: 3px 0 6px; } .lcslt:not(.lcslt-multiple) > span:not(.lcslt-placeholder) { font-size: 90%; } .lcslt > span:not(.lcslt-placeholder):not(.lcslt-multi-callout), #lc-select-dd li { color: #484848; } /* disabled status */ .lcslt.lcslt-disabled { background: #f4f4f4; } .lcslt.lcslt-disabled:not(.lcslt-multiple):after { border-top-color: #aaa !important; } .lcslt.lcslt-disabled:not(.lcslt-multiple) > span { color: #848484; } .lcslt.lcslt-disabled .lcslt-multi-selected { color: #666; padding-left: 9px; } .lcslt.lcslt-disabled .lcslt-multi-selected:before { display: none; } /* multi-option selected items */ .lcslt-multiple { font-size: 0.95rem !important; } .lcslt-multi-selected, .lcslt-multi-callout { padding: 3px 9px 3px 7px; background: #e5e5e5; color: #494949; border-radius: 50px; margin: 0 5px 5px 0; transition: all .3s ease; } .lcslt-multi-callout { padding: 0.75rem 0.4581rem; font-family: arial; border-radius: 50%; font-size: 1rem; } .lcslt:not(.lcslt-disabled) .lcslt-multi-selected:hover, .lcslt:not(.lcslt-disabled) .lcslt-multi-callout:hover { background: #ddd; color: #3f3f3f; } .lcslt-multi-selected:before { padding-right: 6px; } .lcslt-placeholder { color: #888; transform: scale(0.9) translate3d(-5%, -5%, 0); } /* dropdown */ #lc-select-dd { border-radius: 0 0 4px 4px; border-width: 0 1px 1px; border-style: solid; box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2); font-size: 13px; } #lc-select-dd li { border: none; border-top: 1px solid #ddd; } .lcslt-search-li { border-bottom: 2px dotted #bababa !important; box-shadow: 0 1px 0 #fff; } .lcslt-search-li input { font-size: inherit; padding-top: 8px; padding-bottom: 8px; padding-left: 8px; font-size: 0.8rem; color: #888; background: #fefefe; } .lcslt-search-li input:hover, .lcslt-search-li input:active, .lcslt-search-li input:focus, .lcslt-is-searching .lcslt-search-li input { color: inherit; } .lcslt-search-li:before { background: #666; } #lc-select-dd li span { padding: 7px 12px; font-size: 0.8rem; } #lc-select-dd li img { padding-right: 7px; } .lcslt-group-name { font-weight: bold; } .lcslt-group-opts > li { padding-left: 12px; } .lcslt-dd-opt { transition: all .15s ease; color: #6f6f6f; } #lc-select-dd li.lcslt-dd-opt:not(.lcslt-disabled):not(.lcslt-selected):hover, #lc-select-dd .lcslt-dd-opt-hlight { color: #333; background: #d7eeff; } #lc-select-dd li.lcslt-dd-opt.lcslt-disabled { background: #ededed; color: #777; } #lc-select-dd li.lcslt-selected { color: #fff; background: #0078d7; text-shadow: 0 0 2px rgba(0,0,0,0.15); } #lc-select-dd li.lcslt-selected.lcslt-dd-opt-hlight { box-shadow: 6px 0 0 #89caff inset; } .lcslt-is-searching li.lcslt-group, .lcslt-no-results { border: none !important; } .lcslt-no-results { color: #777; text-align: center; padding: 12px; } /* images */ .lcslt-img { display: inline-block; height: 17px; width: 20px; margin-right: 7px; }