// variables
$example-sheet-width: 50px !default
$example-sheet-height: 130px !default
$example-sheet-image: url("example.png") !default
$example-sheet-image-2x: url("example@2x.png") !default
$example-sheet: $example-sheet-width $example-sheet-height $example-sheet-image $example-sheet-image-2x example !default
// mixins & extenable placeholders
=example-element()
background-image: $example-sheet-image
background-repeat: no-repeat
@media only screen and (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx)
background-image: $example-sheet-image-2x
background-size: $example-sheet-width $example-sheet-height
%example-element
+example-element()
// variables
$example-sheet-width: 50px !default;
$example-sheet-height: 130px !default;
$example-sheet-image: url("example.png") !default;
$example-sheet-image-2x: url("example@2x.png") !default;
$example-sheet: $example-sheet-width $example-sheet-height $example-sheet-image $example-sheet-image-2x example !default;
// mixins & extenable placeholders
@mixin example-element() {
background-image: $example-sheet-image;
background-repeat: no-repeat;
@media only screen and (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx) {
background-image: $example-sheet-image-2x;
background-size: $example-sheet-width $example-sheet-height;
}
}
%example-element {
@include example-element();
}
// variables
@example-sheet-width: 50px;
@example-sheet-height: 130px;
@example-sheet-image: url("example.png");
@example-sheet-image-2x: url("example@2x.png");
@example-sheet: @example-sheet-width @example-sheet-height @example-sheet-image @example-sheet-image-2x example;
// mixins & extenable placeholders
.example-element() {
background-image: @example-sheet-image;
background-repeat: no-repeat;
@media only screen and (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx) {
background-image: @example-sheet-image-2x;
background-size: @example-sheet-width @example-sheet-height;
}
}
.example-element {
.example-element();
}
// variables
$example-sheet-width ?= 50px
$example-sheet-height ?= 130px
$example-sheet-image ?= url("example.png")
$example-sheet-image-2x ?= url("example@2x.png")
$example-sheet ?= $example-sheet-width $example-sheet-height $example-sheet-image-2x $example-sheet-image-2x example
// mixins & extenable placeholders
$example-sheet-width ?= 50px
$example-sheet-height ?= 130px
$example-sheet-image ?= url("example.png")
$example-sheet-image-2x ?= url("example@2x.png")
$example-sheet ?= $example-sheet-width $example-sheet-height $example-sheet-image-2x $example-sheet-image-2x example
example-element()
background-image: $example-sheet-image
background-repeat: no-repeat
@media only screen and (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx)
background-image: $example-sheet-image-2x
background-size: $example-sheet-width $example-sheet-height
$example-element
sprite-element()