Sha256: 9fa0e526b42a660b0efbbd409a228746793b03cdbe3cda203536f482c934db5e

Contents?: true

Size: 1.02 KB

Versions: 26

Compression:

Stored size: 1.02 KB

Contents

'use strict';

var shorthandSetter = require('../parsers').shorthandSetter;
var shorthandGetter = require('../parsers').shorthandGetter;

var shorthand_for = {
  'border-width': require('./borderWidth'),
  'border-style': require('./borderStyle'),
  'border-color': require('./borderColor'),
};

var myShorthandSetter = shorthandSetter('border', shorthand_for);
var myShorthandGetter = shorthandGetter('border', shorthand_for);

module.exports.definition = {
  set: function (v) {
    if (v.toString().toLowerCase() === 'none') {
      v = '';
    }
    myShorthandSetter.call(this, v);
    this.removeProperty('border-top');
    this.removeProperty('border-left');
    this.removeProperty('border-right');
    this.removeProperty('border-bottom');
    this._values['border-top'] = this._values.border;
    this._values['border-left'] = this._values.border;
    this._values['border-right'] = this._values.border;
    this._values['border-bottom'] = this._values.border;
  },
  get: myShorthandGetter,
  enumerable: true,
  configurable: true,
};

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.19 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.12 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.11 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.10 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.9 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.8 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js
clapton-0.0.7 lib/clapton/javascripts/node_modules/cssstyle/lib/properties/border.js