Ind.ie is now Small Technology Foundation.
Commit 76141e43 authored by Aral Balkan's avatar Aral Balkan

Added support for background-size: contain

parent 453e8ac1
......@@ -177,3 +177,9 @@ h2 {
/* Make sure that the rule is written out only once in case there is no rem substitution */
background-size: cover;
}
#test-background-size-contain {
background-image: linear-gradient(90deg, transparent 50%, rgba(255,255,255,0.5) 50%);
background-size: contain 1px 1px;
/* Make sure that the rule is written out only once in case there is no rem substitution */
background-size: contain;
}
......@@ -21,7 +21,7 @@
/* Convert unit to rems if unit is in pixels. */
remify(value)
if value == 'inherit' || value == 'auto' || value == 'none' || value == 'cover' || value == 'smaller' || value == 0 || value == null
if value == 'inherit' || value == 'auto' || value == 'none' || value == 'cover' || value == 'contain' || value == 'smaller' || value == 0 || value == null
value
else if value == 'hairline'
'1px'
......
......@@ -91,6 +91,7 @@
<h2>Background size</h2>
<div id='test-background-size' data-assert='background-size: 500px 500px'>background-size 500px 500px</div>
<div id='test-background-size-cover' data-assert='background-size: cover'>background-size cover</div>
<div id='test-background-size-contain' data-assert='background-size: contain'>background-size contain</div>
</section>
<script src='dom-style-test-runner.js'></script>
......
......@@ -132,4 +132,8 @@ h2
#test-background-size-cover
background-image linear-gradient(90deg, transparent 50%, rgba(255,255,255,.5) 50%)
background-size cover
\ No newline at end of file
background-size cover
#test-background-size-contain
background-image linear-gradient(90deg, transparent 50%, rgba(255,255,255,.5) 50%)
background-size contain
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment