|
1 | | -/*! |
| 1 | +/*! |
2 | 2 | * Select2-to-Tree CSS 1.1.1 |
3 | 3 | * https://github.com/clivezhg/select2-to-tree |
4 | 4 | */ |
5 | | - .s2-to-tree * { |
6 | | - box-sizing: border-box; |
7 | | - } |
| 5 | +.s2-to-tree * { |
| 6 | + box-sizing: border-box; |
| 7 | +} |
8 | 8 |
|
9 | | -.s2-to-tree .select2-results__option.l1 { |
| 9 | +.s2-to-tree .select2-dropdown[dir*="ltr"] .select2-results__option.l1 { |
10 | 10 | margin-left: 0.6em; |
11 | 11 | font-size: 1em; |
12 | 12 | } |
13 | | -.s2-to-tree .select2-results__option.l2 { |
| 13 | +.s2-to-tree .select2-dropdown[dir*="ltr"] .select2-results__option.l2 { |
14 | 14 | margin-left: 1.4em; |
15 | 15 | font-size: 0.95em; |
16 | 16 | } |
17 | | -.s2-to-tree .select2-results__option.l3 { |
| 17 | +.s2-to-tree .select2-dropdown[dir*="ltr"] .select2-results__option.l3 { |
18 | 18 | margin-left: 2.2em; |
19 | 19 | font-size: 0.91em; |
20 | 20 | } |
21 | | -.s2-to-tree .select2-results__option.l4 { |
| 21 | +.s2-to-tree .select2-dropdown[dir*="ltr"] .select2-results__option.l4 { |
22 | 22 | margin-left: 3.0em; |
23 | 23 | font-size: 0.87em; |
24 | 24 | } |
25 | | -.s2-to-tree .select2-results__option.l5 { |
| 25 | +.s2-to-tree .select2-dropdown[dir*="ltr"] .select2-results__option.l5 { |
26 | 26 | margin-left: 3.8em; |
27 | 27 | font-size: 0.83em; |
28 | 28 | } |
29 | | -.s2-to-tree .select2-results__option.l6 { |
| 29 | +.s2-to-tree .select2-dropdown[dir*="ltr"] .select2-results__option.l6 { |
30 | 30 | margin-left: 4.5em; |
31 | 31 | font-size: 0.8em; |
32 | 32 | } |
33 | | -.s2-to-tree .select2-results__option.l7 { |
| 33 | +.s2-to-tree .select2-dropdown[dir*="ltr"] .select2-results__option.l7 { |
34 | 34 | margin-left: 5.3em; |
35 | 35 | font-size: 0.77em; |
36 | 36 | } |
37 | | -.s2-to-tree .select2-results__option.l8 { |
| 37 | +.s2-to-tree .select2-dropdown[dir*="ltr"] .select2-results__option.l8 { |
38 | 38 | margin-left: 6.0em; |
39 | 39 | font-size: 0.75em; |
40 | 40 | } |
41 | 41 |
|
42 | | -.s2-to-tree li.select2-results__option.non-leaf .expand-collapse:hover { |
43 | | - color: red; |
44 | | - cursor: pointer; |
| 42 | +.s2-to-tree .select2-dropdown[dir*="ltr"] .item-label { |
| 43 | + display: inline-block; |
| 44 | + margin-left: 0.5em; |
| 45 | + padding: 3px; |
| 46 | + width: calc(100% - 11px); /* IE8 will fit the content */ |
45 | 47 | } |
46 | | -.s2-to-tree li.select2-results__option.non-leaf .expand-collapse:before { /* no :: in IE8 */ |
| 48 | + |
| 49 | +.s2-to-tree .select2-dropdown[dir*="ltr"] li.select2-results__option.non-leaf .expand-collapse:before { /* no :: in IE8 */ |
47 | 50 | content: "+"; |
48 | 51 | position: absolute; |
49 | 52 | left: -0.35em; |
50 | 53 | top: 0.1em; |
51 | 54 | font-size: larger; |
52 | 55 | } |
53 | | -.s2-to-tree li.select2-results__option.non-leaf.opened .expand-collapse:before { |
54 | | - content: "−"; |
55 | | -} |
56 | 56 |
|
57 | | -.s2-to-tree .select2-results__option[aria-disabled="true"] .expand-collapse { |
58 | | - color: black; |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +.s2-to-tree .select2-dropdown[dir*="rtl"] .select2-results__option.l1 { |
| 64 | + margin-right: 0.6em; |
| 65 | + font-size: 1em; |
| 66 | +} |
| 67 | +.s2-to-tree .select2-dropdown[dir*="rtl"] .select2-results__option.l2 { |
| 68 | + margin-right: 1.4em; |
| 69 | + font-size: 0.95em; |
| 70 | +} |
| 71 | +.s2-to-tree .select2-dropdown[dir*="rtl"] .select2-results__option.l3 { |
| 72 | + margin-right: 2.2em; |
| 73 | + font-size: 0.91em; |
| 74 | +} |
| 75 | +.s2-to-tree .select2-dropdown[dir*="rtl"] .select2-results__option.l4 { |
| 76 | + margin-right: 3.0em; |
| 77 | + font-size: 0.87em; |
| 78 | +} |
| 79 | +.s2-to-tree .select2-dropdown[dir*="rtl"] .select2-results__option.l5 { |
| 80 | + margin-right: 3.8em; |
| 81 | + font-size: 0.83em; |
| 82 | +} |
| 83 | +.s2-to-tree .select2-dropdown[dir*="rtl"] .select2-results__option.l6 { |
| 84 | + margin-right: 4.5em; |
| 85 | + font-size: 0.8em; |
| 86 | +} |
| 87 | +.s2-to-tree .select2-dropdown[dir*="rtl"] .select2-results__option.l7 { |
| 88 | + margin-right: 5.3em; |
| 89 | + font-size: 0.77em; |
| 90 | +} |
| 91 | +.s2-to-tree .select2-dropdown[dir*="rtl"] .select2-results__option.l8 { |
| 92 | + margin-right: 6.0em; |
| 93 | + font-size: 0.75em; |
59 | 94 | } |
60 | 95 |
|
61 | | -.s2-to-tree .item-label { |
| 96 | +.s2-to-tree .select2-dropdown[dir*="rtl"] .item-label { |
62 | 97 | display: inline-block; |
63 | | - margin-left: 0.5em; |
| 98 | + margin-right: 0.5em; |
64 | 99 | padding: 3px; |
65 | 100 | width: calc(100% - 11px); /* IE8 will fit the content */ |
66 | 101 | } |
67 | 102 |
|
| 103 | +.s2-to-tree .select2-dropdown[dir*="rtl"] li.select2-results__option.non-leaf .expand-collapse:before { /* no :: in IE8 */ |
| 104 | + content: "+"; |
| 105 | + position: absolute; |
| 106 | + right: -0.35em; |
| 107 | + top: 0.1em; |
| 108 | + font-size: larger; |
| 109 | +} |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | +.s2-to-tree li.select2-results__option.non-leaf .expand-collapse:hover { |
| 118 | + color: red; |
| 119 | + cursor: pointer; |
| 120 | +} |
| 121 | + |
| 122 | +.s2-to-tree li.select2-results__option.non-leaf.opened .expand-collapse:before { |
| 123 | + content: "−"; |
| 124 | +} |
| 125 | + |
| 126 | +.s2-to-tree .select2-results__option[aria-disabled="true"] .expand-collapse { |
| 127 | + color: black; |
| 128 | +} |
| 129 | + |
68 | 130 | .s2-to-tree li.select2-results__option { |
69 | 131 | position: relative; |
70 | 132 | padding: 0px; |
|
81 | 143 | } |
82 | 144 |
|
83 | 145 | .s2-to-tree.select2-container .select2-results__option--highlighted[aria-selected] > span.item-label { |
84 | | - background-color: #5897fb; |
85 | | - color: white; |
| 146 | + background-color: #5897fb; |
| 147 | + color: white; |
86 | 148 | } |
87 | 149 | .s2-to-tree.select2-container li.select2-results__option[aria-selected="true"] > span.item-label { |
88 | 150 | background-color: #ddd; |
|
0 commit comments