Last active
December 30, 2015 00:19
-
-
Save andrewwakeling/7748745 to your computer and use it in GitHub Desktop.
globalVars causing undesirable caching behaviour with Local Storage.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet/less" type="text/css" href="problem.less"> | |
<script> | |
less = { | |
env: 'production' | |
}; | |
var useGlobalVars = true; | |
if (useGlobalVars) { | |
less.globalVars = { | |
"@primary": "#555" | |
} | |
} | |
</script> | |
<script src=less-1.5.1.js></script> | |
</head> | |
<body> | |
</body> | |
</html> |
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
.conditionalbackground (@c: white) when (iscolor(@c)) { | |
background-color: @c; | |
} | |
body { | |
.conditionalbackground(@primary); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment