|
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:
568 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var parsers = require('../parsers');
|
|---|
| 4 |
|
|---|
| 5 | var isValid = (module.exports.isValid = function isValid(v) {
|
|---|
| 6 | return (
|
|---|
| 7 | parsers.valueType(v) === parsers.TYPES.KEYWORD &&
|
|---|
| 8 | (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit')
|
|---|
| 9 | );
|
|---|
| 10 | });
|
|---|
| 11 |
|
|---|
| 12 | module.exports.definition = {
|
|---|
| 13 | set: function(v) {
|
|---|
| 14 | if (!isValid(v)) {
|
|---|
| 15 | return;
|
|---|
| 16 | }
|
|---|
| 17 | this._setProperty('background-attachment', v);
|
|---|
| 18 | },
|
|---|
| 19 | get: function() {
|
|---|
| 20 | return this.getPropertyValue('background-attachment');
|
|---|
| 21 | },
|
|---|
| 22 | enumerable: true,
|
|---|
| 23 | configurable: true,
|
|---|
| 24 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.