app/assets/stylesheets/select2.css.erb in select2-rails-3.5.7 vs app/assets/stylesheets/select2.css.erb in select2-rails-3.5.9

- old
+ new

@@ -1,10 +1,10 @@ //= depend_on_asset "select2.png" //= depend_on_asset "select2-spinner.gif" //= depend_on_asset "select2x2.png" /* -Version: 3.4.8 Timestamp: Thu May 1 09:50:32 EDT 2014 +Version: 3.5.0 Timestamp: Mon Jun 16 19:29:44 EDT 2014 */ .select2-container { margin: 0; position: relative; display: inline-block; @@ -57,10 +57,14 @@ background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0); background-image: linear-gradient(to top, #eee 0%, #fff 50%); } +html[dir="rtl"] .select2-container .select2-choice { + padding: 0 8px 0 0; +} + .select2-container.select2-drop-above .select2-choice { border-bottom-color: #aaa; border-radius: 0 0 4px 4px; @@ -85,10 +89,15 @@ text-overflow: ellipsis; float: none; width: auto; } +html[dir="rtl"] .select2-container .select2-choice > .select2-chosen { + margin-left: 26px; + margin-right: 0; +} + .select2-container .select2-choice abbr { display: none; width: 12px; height: 12px; position: absolute; @@ -197,17 +206,30 @@ background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0); background-image: linear-gradient(to top, #ccc 0%, #eee 60%); } +html[dir="rtl"] .select2-container .select2-choice .select2-arrow { + left: 0; + right: auto; + + border-left: none; + border-right: 1px solid #aaa; + border-radius: 4px 0 0 4px; +} + .select2-container .select2-choice .select2-arrow b { display: block; width: 100%; height: 100%; background: url(<%= asset_path('select2.png') %>) no-repeat 0 1px; } +html[dir="rtl"] .select2-container .select2-choice .select2-arrow b { + background-position: 2px 1px; +} + .select2-search { display: inline-block; width: 100%; min-height: 26px; margin: 0; @@ -242,10 +264,20 @@ background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; } +html[dir="rtl"] .select2-search input { + padding: 4px 5px 4px 20px; + + background: #fff url(<%= asset_path('select2.png') %>) no-repeat -37px -22px; + background: url(<%= asset_path('select2.png') %>) no-repeat -37px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); + background: url(<%= asset_path('select2.png') %>) no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url(<%= asset_path('select2.png') %>) no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url(<%= asset_path('select2.png') %>) no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; +} + .select2-drop.select2-drop-above .select2-search input { margin-top: 4px; } .select2-search input.select2-active { @@ -296,14 +328,22 @@ .select2-dropdown-open .select2-choice .select2-arrow { background: transparent; border-left: none; filter: none; } +html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow { + border-right: none; +} + .select2-dropdown-open .select2-choice .select2-arrow b { background-position: -18px 1px; } +html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow b { + background-position: -16px 1px; +} + .select2-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; @@ -322,10 +362,15 @@ overflow-x: hidden; overflow-y: auto; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } +html[dir="rtl"] .select2-results { + padding: 0 4px 0 0; + margin: 4px 0 4px 4px; +} + .select2-results ul.select2-result-sub { margin: 0; padding-left: 0; } @@ -441,11 +486,11 @@ .select2-container-multi .select2-choices { height: auto !important; height: 1%; margin: 0; - padding: 0; + padding: 0 5px 0 0; position: relative; border: 1px solid #aaa; cursor: text; overflow: hidden; @@ -455,10 +500,14 @@ background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%); background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%); background-image: linear-gradient(to bottom, #eee 1%, #fff 15%); } +html[dir="rtl"] .select2-container-multi .select2-choices { + padding: 0 0 0 5px; +} + .select2-locked { padding: 3px 5px 3px 5px !important; } .select2-container-multi .select2-choices { @@ -538,12 +587,12 @@ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); background-image: linear-gradient(to top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); } html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice { - margin-left: 0; - margin-right: 5px; + margin: 3px 5px 3px 0; + padding: 3px 18px 3px 5px; } .select2-container-multi .select2-choices .select2-search-choice .select2-chosen { cursor: default; } .select2-container-multi .select2-choices .select2-search-choice-focus { @@ -567,9 +616,14 @@ left: 3px; } .select2-container-multi .select2-search-choice-close { left: 3px; +} + +html[dir="rtl"] .select2-container-multi .select2-search-choice-close { + left: auto; + right: 2px; } .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover { background-position: right -11px; }