Browse Source

Add full option in properties

pull/1518/head
Artur Arseniev 7 years ago
parent
commit
69cbf135d3
  1. 2
      dist/css/grapes.min.css
  2. 3
      src/style_manager/model/Property.js
  3. 8
      src/style_manager/view/PropertyView.js
  4. 1
      src/styles/scss/_gjs_style_manager.scss

2
dist/css/grapes.min.css

File diff suppressed because one or more lines are too long

3
src/style_manager/model/Property.js

@ -15,6 +15,9 @@ const Property = require('backbone').Model.extend(
visible: true,
fixedValues: ['initial', 'inherit'],
// If true, the property will be forced to be full width
full: 0,
// If true to the value will be added '!important'
important: 0,

8
src/style_manager/view/PropertyView.js

@ -484,8 +484,14 @@ module.exports = Backbone.View.extend({
const pfx = this.pfx;
const model = this.model;
const el = this.el;
const property = model.get('property');
const full = model.get('full');
const className = `${pfx}property`;
el.innerHTML = this.template(model);
el.className = `${pfx}property ${pfx}${model.get('type')}`;
el.className = `${className} ${pfx}${model.get(
'type'
)} ${className}__${property}`;
el.className += full ? ` ${className}--full` : '';
this.updateStatus();
const onRender = this.onRender && this.onRender.bind(this);

1
src/styles/scss/_gjs_style_manager.scss

@ -252,6 +252,7 @@
margin-bottom: 5px;
padding: 0 5px;
&--full,
&.#{$sm-prefix}composite,
&.#{$sm-prefix}file,
&.#{$sm-prefix}list,

Loading…
Cancel
Save