Sha256: a8b1898d022c8acd286b56eb77d3dd606693ff3bb7701a399e9c36cbd25d7d97

Contents?: true

Size: 796 Bytes

Versions: 6

Compression:

Stored size: 796 Bytes

Contents

'use strict';

var TYPES = require('../parsers').TYPES;
var valueType = require('../parsers').valueType;

var absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
var relativeSizes = ['larger', 'smaller'];

module.exports.isValid = function (v) {
    var type = valueType(v.toLowerCase());
    return type === TYPES.LENGTH || type === TYPES.PERCENT ||
        (type === TYPES.KEYWORD && absoluteSizes.indexOf(v.toLowerCase()) !== -1) ||
        (type === TYPES.KEYWORD && relativeSizes.indexOf(v.toLowerCase()) !== -1);
};

module.exports.definition = {
    set: function (v) {
        this._setProperty('font-size', v);
    },
    get: function () {
        return this.getPropertyValue('font-size');
    },
    enumerable: true,
    configurable: true
};

Version data entries

6 entries across 5 versions & 4 rubygems

Version Path
learn_create-0.0.22 lib/templates/javascript_lab_template/node_modules/cssstyle/lib/properties/fontSize.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/cssstyle/lib/properties/fontSize.js
locomotivecms-3.4.0 app/javascript/node_modules/cssstyle/lib/properties/fontSize.js
locomotivecms-3.4.0 app/javascript/node_modules/jest-environment-jsdom/node_modules/cssstyle/lib/properties/fontSize.js
lanes-0.8.0 node_modules/cssstyle/lib/properties/fontSize.js
select_all-rails-0.3.1 node_modules/cssstyle/lib/properties/fontSize.js