diff --git a/docs/index.html b/docs/index.html index 9badccb4..d402ded6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -174,6 +174,16 @@
The retina-image mixin is a helper to generate a retina background image and non-retina +background image. The retina background image will output to a HiDPI media query. The mixin uses +a _2x.png filename suffix by default.
+ + +(string)
+ (string)
+ ([string]
+ (default 'png'
)
+ )
+ (string)
+ ([string]
+ (default '_2x'
)
+ )
+ // Styles as object usage
+const styles = {
+ ...retinaImage('my-img')
+}
+
+// styled-components usage
+const div = styled.div`
+ ${retinaImage('my-img')}
+`
+
+// CSS as JS Output
+div {
+ backgroundImage: 'url(my-img.png)',
+ '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),
+ only screen and (min--moz-device-pixel-ratio: 1.3),
+ only screen and (-o-min-device-pixel-ratio: 1.3/1),
+ only screen and (min-resolution: 144dpi),
+ only screen and (min-resolution: 1.5dppx)': {
+ backgroundImage: 'url(my-img_2x.png)',
+ }
+}
+
+
+
+
+
+
+
+