Browse Source

Add default style manager

pull/36/head
Artur Arseniev 10 years ago
parent
commit
9ca889371e
  1. 2
      dist/css/grapes.min.css
  2. 10
      dist/grapes.min.js
  3. 6
      src/demo.js
  4. 35
      src/style_manager/config/config.js

2
dist/css/grapes.min.css

File diff suppressed because one or more lines are too long

10
dist/grapes.min.js

File diff suppressed because one or more lines are too long

6
src/demo.js

@ -135,6 +135,7 @@ require(['config/require-config'], function() {
}],
},
*/
styleManager : {
sectors: [{
name: 'General',
@ -165,7 +166,7 @@ require(['config/require-config'], function() {
name: 'Extra',
open: false,
buildProps: ['transition', 'perspective', 'transform'],
},/*{
},{
name: 'Dimension',
open: false,
properties:[{
@ -181,7 +182,7 @@ require(['config/require-config'], function() {
name : 'Center',
}],
}],
}*/{
},{
name: 'Flex',
open: false,
properties: [{
@ -335,6 +336,7 @@ require(['config/require-config'], function() {
}],
}]
}
],
},

35
src/style_manager/config/config.js

@ -1,7 +1,7 @@
define(function () {
return {
stylePrefix : 'sm-',
stylePrefix: 'sm-',
// Default sectors, which could include also properties
//
@ -17,10 +17,39 @@ define(function () {
// min : 0,
// }],
// }]
sectors : [],
sectors: [{
name: 'General',
open: false,
buildProps: ['float', 'display', 'position', 'top', 'right', 'left', 'bottom'],
},{
name: 'Dimension',
open: false,
buildProps: ['width', 'height', 'max-width', 'min-height', 'margin', 'padding'],
},{
name: 'Typography',
open: false,
buildProps: ['font-family', 'font-size', 'font-weight', 'letter-spacing', 'color', 'line-height', 'text-align', 'text-shadow'],
properties: [{
property: 'text-align',
list : [
{value: 'left', className: 'fa fa-align-left'},
{value: 'center', className: 'fa fa-align-center' },
{value: 'right', className: 'fa fa-align-right'},
{value: 'justify', className: 'fa fa-align-justify'}
],
}]
},{
name: 'Decorations',
open: false,
buildProps: ['border-radius-c', 'background-color', 'border-radius', 'border', 'box-shadow', 'background'],
},{
name: 'Extra',
open: false,
buildProps: ['transition', 'perspective', 'transform'],
}],
// Text to show in case no element selected
textNoElement : 'Select an element before using Style Manager',
textNoElement: 'Select an element before using Style Manager',
};
});
Loading…
Cancel
Save