|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.0 KB
|
| Rev | Line | |
|---|
| [9af201e] | 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var shorthandSetter = require('../parsers').shorthandSetter;
|
|---|
| 4 | var shorthandGetter = require('../parsers').shorthandGetter;
|
|---|
| 5 |
|
|---|
| 6 | var shorthand_for = {
|
|---|
| 7 | 'border-width': require('./borderWidth'),
|
|---|
| 8 | 'border-style': require('./borderStyle'),
|
|---|
| 9 | 'border-color': require('./borderColor'),
|
|---|
| 10 | };
|
|---|
| 11 |
|
|---|
| 12 | var myShorthandSetter = shorthandSetter('border', shorthand_for);
|
|---|
| 13 | var myShorthandGetter = shorthandGetter('border', shorthand_for);
|
|---|
| 14 |
|
|---|
| 15 | module.exports.definition = {
|
|---|
| 16 | set: function(v) {
|
|---|
| 17 | if (v.toString().toLowerCase() === 'none') {
|
|---|
| 18 | v = '';
|
|---|
| 19 | }
|
|---|
| 20 | myShorthandSetter.call(this, v);
|
|---|
| 21 | this.removeProperty('border-top');
|
|---|
| 22 | this.removeProperty('border-left');
|
|---|
| 23 | this.removeProperty('border-right');
|
|---|
| 24 | this.removeProperty('border-bottom');
|
|---|
| 25 | this._values['border-top'] = this._values.border;
|
|---|
| 26 | this._values['border-left'] = this._values.border;
|
|---|
| 27 | this._values['border-right'] = this._values.border;
|
|---|
| 28 | this._values['border-bottom'] = this._values.border;
|
|---|
| 29 | },
|
|---|
| 30 | get: myShorthandGetter,
|
|---|
| 31 | enumerable: true,
|
|---|
| 32 | configurable: true,
|
|---|
| 33 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.