From e32eb11e6033845b2ab5f4657eda03ac72e27ebd Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 4 Nov 2015 11:53:10 -0800 Subject: [PATCH] [Themes] Update bundle declarations Update bundle declarations to provide a THEME constant for use in filtering out theme-specific CSS additions. --- platform/commonUI/general/bundle.json | 7 ++++- platform/commonUI/themes/espresso/bundle.json | 28 +++++++++++-------- platform/commonUI/themes/snow/bundle.json | 28 +++++++++++-------- 3 files changed, 40 insertions(+), 23 deletions(-) diff --git a/platform/commonUI/general/bundle.json b/platform/commonUI/general/bundle.json index edaa8ec103..5976b912cc 100644 --- a/platform/commonUI/general/bundle.json +++ b/platform/commonUI/general/bundle.json @@ -18,7 +18,7 @@ "runs": [ { "implementation": "StyleSheetLoader.js", - "depends": [ "stylesheets[]", "$document" ] + "depends": [ "stylesheets[]", "$document", "THEME" ] } ], "stylesheets": [ @@ -194,6 +194,11 @@ { "key": "MCT_SCROLL_Y_ATTRIBUTE", "value": "mctScrollY" + }, + { + "key": "THEME", + "value": "unspecified", + "priority": "fallback" } ], "containers": [ diff --git a/platform/commonUI/themes/espresso/bundle.json b/platform/commonUI/themes/espresso/bundle.json index 37cab3e412..94c7259027 100644 --- a/platform/commonUI/themes/espresso/bundle.json +++ b/platform/commonUI/themes/espresso/bundle.json @@ -1,12 +1,18 @@ { - "name": "Espresso", - "description": "Espresso theme: dark and rich", - "extensions": { - "stylesheets": [ - { - "stylesheetUrl": "css/theme-espresso.css", - "priority": 1000 - } - ] - } -} \ No newline at end of file + "name": "Espresso", + "description": "Espresso theme: dark and rich", + "extensions": { + "stylesheets": [ + { + "stylesheetUrl": "css/theme-espresso.css", + "priority": 1000 + } + ], + "constants": [ + { + "key": "THEME", + "value": "espresso" + } + ] + } +} diff --git a/platform/commonUI/themes/snow/bundle.json b/platform/commonUI/themes/snow/bundle.json index 6db1ba21c1..6780df8e33 100644 --- a/platform/commonUI/themes/snow/bundle.json +++ b/platform/commonUI/themes/snow/bundle.json @@ -1,12 +1,18 @@ { - "name": "Sonw", - "description": "Snow theme: light and cool", - "extensions": { - "stylesheets": [ - { - "stylesheetUrl": "css/theme-snow.css", - "priority": 1000 - } - ] - } -} \ No newline at end of file + "name": "Snow", + "description": "Snow theme: light and cool", + "extensions": { + "stylesheets": [ + { + "stylesheetUrl": "css/theme-snow.css", + "priority": 1000 + } + ], + "constants": [ + { + "key": "THEME", + "value": "snow" + } + ] + } +}