source: frontend/node_modules/cssstyle/lib/properties/borderStyle.js

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: 710 bytes
RevLine 
[9af201e]1'use strict';
2
3var implicitSetter = require('../parsers').implicitSetter;
4
5// the valid border-styles:
6var styles = [
7 'none',
8 'hidden',
9 'dotted',
10 'dashed',
11 'solid',
12 'double',
13 'groove',
14 'ridge',
15 'inset',
16 'outset',
17];
18
19module.exports.isValid = function parse(v) {
20 return typeof v === 'string' && (v === '' || styles.indexOf(v) !== -1);
21};
22var isValid = module.exports.isValid;
23
24var parser = function(v) {
25 if (isValid(v)) {
26 return v.toLowerCase();
27 }
28 return undefined;
29};
30
31module.exports.definition = {
32 set: implicitSetter('border', 'style', isValid, parser),
33 get: function() {
34 return this.getPropertyValue('border-style');
35 },
36 enumerable: true,
37 configurable: true,
38};
Note: See TracBrowser for help on using the repository browser.