Ind.ie is now Small Technology Foundation.
Commit e78ecf02 authored by Oskar Kalbag's avatar Oskar Kalbag

Added a bunch of updates including universal hairline support.

parent 81dc7db5
.DS_Store
screenflow/
\ No newline at end of file
......@@ -21,7 +21,7 @@
/* Convert unit to rems if unit is in pixels. */
remify(value)
if value == 'inherit' || value == 'auto' || value == 'none' || value == 0 || value == null
if value == 'inherit' || value == 'auto' || value == 'none' || value == 'cover' || value == 'smaller' || value == 0 || value == null
value
else if unit(value) == 'px'
unit(value/16, 'rem')
......@@ -139,18 +139,19 @@ max-height()
abstract-border(borderType, borderArgs, originalArguments)
value = borderArgs[0];
style = borderArgs[1];
color = borderArgs[2];
// Only 'none'
if typeof(value) is 'unit'
style = borderArgs[1];
color = borderArgs[2];
if unit(value) == 'px'
{borderType} unit(value, 'px') style color
{borderType} unit(value/16, 'rem') style color
else
{borderType} value style color
else if value is 'hairline'
// Since we lose the ability to create 1px borders, a little extension.
{borderType} unit(1, 'px') style color
else
{borderType} originalArguments
......
......@@ -85,8 +85,10 @@
<section>
<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>
</section>
<script src='dom-style-test-runner.js'></script>
</body>
</html>
\ No newline at end of file
......@@ -120,6 +120,10 @@ h2
// background-size
#test-background-size
background-image: linear-gradient(90deg, transparent 50%, rgba(255,255,255,.5) 50%);
background-size: 500px 500px;
// background-size 100px
\ No newline at end of file
background-image linear-gradient(90deg, transparent 50%, rgba(255,255,255,.5) 50%)
background-size 500px 500px
// background-size 100px
#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
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