From 9edef4051b45ac5ebcdb0ee1b1595e75d74c4dae Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Tue, 26 Jan 2016 16:37:11 +0800 Subject: [PATCH] Update select2 styles --- assets/css/um-select.css | 1070 +++++++++++++++++--------------------- core/um-enqueue.php | 13 +- gulpfile.js | 10 +- 3 files changed, 483 insertions(+), 610 deletions(-) diff --git a/assets/css/um-select.css b/assets/css/um-select.css index 68234024..20060640 100644 --- a/assets/css/um-select.css +++ b/assets/css/um-select.css @@ -1,620 +1,482 @@ -/* -Version: 3.4.8 Timestamp: Thu May 1 09:50:32 EDT 2014 -*/ .select2-container { - margin: 0 !important; - position: relative !important; - display: inline-block !important; - /* inline-block for ie7 */ - zoom: 1 !important; - *display: inline !important; - vertical-align: middle !important; -} + box-sizing: border-box; + display: inline-block; + margin: 0; + position: relative; + vertical-align: middle; } + .select2-container .select2-selection--single { + box-sizing: border-box; + cursor: pointer; + display: block; + height: 28px; + user-select: none; + -webkit-user-select: none; } + .select2-container .select2-selection--single .select2-selection__rendered { + display: block; + padding-left: 8px; + padding-right: 20px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } + .select2-container .select2-selection--single .select2-selection__clear { + position: relative; } + .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered { + padding-right: 8px; + padding-left: 20px; } + .select2-container .select2-selection--multiple { + box-sizing: border-box; + cursor: pointer; + display: block; + min-height: 32px; + user-select: none; + -webkit-user-select: none; } + .select2-container .select2-selection--multiple .select2-selection__rendered { + display: inline-block; + overflow: hidden; + padding-left: 8px; + text-overflow: ellipsis; + white-space: nowrap; } + .select2-container .select2-search--inline { + float: left; } + .select2-container .select2-search--inline .select2-search__field { + box-sizing: border-box; + border: none; + font-size: 100%; + margin-top: 5px; + padding: 0; } + .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button { + -webkit-appearance: none; } -.select2-container a:hover { - color: #666 !important; -} +.select2-dropdown { + background-color: white; + border: 1px solid #aaa; + border-radius: 4px; + box-sizing: border-box; + display: block; + position: absolute; + left: -100000px; + width: 100%; + z-index: 1051; } -.select2-container, -.select2-drop, -.select2-search, -.select2-search input { - /* - Force border-box so that % widths fit the parent - container without overlap because of margin/padding. - More Info : http://www.quirksmode.org/css/box.html - */ - -webkit-box-sizing: border-box; /* webkit */ - -moz-box-sizing: border-box; /* firefox */ - box-sizing: border-box; /* css3 */ -} +.select2-results { + display: block; } -.select2-container .select2-choice { - display: block !important; - height: 36px !important; - padding: 0 0 0 12px !important; - overflow: hidden !important; - position: relative !important; +.select2-results__options { + list-style: none; + margin: 0; + padding: 0; } - white-space: nowrap !important; - line-height: 35px !important; - color: #666 !important; - font-size: 15px !important; - text-align: left !important; - text-decoration: none !important; +.select2-results__option { + padding: 6px; + user-select: none; + -webkit-user-select: none; } + .select2-results__option[aria-selected] { + cursor: pointer; } - -moz-border-radius: 2px !important; - -webkit-border-radius: 2px !important; - border-radius: 2px !important; +.select2-container--open .select2-dropdown { + left: 0; } - background-clip: padding-box !important; +.select2-container--open .select2-dropdown--above { + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; +.select2-container--open .select2-dropdown--below { + border-top: none; + border-top-left-radius: 0; + border-top-right-radius: 0; } - background: none !important; - background-color: #fff !important; -} - -.select2-container.select2-drop-above .select2-choice { - -moz-border-radius: 0 0 2px 2px !important; - -webkit-border-radius: 0 0 2px 2px !important; - border-radius: 0 0 2px 2px !important; -} - -.select2-container.select2-allowclear .select2-choice .select2-chosen { - margin-right: 42px; -} - -.select2-container .select2-choice > .select2-chosen { - margin-right: 26px !important; - display: block !important; - overflow: hidden !important; - - white-space: nowrap !important; - - text-overflow: ellipsis !important; - float: none !important; - width: auto !important; - font-weight: normal; -} - -.select2-container .select2-choice abbr { - display: none; - width: 20px!important; - height: 100% !important; - right: 24px !important; - font-size: 1px !important; - text-decoration: none !important; - border: 0 !important; - background: none !important; - cursor: pointer !important; - outline: 0 !important; -} - -.select2-container.select2-allowclear .select2-choice abbr { - display: inline-block !important; -} - -.select2-container .select2-choice abbr:hover { - cursor: pointer !important; -} - -.select2-drop-mask { - border: 0 !important; - margin: 0 !important; - padding: 0 !important; - position: fixed !important; - left: 0 !important; - top: 0 !important; - min-height: 100% !important; - min-width: 100% !important; - height: auto !important; - width: auto !important; - opacity: 0 !important; - z-index: 1999997 !important; - /* styles required for IE to work */ - background-color: #fff !important; - filter: alpha(opacity=0) !important; -} - -.select2-drop { +.select2-search--dropdown { + display: block; + padding: 4px; } + .select2-search--dropdown .select2-search__field { + padding: 4px; width: 100%; - margin-top: -1px; - position: absolute; - z-index: 1999998 !important; - top: 100%; + box-sizing: border-box; } + .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button { + -webkit-appearance: none; } + .select2-search--dropdown.select2-search--hide { + display: none; } - background: #fff; - color: #666; - - -moz-border-radius: 0 0 2px 2px; - -webkit-border-radius: 0 0 2px 2px; - border-radius: 0 0 2px 2px; - - box-shadow: none; - -} - -.select2-drop.select2-drop-above { - margin-top: 1px; - - -moz-border-radius: 2px 2px 0 0; - -webkit-border-radius: 2px 2px 0 0; - border-radius: 2px 2px 0 0; - - box-shadow: none; -} - -.select2-drop-active { - - box-shadow: none !important; -} - -.select2-drop.select2-drop-above.select2-drop-active { - -} - -.select2-drop-auto-width { - width: auto !important; -} - -.select2-drop-auto-width .select2-search { - padding-top: 4px; -} - -.select2-container .select2-choice .select2-arrow { - display: inline-block !important; - width: 34px !important; - height: 100% !important; - position: absolute !important; - right: 0 !important; - top: 0 !important; - -moz-border-radius: 0 2px 2px 0 !important; - -webkit-border-radius: 0 2px 2px 0 !important; - border-radius: 0 2px 2px 0 !important; - background-clip: padding-box !important; - text-align: center !important; - background: transparent !important; - border-left: 0 !important; -} - -.select2-container .select2-choice .select2-arrow * { - line-height: 100% !important; - vertical-align: middle !important; -} - -.select2-container .select2-choice .select2-arrow b { - display: block !important; - width: 100% !important; - height: 100% !important; - background: none !important; -} - -.select2-container .select2-choice .select2-arrow:before { - content: "\f3d0" !important; - font-size: 27px !important; - font-family: "Ionicons" !important; - width: 100% !important; - display: block; - height: 100%; - line-height: 36px; -} -.select2-container .select2-choice .select2-arrow:hover:before {color: #666 !important} - -.select2-search { - display: inline-block !important; - width: 100% !important; - min-height: 32px !important; - height: 32px !important; - line-height: 1em !important; - margin: 0 !important; - padding-left: 4px !important; - padding-right: 4px !important; - - position: relative !important; - z-index: 1999999 !important; - - white-space: nowrap !important; -} - -.select2-search input[type=text] { - background: none !important; - width: 100% !important; - height: 32px !important; - line-height: auto !important; - padding: 0 38px 0 7px !important; - margin: 0 !important; - outline: 0 !important; - border: 1px solid #ddd !important; - color: #666 !important; - -moz-border-radius: 2px !important; - -webkit-border-radius: 2px !important; - border-radius: 2px !important; - font-size: 15px !important; - box-sizing: border-box !important; - -webkit-font-smoothing: antialiased !important; - -moz-osx-font-smoothing: grayscale !important; - box-shadow: none !important; -} - -.select2-search:before { - content: "\f4a4" !important; - font-size: 20px !important; - height: 32px !important; - line-height: 32px !important; - font-family: "Ionicons" !important; - top: 0 !important; - right: 10px !important; - position: absolute !important; -} - -.select2-drop .select2-search {margin-top: 4px !important} - -.select2-search input.select2-active { - background: #fff !important; -} - -.select2-container-active .select2-choice, -.select2-container-active .select2-choices { - outline: none !important; - box-shadow: none !important; -} - -.select2-dropdown-open .select2-choice { - border-bottom-left-radius: 0 !important; - border-bottom-right-radius: 0 !important; -} - -.select2-dropdown-open.select2-drop-above .select2-choice, -.select2-dropdown-open.select2-drop-above .select2-choices { - -} - -.select2-dropdown-open .select2-choice .select2-arrow { - background: transparent !important; - filter: none !important; - border-color: transparent !important; -} -.select2-dropdown-open .select2-choice .select2-arrow b { - -} +.select2-close-mask { + border: 0; + margin: 0; + padding: 0; + display: block; + position: fixed; + left: 0; + top: 0; + min-height: 100%; + min-width: 100%; + height: auto; + width: auto; + opacity: 0; + z-index: 99; + background-color: #fff; + filter: alpha(opacity=0); } .select2-hidden-accessible { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} + border: 0 !important; + clip: rect(0 0 0 0) !important; + height: 1px !important; + margin: -1px !important; + overflow: hidden !important; + padding: 0 !important; + position: absolute !important; + width: 1px !important; } -/* results */ -.select2-results { - max-height: 200px; - padding: 0 0 0 5px; - margin: 4px 4px 4px 0; - position: relative; - overflow-x: hidden; - overflow-y: auto; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} - -.select2-results ul.select2-result-sub { - margin: 0; - padding-left: 0; -} - -.select2-results li { - list-style: none; - display: list-item; - background-image: none; - font-size: 15px; - margin: 0!important; - padding: 3px 0 !important; - color: #666 !important; -} - -.select2-results li.select2-result-with-children > .select2-result-label { - font-weight: bold !important; -} - -.select2-results .select2-result-label { - padding: 3px 7px 4px !important; - margin: 0 !important; - cursor: pointer; - min-height: 1em !important; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-font-smoothing: antialiased !important; - -moz-osx-font-smoothing: grayscale !important; -} - -.select2-results-dept-1 .select2-result-label { padding-left: 20px } -.select2-results-dept-2 .select2-result-label { padding-left: 40px } -.select2-results-dept-3 .select2-result-label { padding-left: 60px } -.select2-results-dept-4 .select2-result-label { padding-left: 80px } -.select2-results-dept-5 .select2-result-label { padding-left: 100px } -.select2-results-dept-6 .select2-result-label { padding-left: 110px } -.select2-results-dept-7 .select2-result-label { padding-left: 120px } - -.select2-results .select2-highlighted { - background: none !important; - background: #f4f4f4 !important; - color: #666 !important; -} - -.select2-results li em { - background: #feffde !important; - font-style: normal !important; -} - -.select2-results .select2-highlighted em { - background: transparent !important; -} - -.select2-results .select2-highlighted ul { - background: #fff !important; - color: #666 !important; -} - -.select2-results .select2-no-results, -.select2-results .select2-searching, -.select2-results .select2-selection-limit { - background: #f4f4f4 !important; - display: list-item !important; - padding: 5px !important; - font-size: 15px !important; - -webkit-font-smoothing: antialiased !important; - -moz-osx-font-smoothing: grayscale !important; -} - -/* -disabled look for disabled choices in the results dropdown -*/ -.select2-results .select2-disabled.select2-highlighted .select2-result-label { - color: #bbb !important; - background: #fff !important; - display: list-item !important; - cursor: default !important; -} -.select2-results .select2-disabled .select2-result-label { - color: #bbb !important; - background: #fff !important; - display: list-item !important; - cursor: default !important; -} - -.select2-results .select2-selected { - display: none; -} - -.select2-more-results.select2-active { - background: #f4f4f4 !important; -} - -.select2-more-results { - background: #f4f4f4 !important; - display: list-item !important; -} - -/* disabled styles */ - -.select2-container.select2-container-disabled .select2-choice { - background-color: #f4f4f4 !important; - background-image: none !important; - border: 1px solid #ddd !important; - cursor: default !important; -} - -.select2-container.select2-container-disabled .select2-choice .select2-arrow { - background: none !important; - background: #f9f9f9 !important; - border-left: 0 !important; -} - -.select2-container.select2-container-disabled .select2-choice abbr { - display: none !important; -} - - -/* multiselect */ - -.select2-container-multi .select2-choices { - height: auto !important; - height: 1% !important; - margin: 0 !important; - padding: 1px 3px !important; - position: relative !important; - - cursor: text !important; - overflow: hidden !important; - - -moz-border-radius: 2px !important; - -webkit-border-radius: 2px !important; - border-radius: 2px !important; - - box-shadow: none !important; -} - -.select2-locked { - padding: 3px 5px 3px 5px !important; -} - -.select2-container-multi .select2-choices { - min-height: 26px; - background-image: none !important; -} - -.select2-container-multi.select2-container-active .select2-choices { - outline: none; - - box-shadow: none; -} -.select2-container-multi .select2-choices li { - float: left; - list-style: none; -} -html[dir="rtl"] .select2-container-multi .select2-choices li -{ +.select2-container--default .select2-selection--single { + background-color: #fff; + border: 1px solid #aaa; + border-radius: 4px; } + .select2-container--default .select2-selection--single .select2-selection__rendered { + color: #444; + line-height: 28px; } + .select2-container--default .select2-selection--single .select2-selection__clear { + cursor: pointer; float: right; -} -.select2-container-multi .select2-choices .select2-search-field { - margin: 0; - padding: 0; - white-space: nowrap; -} - -.select2-container-multi .select2-choices .select2-search-field input { - padding: 5px !important; - margin: 3px 0 !important; - - font-size: 100%; - height: auto !important; - outline: 0; - border: 0 !important; - -webkit-box-shadow: none; - box-shadow: none; - background: transparent !important; -} - -.select2-container-multi .select2-choices .select2-search-field input.select2-active { - background: #fff !important; -} - -.select2-container-multi .select2-choices .select2-search-choice { - padding: 4px 20px 4px 5px !important; - margin: 6px 0 4px 5px !important; - position: relative; - - line-height: 14px; - font-size: 14px; - color: #666; - cursor: default; - border: 1px solid #dddddd; - - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; - - box-shadow: none !important; - - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - - background: none !important; - background-color: #f9f9f9 !important; -} - -html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice -{ - margin-left: 0; - margin-right: 5px; -} -.select2-container-multi .select2-choices .select2-search-choice .select2-chosen { - cursor: default; -} -.select2-container-multi .select2-choices .select2-search-choice-focus { - background: #f1f1f1; -} - -.select2-search-choice-close { - position: absolute !important; - width: 18px !important; - height: 18px !important; - right: 0 !important; - top: 0 !important; - left: auto !important; - outline: none !important; - background: none !important; -} - -.select2-search-choice-close:before { - content: "\f2d7" !important; - font-size: 22px !important; - font-family: "Ionicons" !important; - right: 4px !important; - position: relative !important; - display: block; - height: 100%; - width: 100%; - line-height: 36px; -} - -.select2-search-choice-close:hover:before {color: #666 !important} - -.select2-container-multi .select2-search-choice-close { - text-decoration: none !important; - width: 21px !important; - height: 100% !important; - text-align: center !important; - border-bottom: 0 !important; -} - -.select2-container-multi .select2-search-choice-close:before { - font-size: 16px !important; - right: 0 !important; - line-height: 23px !important; -} - -/* disabled styles */ -.select2-container-multi.select2-container-disabled .select2-choices { - background-color: #f4f4f4; - background-image: none; - border: 1px solid #ddd; - cursor: default; -} - -.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice { - padding: 3px 5px 3px 5px; - border: 1px solid #ddd; - background-image: none; - background-color: #f4f4f4; -} - -.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none; background: none;} -/* end multiselect */ - - -.select2-result-selectable .select2-match, -.select2-result-unselectable .select2-match { - text-decoration: underline; -} - -.select2-offscreen, .select2-offscreen:focus { - clip: rect(0 0 0 0) !important; - width: 1px !important; - height: 1px !important; - border: 0 !important; - margin: 0 !important; - padding: 0 !important; - overflow: hidden !important; - position: absolute !important; - outline: 0 !important; - left: 0px !important; - top: 0px !important; -} - -.select2-display-none { - display: none; -} - -.select2-measure-scrollbar { + font-weight: bold; } + .select2-container--default .select2-selection--single .select2-selection__placeholder { + color: #999; } + .select2-container--default .select2-selection--single .select2-selection__arrow { + height: 26px; position: absolute; - top: -10000px; - left: -10000px; - width: 100px; - height: 100px; - overflow: scroll; -} \ No newline at end of file + top: 1px; + right: 1px; + width: 20px; } + .select2-container--default .select2-selection--single .select2-selection__arrow b { + border-color: #888 transparent transparent transparent; + border-style: solid; + border-width: 5px 4px 0 4px; + height: 0; + left: 50%; + margin-left: -4px; + margin-top: -2px; + position: absolute; + top: 50%; + width: 0; } + +.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear { + float: left; } + +.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow { + left: 1px; + right: auto; } + +.select2-container--default.select2-container--disabled .select2-selection--single { + background-color: #eee; + cursor: default; } + .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear { + display: none; } + +.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { + border-color: transparent transparent #888 transparent; + border-width: 0 4px 5px 4px; } + +.select2-container--default .select2-selection--multiple { + background-color: white; + border: 1px solid #aaa; + border-radius: 4px; + cursor: text; } + .select2-container--default .select2-selection--multiple .select2-selection__rendered { + box-sizing: border-box; + list-style: none; + margin: 0; + padding: 0 5px; + width: 100%; } + .select2-container--default .select2-selection--multiple .select2-selection__placeholder { + color: #999; + margin-top: 5px; + float: left; } + .select2-container--default .select2-selection--multiple .select2-selection__clear { + cursor: pointer; + float: right; + font-weight: bold; + margin-top: 5px; + margin-right: 10px; } + .select2-container--default .select2-selection--multiple .select2-selection__choice { + background-color: #e4e4e4; + border: 1px solid #aaa; + border-radius: 4px; + cursor: default; + float: left; + margin-right: 5px; + margin-top: 5px; + padding: 0 5px; } + .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { + color: #999; + cursor: pointer; + display: inline-block; + font-weight: bold; + margin-right: 2px; } + .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { + color: #333; } + +.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline { + float: right; } + +.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice { + margin-left: 5px; + margin-right: auto; } + +.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove { + margin-left: 2px; + margin-right: auto; } + +.select2-container--default.select2-container--focus .select2-selection--multiple { + border: solid black 1px; + outline: 0; } + +.select2-container--default.select2-container--disabled .select2-selection--multiple { + background-color: #eee; + cursor: default; } + +.select2-container--default.select2-container--disabled .select2-selection__choice__remove { + display: none; } + +.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple { + border-top-left-radius: 0; + border-top-right-radius: 0; } + +.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } + +.select2-container--default .select2-search--dropdown .select2-search__field { + border: 1px solid #aaa; } + +.select2-container--default .select2-search--inline .select2-search__field { + background: transparent; + border: none; + outline: 0; + box-shadow: none; + -webkit-appearance: textfield; } + +.select2-container--default .select2-results > .select2-results__options { + max-height: 200px; + overflow-y: auto; } + +.select2-container--default .select2-results__option[role=group] { + padding: 0; } + +.select2-container--default .select2-results__option[aria-disabled=true] { + color: #999; } + +.select2-container--default .select2-results__option[aria-selected=true] { + background-color: #ddd; } + +.select2-container--default .select2-results__option .select2-results__option { + padding-left: 1em; } + .select2-container--default .select2-results__option .select2-results__option .select2-results__group { + padding-left: 0; } + .select2-container--default .select2-results__option .select2-results__option .select2-results__option { + margin-left: -1em; + padding-left: 2em; } + .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option { + margin-left: -2em; + padding-left: 3em; } + .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { + margin-left: -3em; + padding-left: 4em; } + .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { + margin-left: -4em; + padding-left: 5em; } + .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { + margin-left: -5em; + padding-left: 6em; } + +.select2-container--default .select2-results__option--highlighted[aria-selected] { + background-color: #5897fb; + color: white; } + +.select2-container--default .select2-results__group { + cursor: default; + display: block; + padding: 6px; } + +.select2-container--classic .select2-selection--single { + background-color: #f7f7f7; + border: 1px solid #aaa; + border-radius: 4px; + outline: 0; + background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%); + background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%); + background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); } + .select2-container--classic .select2-selection--single:focus { + border: 1px solid #5897fb; } + .select2-container--classic .select2-selection--single .select2-selection__rendered { + color: #444; + line-height: 28px; } + .select2-container--classic .select2-selection--single .select2-selection__clear { + cursor: pointer; + float: right; + font-weight: bold; + margin-right: 10px; } + .select2-container--classic .select2-selection--single .select2-selection__placeholder { + color: #999; } + .select2-container--classic .select2-selection--single .select2-selection__arrow { + background-color: #ddd; + border: none; + border-left: 1px solid #aaa; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + height: 26px; + position: absolute; + top: 1px; + right: 1px; + width: 20px; + background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%); + background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%); + background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); } + .select2-container--classic .select2-selection--single .select2-selection__arrow b { + border-color: #888 transparent transparent transparent; + border-style: solid; + border-width: 5px 4px 0 4px; + height: 0; + left: 50%; + margin-left: -4px; + margin-top: -2px; + position: absolute; + top: 50%; + width: 0; } + +.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear { + float: left; } + +.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow { + border: none; + border-right: 1px solid #aaa; + border-radius: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + left: 1px; + right: auto; } + +.select2-container--classic.select2-container--open .select2-selection--single { + border: 1px solid #5897fb; } + .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow { + background: transparent; + border: none; } + .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b { + border-color: transparent transparent #888 transparent; + border-width: 0 4px 5px 4px; } + +.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single { + border-top: none; + border-top-left-radius: 0; + border-top-right-radius: 0; + background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%); + background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%); + background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); } + +.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single { + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%); + background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%); + background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); } + +.select2-container--classic .select2-selection--multiple { + background-color: white; + border: 1px solid #aaa; + border-radius: 4px; + cursor: text; + outline: 0; } + .select2-container--classic .select2-selection--multiple:focus { + border: 1px solid #5897fb; } + .select2-container--classic .select2-selection--multiple .select2-selection__rendered { + list-style: none; + margin: 0; + padding: 0 5px; } + .select2-container--classic .select2-selection--multiple .select2-selection__clear { + display: none; } + .select2-container--classic .select2-selection--multiple .select2-selection__choice { + background-color: #e4e4e4; + border: 1px solid #aaa; + border-radius: 4px; + cursor: default; + float: left; + margin-right: 5px; + margin-top: 5px; + padding: 0 5px; } + .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove { + color: #888; + cursor: pointer; + display: inline-block; + font-weight: bold; + margin-right: 2px; } + .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover { + color: #555; } + +.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice { + float: right; } + +.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice { + margin-left: 5px; + margin-right: auto; } + +.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove { + margin-left: 2px; + margin-right: auto; } + +.select2-container--classic.select2-container--open .select2-selection--multiple { + border: 1px solid #5897fb; } + +.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple { + border-top: none; + border-top-left-radius: 0; + border-top-right-radius: 0; } + +.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple { + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } + +.select2-container--classic .select2-search--dropdown .select2-search__field { + border: 1px solid #aaa; + outline: 0; } + +.select2-container--classic .select2-search--inline .select2-search__field { + outline: 0; + box-shadow: none; } + +.select2-container--classic .select2-dropdown { + background-color: white; + border: 1px solid transparent; } + +.select2-container--classic .select2-dropdown--above { + border-bottom: none; } + +.select2-container--classic .select2-dropdown--below { + border-top: none; } + +.select2-container--classic .select2-results > .select2-results__options { + max-height: 200px; + overflow-y: auto; } + +.select2-container--classic .select2-results__option[role=group] { + padding: 0; } + +.select2-container--classic .select2-results__option[aria-disabled=true] { + color: grey; } + +.select2-container--classic .select2-results__option--highlighted[aria-selected] { + background-color: #3875d7; + color: white; } + +.select2-container--classic .select2-results__group { + cursor: default; + display: block; + padding: 6px; } + +.select2-container--classic.select2-container--open .select2-dropdown { + border-color: #5897fb; } diff --git a/core/um-enqueue.php b/core/um-enqueue.php index 2daa442a..0a7177fd 100644 --- a/core/um-enqueue.php +++ b/core/um-enqueue.php @@ -145,8 +145,6 @@ class UM_Enqueue { $this->load_modal(); - $this->load_css(); - $this->load_fileupload(); $this->load_datetimepicker(); @@ -167,6 +165,9 @@ class UM_Enqueue { $this->load_customjs(); + $this->load_css(); + + } /*** @@ -184,9 +185,7 @@ class UM_Enqueue { ***/ function load_css(){ - wp_register_style('um_styles', um_url . 'assets/css/um-styles.css' ); - wp_enqueue_style('um_styles'); - + wp_register_style('um_members', um_url . 'assets/css/um-members.css' ); wp_enqueue_style('um_members'); @@ -199,6 +198,10 @@ class UM_Enqueue { wp_register_style('um_misc', um_url . 'assets/css/um-misc.css' ); wp_enqueue_style('um_misc'); + wp_register_style('um_styles', um_url . 'assets/css/um-styles.css' ); + wp_enqueue_style('um_styles'); + + } /*** diff --git a/gulpfile.js b/gulpfile.js index 027b1578..17d04eb5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -63,13 +63,21 @@ gulp.task('scripts', function() { .pipe(concat("um.min.js")) .pipe(gulp.dest('assets/js')); - // Select2 not minified + // Copy Select2 ( full or not minified ) + // script gulp.src([ './assets/vendor/select2/dist/js/select2.full.js', ]) .pipe(concat("um-select.js")) .pipe(gulp.dest('assets/js')); + // css + gulp.src([ + './assets/vendor/select2/dist/css/select2.css', + ]) + .pipe(concat("um-select.css")) + .pipe(gulp.dest('assets/css')); + // Merge and minify all CSS files gulp.src([ './assets/vendor/select2/dist/css/select2.css', './assets/css/um-misc.css',