From 80630c42ecdb567f1a34c7e8d07a43cce584f061 Mon Sep 17 00:00:00 2001 From: Florian Kissling Date: Thu, 2 Jul 2015 03:00:21 +0200 Subject: [PATCH] Render `.select2-selection__clear` before the inline content of `.select2-selection__rendered`. As suggested by @njakobsen in https://github.com/select2/select2/issues/3306#issuecomment-109372777, this uses `position: relative` to alter the stacking level of `.select2-selection__clear`. See http://www.w3.org/TR/CSS2/zindex.html#painting-order and https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Understanding_z_index/Stacking_without_z-index. Styles are added to the default Sass for `.select2-selection--single`. Does not include the recompiled distribution CSS. References https://github.com/select2/select2/issues/3306. Tested in Google Chrome v43.0.2357.130 only. --- src/scss/_single.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scss/_single.scss b/src/scss/_single.scss index 0cd752de..6c3418e6 100644 --- a/src/scss/_single.scss +++ b/src/scss/_single.scss @@ -18,6 +18,10 @@ text-overflow: ellipsis; white-space: nowrap; } + + .select2-selection__clear { + position: relative; + } } &[dir="rtl"] {