Skip to content

Commit 0b85974

Browse files
committed
Merge pull request select2#349 from jameskoster/master
retina friendly sprite/css
2 parents b5cceab + 668c49b commit 0b85974

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

select2.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,4 +508,17 @@ disabled look for already selected choices in the results dropdown
508508
.select2-result-unselectable .select2-result-selectable .select2-match { text-decoration: underline; }
509509
.select2-result-unselectable .select2-match { text-decoration: none; }
510510

511-
.select2-offscreen { position: absolute; left: -10000px; }
511+
.select2-offscreen { position: absolute; left: -10000px; }
512+
513+
/* Retina-ize icons */
514+
515+
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
516+
.select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice div b {
517+
background-image: url(select2x2.png) !important;
518+
background-repeat: no-repeat !important;
519+
background-size: 60px 40px !important;
520+
}
521+
.select2-search input {
522+
background-position: 100% -21px !important;
523+
}
524+
}

select2.png

100755100644
217 Bytes
Loading

select2x2.png

845 Bytes
Loading

0 commit comments

Comments
 (0)