From 20321291a2dd44787a460d956163383cd040314c Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Wed, 15 Feb 2012 21:43:09 -0800 Subject: Presets - Modify structure of preset data --- js/panels/presets/default-style-presets.js | 76 +++++++++++++++++++----------- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/js/panels/presets/default-style-presets.js b/js/panels/presets/default-style-presets.js index 7455ac9f..3677d976 100644 --- a/js/panels/presets/default-style-presets.js +++ b/js/panels/presets/default-style-presets.js @@ -11,42 +11,62 @@ exports.stylePresets = { "children": [ { "text": "Border-Radius", - "classNameBase" : "border-radius", - "styles" : { - "border-radius": "100px", - "border" : "1px solid #333" - } + "selectorBase" : "border-radius-preset", + "rules" : [{ + "selectorSuffix" : "", + "styles" : { + "border-radius": "100px", + "border" : "1px solid #333" + } + }] }, { "text": "Drop Shadow", - "classNameBase" : "drop-shadow", - "styles" : { - "box-shadow": "2px 2px 50px rgba(0,0,0,0.5)", - "border" : "1px solid #CCC" - } + "selectorBase" : "drop-shadow", + "rules" : [{ + "selectorSuffix" : "", + "styles" : { + "box-shadow": "2px 2px 50px rgba(0,0,0,0.5)", + "border" : "1px solid #CCC" + } + }] }, { "text": "Fancy Box", - "classNameBase" : "fancy-box", - "styles" : { - "box-shadow": "inset 0 0 0 1px #666, inset 0 0 0 2px rgba(225, 225, 225, 0.4), 0 0 20px -10px #333", - "border" : "1px solid #FFF", - "border-radius": "30px", - "background-color": "#7db9e8", - "background-image": "-webkit-linear-gradient(top, rgba(255,255,255,0.74) 0%,rgba(255,255,255,0) 100%)" - } + "selectorBase" : "fancy-box", + "rules" : [{ + "selectorSuffix" : "", + "styles" : { + "box-shadow": "inset 0 0 0 1px #666, inset 0 0 0 2px rgba(225, 225, 225, 0.4), 0 0 20px -10px #333", + "border" : "1px solid #FFF", + "border-radius": "30px", + "background-color": "#7db9e8", + "background-image": "-webkit-linear-gradient(top, rgba(255,255,255,0.74) 0%,rgba(255,255,255,0) 100%)" + } + }] }] }, { - "text": "Text Styles", + "text": "Font Styles", "children": [ - { "text": "Italic" }, - { "text": "Text Shadow" }, - { "text": "Text Color" } ] - }, { - "text": "Color Styles", - "children": [ - { "text": "Background Gradient" }, - { "text": "Background Color" }, - { "text": "Text Highlight" } ] + { + "text": "Italic", + "selectorBase" : "italicize", + "rules" : [{ + "selectorSuffix" : "", + "styles" : { + "font-style": "italic" + } + }] + }, + { + "text": "Text Shadow", + "selectorBase" : "italicize", + "rules" : [{ + "selectorSuffix" : "", + "styles" : { + "text-shadow": "1px 1px 3px #333" + } + }] + }] }] }; \ No newline at end of file -- cgit v1.2.3