summaryrefslogtreecommitdiffstats
path: root/testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/less/mixins/image.less
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2017-05-12 06:26:03 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-12 06:26:03 +0000
commit909be5b53a6141f84480dc29eb5dbfffe5c35fad (patch)
treef48c1a1e98dffcbe393a428f06e02fceaf937875 /testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/less/mixins/image.less
parent9437526b739c41c0a1fc25396677d2f134d4ce80 (diff)
parent55d74f86440a5a804d4551e04f7fd39518af0723 (diff)
Merge "add web portal framework for TestAPI"
Diffstat (limited to 'testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/less/mixins/image.less')
-rw-r--r--testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/less/mixins/image.less33
1 files changed, 33 insertions, 0 deletions
diff --git a/testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/less/mixins/image.less b/testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/less/mixins/image.less
new file mode 100644
index 0000000..f233cb3
--- /dev/null
+++ b/testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/less/mixins/image.less
@@ -0,0 +1,33 @@
+// Image Mixins
+// - Responsive image
+// - Retina image
+
+
+// Responsive image
+//
+// Keep images from scaling beyond the width of their parents.
+.img-responsive(@display: block) {
+ display: @display;
+ max-width: 100%; // Part 1: Set a maximum relative to the parent
+ height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
+}
+
+
+// Retina image
+//
+// Short retina mixin for setting background-image and -size. Note that the
+// spelling of `min--moz-device-pixel-ratio` is intentional.
+.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
+ background-image: url("@{file-1x}");
+
+ @media
+ only screen and (-webkit-min-device-pixel-ratio: 2),
+ only screen and ( min--moz-device-pixel-ratio: 2),
+ only screen and ( -o-min-device-pixel-ratio: 2/1),
+ only screen and ( min-device-pixel-ratio: 2),
+ only screen and ( min-resolution: 192dpi),
+ only screen and ( min-resolution: 2dppx) {
+ background-image: url("@{file-2x}");
+ background-size: @width-1x @height-1x;
+ }
+}