|
3 | 3 | display: inline-block;
|
4 | 4 | width: 300px;
|
5 | 5 | height: 225px;
|
6 |
| -} |
7 |
| - |
8 |
| -.taro-img > div { |
9 |
| - height: 100%; |
10 |
| - width: 100%; |
11 |
| - background-repeat: no-repeat; |
12 |
| - background-size: contain; |
13 |
| -} |
14 |
| - |
15 |
| -.taro-img__scale-to-fill { |
16 |
| - background-size: 100% 100%; |
17 |
| - background-position: 0% 0%; |
18 |
| -} |
19 |
| - |
20 |
| -.taro-img__aspect-fit { |
21 |
| - background-size: contain; |
22 |
| - background-position: center center; |
23 |
| -} |
24 |
| - |
25 |
| -.taro-img__aspect-fill { |
26 |
| - background-size: cover; |
27 |
| - background-position: center center; |
28 |
| -} |
29 |
| - |
30 |
| -.taro-img__width-fix { |
31 |
| - background-size: 100% 100%; |
32 |
| - background-position: 0% 0%; |
33 |
| -} |
34 |
| - |
35 |
| -.taro-img__height-fix { |
36 |
| - background-size: 100% 100%; |
37 |
| - background-position: 0% 0%; |
38 |
| -} |
39 | 6 |
|
40 |
| -.taro-img__top { |
41 |
| - background-position: top center; |
42 |
| -} |
43 |
| - |
44 |
| -.taro-img__bottom { |
45 |
| - background-position: bottom center; |
46 |
| -} |
| 7 | + &__content { |
| 8 | + height: 100%; |
| 9 | + width: 100%; |
| 10 | + background-repeat: no-repeat; |
| 11 | + background-size: contain; |
| 12 | + } |
47 | 13 |
|
48 |
| -.taro-img__center { |
49 |
| - background-position: center center; |
50 |
| -} |
51 |
| -.taro-img__left { |
52 |
| - background-position: center left; |
53 |
| -} |
54 |
| - |
55 |
| -.taro-img__right { |
56 |
| - background-position: center right; |
57 |
| -} |
58 |
| - |
59 |
| -.taro-img__top-left { |
60 |
| - background-position: top left; |
61 |
| -} |
62 |
| - |
63 |
| -.taro-img__top-right { |
64 |
| - background-position: top right; |
65 |
| -} |
66 |
| - |
67 |
| -.taro-img__bottom-left { |
68 |
| - background-position: bottom left; |
69 |
| -} |
| 14 | + &__scale-to-fill { |
| 15 | + background-size: 100% 100%; |
| 16 | + background-position: 0% 0%; |
| 17 | + } |
| 18 | + |
| 19 | + &__aspect-fit { |
| 20 | + background-size: contain; |
| 21 | + background-position: center center; |
| 22 | + } |
| 23 | + |
| 24 | + &__aspect-fill { |
| 25 | + background-size: cover; |
| 26 | + background-position: center center; |
| 27 | + } |
| 28 | + |
| 29 | + &__width-fix { |
| 30 | + background-size: 100% 100%; |
| 31 | + background-position: 0% 0%; |
| 32 | + } |
| 33 | + |
| 34 | + &__height-fix { |
| 35 | + background-size: 100% 100%; |
| 36 | + background-position: 0% 0%; |
| 37 | + } |
| 38 | + |
| 39 | + &__top { |
| 40 | + background-position: top center; |
| 41 | + } |
| 42 | + |
| 43 | + &__bottom { |
| 44 | + background-position: bottom center; |
| 45 | + } |
| 46 | + |
| 47 | + &__center { |
| 48 | + background-position: center center; |
| 49 | + } |
70 | 50 |
|
71 |
| -.taro-img__bottom-right { |
72 |
| - background-position: bottom right; |
| 51 | + &__left { |
| 52 | + background-position: center left; |
| 53 | + } |
| 54 | + |
| 55 | + &__right { |
| 56 | + background-position: center right; |
| 57 | + } |
| 58 | + |
| 59 | + &__top-left { |
| 60 | + background-position: top left; |
| 61 | + } |
| 62 | + |
| 63 | + &__top-right { |
| 64 | + background-position: top right; |
| 65 | + } |
| 66 | + |
| 67 | + &__bottom-left { |
| 68 | + background-position: bottom left; |
| 69 | + } |
| 70 | + |
| 71 | + &__bottom-right { |
| 72 | + background-position: bottom right; |
| 73 | + } |
73 | 74 | }
|
0 commit comments