|
1 |
| - |
2 |
| -// copied from mixins.less |
3 |
| -.hdpi-bg-image(@1x; @2x; @2x-bg-size: 100%; @bg-repeat: no-repeat) { |
4 |
| - background-image: @1x; |
5 |
| - background-repeat: @bg-repeat; |
6 |
| - |
7 |
| - @media |
8 |
| - only screen and (min-resolution: 2dppx), |
9 |
| - only screen and (-webkit-min-device-pixel-ratio: 2) { |
10 |
| - background-image: @2x; |
11 |
| - background-size: @2x-bg-size; |
12 |
| - } |
13 |
| -} |
14 |
| - |
15 | 1 | .thing .entry .expando-button {
|
16 | 2 | background-color: transparent;
|
17 | 3 | cursor: pointer;
|
18 | 4 | height: 20px;
|
19 | 5 | margin: 4px 8px 4px 0;
|
20 |
| - transition: background-image 0.1s; |
21 | 6 | width: 20px;
|
22 | 7 |
|
23 |
| - &, &:hover { |
24 |
| - background-position: 0 0; |
25 |
| - } |
26 |
| - |
27 | 8 | &.expanded {
|
28 |
| - .hdpi-bg-image( |
29 |
| - @1x: url('../icon-contract.png'), |
30 |
| - @2x: url('../icon-contract_2x.png')); |
| 9 | + background-image: url('../icon-contract.png'); /* SPRITE */ |
31 | 10 | }
|
32 | 11 |
|
33 | 12 | &.expanded:hover {
|
34 |
| - .hdpi-bg-image( |
35 |
| - @1x: url('../icon-contract-hover.png'), |
36 |
| - @2x: url('../icon-contract-hover_2x.png')); |
| 13 | + background-image: url('../icon-contract-hover.png'); /* SPRITE */ |
37 | 14 | }
|
38 | 15 |
|
39 | 16 | &.collapsed {
|
40 |
| - .hdpi-bg-image( |
41 |
| - @1x: url('../icon-expand.png'), |
42 |
| - @2x: url('../icon-expand_2x.png')); |
| 17 | + background-image: url('../icon-expand.png'); /* SPRITE */ |
43 | 18 | }
|
44 | 19 |
|
45 | 20 | &.collapsed:hover {
|
46 |
| - .hdpi-bg-image( |
47 |
| - @1x: url('../icon-expand-hover.png'), |
48 |
| - @2x: url('../icon-expand-hover_2x.png')); |
| 21 | + background-image: url('../icon-expand-hover.png'); /* SPRITE */ |
| 22 | + } |
| 23 | + |
| 24 | + @media |
| 25 | + only screen and (min-resolution: 2dppx), |
| 26 | + only screen and (-webkit-min-device-pixel-ratio: 2) { |
| 27 | + &.expanded { |
| 28 | + background-image: url(../icon-contract_2x.png); /* SPRITE pixel-ratio=2 */ |
| 29 | + } |
| 30 | + |
| 31 | + &.expanded:hover { |
| 32 | + background-image: url(../icon-contract-hover_2x.png); /* SPRITE pixel-ratio=2 */ |
| 33 | + } |
| 34 | + |
| 35 | + &.collapsed { |
| 36 | + background-image: url(../icon-expand_2x.png); /* SPRITE pixel-ratio=2 */ |
| 37 | + } |
| 38 | + |
| 39 | + &.collapsed:hover { |
| 40 | + background-image: url(../icon-expand-hover_2x.png); /* SPRITE pixel-ratio=2 */ |
| 41 | + } |
49 | 42 | }
|
50 | 43 | }
|
0 commit comments