Commit f14327a3 authored by Oskar Kalbag's avatar Oskar Kalbag
Browse files

Added support for none value. e.g., max-width none

parent 4ed29060
...@@ -132,3 +132,8 @@ h2 { ...@@ -132,3 +132,8 @@ h2 {
height: 50px; height: 50px;
height: 3.125rem; height: 3.125rem;
} }
#test-max-width {
max-width: 50px;
max-width: 3.125rem;
max-width: none;
}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
/* Convert unit to rems if unit is in pixels. */ /* Convert unit to rems if unit is in pixels. */
remify(value) remify(value)
if value == 'inherit' || value == 'auto' || value == 0 || value == null if value == 'inherit' || value == 'auto' || value == 'none' || value == 0 || value == null
value value
else if unit(value) == 'px' else if unit(value) == 'px'
unit(value/16, 'rem') unit(value/16, 'rem')
......
...@@ -78,6 +78,10 @@ ...@@ -78,6 +78,10 @@
<h2>Height</h2> <h2>Height</h2>
<div id='test-height' data-assert='height: 50px'>height 50px</div> <div id='test-height' data-assert='height: 50px'>height 50px</div>
</section> </section>
<section>
<h2>Max-width</h2>
<div id='test-max-width' data-assert='width: 500px'>max-width none</div>
</section>
<script src='dom-style-test-runner.js'></script> <script src='dom-style-test-runner.js'></script>
</body> </body>
......
...@@ -111,4 +111,9 @@ h2 ...@@ -111,4 +111,9 @@ h2
// height // height
#test-height #test-height
height 50px height 50px
\ No newline at end of file
// max-width
#test-max-width
max-width 50px
max-width none
\ 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