Created
March 4, 2014 14:32
-
-
Save yangjunjun/9347510 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v0.7.0) | |
// ---- | |
$list:(10px, 20px, 30px, 40px); | |
$la:(1, 2, 3, 4); | |
$lb:(5, 6, 7); | |
$lc:join($la, $lb); | |
$len:length($list); | |
$lc:append($lc, 8); | |
div{ | |
width:$len; | |
height:nth($list, 2); | |
border-width:length($lc); | |
border-left-width:nth($lc, 8); | |
padding-left: index($lc, 8); | |
} | |
@mixin apply-to-ie6-only { | |
* html { | |
@content; | |
zoom: 1; | |
} | |
} | |
@include apply-to-ie6-only { | |
#logo { | |
background-image: url(/logo.gif); | |
} | |
} | |
/* function */ | |
@function lower-bound($range){ | |
@if length($range) <= 0 { | |
@return 0; | |
} | |
@return nth($range,1); | |
} | |
@function upper-bound($range) { | |
@if length($range) < 2 { | |
@return 999999999999; | |
} | |
@return nth($range, 2); | |
} | |
// STRIP UNIT | |
// It strips the unit of measure and returns it | |
@function strip-unit($num) { | |
@return $num / ($num * 0 + 1); | |
} | |
$namespace:'eoopen'; | |
@function data($attr) { | |
@if $namespace { | |
@return '[data-' + $namespace + '-' + $attr + ']'; | |
} | |
@return '[data-' + $attr + ']'; | |
} | |
$a:(100); | |
$b: 1.2px; | |
div{ | |
width: lower-bound($a); | |
height: upper-bound($a); | |
border-width: strip-unit($b); | |
font-family:data('long'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div { | |
width: 4; | |
height: 20px; | |
border-width: 8; | |
border-left-width: 8; | |
padding-left: 8; } | |
* html { | |
zoom: 1; } | |
* html #logo { | |
background-image: url(/logo.gif); } | |
/* function */ | |
div { | |
width: 100; | |
height: 999999999999; | |
border-width: 1.2; | |
font-family: '[data-eoopen-long]'; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment