aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-03-29 23:07:12 +0000
committerMichael Williamson <mike@zwobble.org>2013-03-29 23:07:12 +0000
commitbdf1832cbc2f9e0dc7355bb7d435a9f6ab574d7e (patch)
tree699d0ac28e621f21e9025301116bced261a6232c /lib
parent354a6ba8f34108236879c8af4280abea74409be5 (diff)
Allow fresh elements to be specified
Diffstat (limited to 'lib')
-rw-r--r--lib/style-reader.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/style-reader.js b/lib/style-reader.js
index ca4e18a..7ee36c2 100644
--- a/lib/style-reader.js
+++ b/lib/style-reader.js
@@ -10,12 +10,16 @@ function read(string) {
}
function readElement(string) {
- var parts = string.split(".");
+ var colonParts = string.split(":");
+ var parts = colonParts[0].split(".");
var tagName = parts[0];
var classNames = parts.slice(1);
var options = {};
if (classNames.length > 0) {
options["class"] = classNames.join(" ");
}
+ if (colonParts[1] === "fresh") {
+ options.fresh = true;
+ }
return styles.element(tagName, options);
}