Created
June 20, 2022 21:07
-
-
Save yuriy-o/91f11d3716bbca826c8242761a9cc261 to your computer and use it in GitHub Desktop.
Ретінізація фонових зображень
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.price { | |
background-image: url(../images/price/bg-price_sm.png), | |
linear-gradient(to bottom, #191c26, #191c26); | |
background-image: -webkit-image-set(url(../images/price/bg-price_sm.webp) 1x), | |
linear-gradient(to bottom, #191c26, #191c26); | |
// Завантаження ретінізованого 2х фонового зображення | |
@include mq(retina) { | |
background-image: url(../images/price/bg-price_sm@2x.png), | |
linear-gradient(to bottom, #191c26, #191c26); | |
background-image: -webkit-image-set(url(../images/price/bg-price_sm@2x.webp) 2x), | |
linear-gradient(to bottom, #191c26, #191c26); | |
} | |
|============================ | |
| Завантаження звичайного фонового зображення для планшету | |
|============================ | |
@include mq(tablet) { | |
background-image: url(../images/price/bg-price_md.png), | |
linear-gradient(to bottom, #191c26, #191c26); | |
background-image: -webkit-image-set(url(../images/price/bg-price_md.webp) 1x), | |
linear-gradient(to bottom, #191c26, #191c26); | |
// Завантаження ретінізованого 2х фонового зображення | |
@include mq(retina) { | |
background-image: url(../images/price/bg-price_md@2x.png), | |
linear-gradient(to bottom, #191c26, #191c26); | |
background-image: -webkit-image-set(url(../images/price/bg-price_md@2x.webp) 2x), | |
linear-gradient(to bottom, #191c26, #191c26); | |
} | |
} | |
|============================ | |
| Завантаження звичайного фонового зображення для десктопної версії | |
|============================ | |
@include mq(desktop) { | |
background-image: url(../images/price/bg-price_lg.png), | |
linear-gradient(to bottom, #191c26, #191c26); | |
background-image: -webkit-image-set(url(../images/price/bg-price_lg.webp) 1x), | |
linear-gradient(to bottom, #191c26, #191c26); | |
// Завантаження ретінізованого 2х фонового зображення | |
@include mq(retina) { | |
background-image: url(../images/price/bg-price_lg@2x.png), | |
linear-gradient(to bottom, #191c26, #191c26); | |
background-image: -webkit-image-set(url(../images/price/bg-price_lg@2x.webp) 2x), | |
linear-gradient(to bottom, #191c26, #191c26); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment