diff --git a/example/styleguide/bundle.js b/example/styleguide/bundle.js index 05ec61c6fb..8de5fe9661 100644 --- a/example/styleguide/bundle.js +++ b/example/styleguide/bundle.js @@ -15,18 +15,20 @@ define([ "types": [ { "key": "styleguide.intro", "name": "Introduction", "cssclass": "icon-page", "description": "Introduction and overview to the style guide" }, { "key": "styleguide.standards", "name": "Standards", "cssclass": "icon-page", "description": "" }, + { "key": "styleguide.colors", "name": "Colors", "cssclass": "icon-page", "description": "" }, + { "key": "styleguide.glyphs", "name": "Glyphs", "cssclass": "icon-page", "description": "Glyphs overview" }, { "key": "styleguide.controls", "name": "Controls", "cssclass": "icon-page", "description": "Buttons, selects, HTML controls" }, { "key": "styleguide.input", "name": "Text Inputs", "cssclass": "icon-page", "description": "Various text inputs" }, - { "key": "styleguide.menus", "name": "Menus", "cssclass": "icon-page", "description": "Context menus, dropdowns, pickers" }, - { "key": "styleguide.glyphs", "name": "Glyphs", "cssclass": "icon-page", "description": "Glyphs overview" } + { "key": "styleguide.menus", "name": "Menus", "cssclass": "icon-page", "description": "Context menus, dropdowns" } ], "views": [ { "key": "styleguide.intro", "type": "styleguide.intro", "name": "Introduction", "cssclass": "icon-page", "templateUrl": "templates/intro.html", "editable": false }, { "key": "styleguide.standards", "type": "styleguide.standards", "name": "Standards", "cssclass": "icon-page", "templateUrl": "templates/standards.html", "editable": false }, + { "key": "styleguide.colors", "type": "styleguide.colors", "name": "Colors", "cssclass": "icon-page", "templateUrl": "templates/colors.html", "editable": false }, + { "key": "styleguide.glyphs", "type": "styleguide.glyphs", "name": "Glyphs", "cssclass": "icon-page", "templateUrl": "templates/glyphs.html", "editable": false }, { "key": "styleguide.controls", "type": "styleguide.controls", "name": "Controls", "cssclass": "icon-page", "templateUrl": "templates/controls.html", "editable": false }, { "key": "styleguide.input", "type": "styleguide.input", "name": "Text Inputs", "cssclass": "icon-page", "templateUrl": "templates/input.html", "editable": false }, - { "key": "styleguide.menus", "type": "styleguide.menus", "name": "Menus", "cssclass": "icon-page", "templateUrl": "templates/menus.html", "editable": false }, - { "key": "styleguide.glyphs", "type": "styleguide.glyphs", "name": "Glyphs", "cssclass": "icon-page", "templateUrl": "templates/glyphs.html", "editable": false } + { "key": "styleguide.menus", "type": "styleguide.menus", "name": "Menus", "cssclass": "icon-page", "templateUrl": "templates/menus.html", "editable": false } ], "roots": [ { @@ -44,6 +46,7 @@ define([ "composition": [ "intro", "standards", + "colors", "glyphs", "styleguide:ui-elements" ] @@ -54,7 +57,7 @@ define([ "priority" : "preferred", "model": { "type": "folder", - "name": "Style Guide UI Elements", + "name": "UI Elements", "location": "styleguide:home", "composition": [ "controls", diff --git a/example/styleguide/res/sass/_style-guide-base.scss b/example/styleguide/res/sass/_style-guide-base.scss index d0b8208d0e..33f7b83c88 100644 --- a/example/styleguide/res/sass/_style-guide-base.scss +++ b/example/styleguide/res/sass/_style-guide-base.scss @@ -79,6 +79,10 @@ margin-bottom: $interiorMarginLg; } + .themed { + display: none; // Each themed styleguide file will set this to block. + } + .doc-title { color: rgba(#fff, 0.3); text-transform: uppercase; @@ -138,11 +142,11 @@ // Example grid of glyphs .items-holder.grid { - .item.glyph-item { + .item.glyph-item, + .item.swatch-item { margin-bottom: 50px; margin-right: 10px; - height: 200px; - width: 225px; + position: relative; text-align: left; .glyph { color: $colorGlyphExample; @@ -160,6 +164,35 @@ } } } + + .item.glyph-item { + width: 225px; + height: 200px; + } + + .item.swatch-item { + $h: 150px; + $d: 75px; + width: 200px; + height: $h; + .glyph { + text-shadow: 0px 1px 10px rgba(black, 0.3); + } + + .h-swatch { + position: relative; + height: $d + $interiorMarginLg; + } + + .swatch { + height: $d; width: $d; + border: 1px solid $colorInteriorBorder; + border-radius: 100%; + position: absolute; + left: 50%; + @include transform(translateX(-50%)); + } + } } } diff --git a/example/styleguide/res/sass/style-guide-espresso.scss b/example/styleguide/res/sass/style-guide-espresso.scss index 9ceb5a5906..a3b8dcb9ac 100644 --- a/example/styleguide/res/sass/style-guide-espresso.scss +++ b/example/styleguide/res/sass/style-guide-espresso.scss @@ -31,4 +31,7 @@ $colorCode: rgba(black, 0.2); $colorGlyphExample: #fff; -@import "style-guide-base"; \ No newline at end of file +@import "style-guide-base"; + +div.themed.espresso { display: block; } +span.themed.espresso { display: inline; } diff --git a/example/styleguide/res/sass/style-guide-snow.scss b/example/styleguide/res/sass/style-guide-snow.scss index f29d2299ff..a48aec3756 100644 --- a/example/styleguide/res/sass/style-guide-snow.scss +++ b/example/styleguide/res/sass/style-guide-snow.scss @@ -31,4 +31,7 @@ $colorCode: rgba(black, 0.1); $colorGlyphExample: darken($colorBodyBg, 30%); -@import "style-guide-base"; \ No newline at end of file +@import "style-guide-base"; + +div.themed.snow { display: block; } +span.themed.snow { display: inline; } \ No newline at end of file diff --git a/example/styleguide/res/templates/colors.html b/example/styleguide/res/templates/colors.html new file mode 100644 index 0000000000..47631b0cff --- /dev/null +++ b/example/styleguide/res/templates/colors.html @@ -0,0 +1,84 @@ + +
+ + + +Open MCT Style Guide
+In mission operations, color is used to convey meaning. Alerts, warnings and status conditions are by convention communicated with colors in the green, yellow and red families. Colors must also be reserved for use in plots. As a result, Open MCT uses color selectively and sparingly. Follow these guidelines:
+{{ colorSet.description }}
+| Name | {{color.name}} |
| SASS | {{color.constant}} |
| Value | + {{color.valEspresso}} + {{color.valSnow}} + |