|
Last change
on this file was 2058e5c, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Working / before login
|
-
Property mode
set to
100644
|
|
File size:
516 bytes
|
| Line | |
|---|
| 1 | let Declaration = require('../declaration')
|
|---|
| 2 |
|
|---|
| 3 | class BackgroundSize extends Declaration {
|
|---|
| 4 | /**
|
|---|
| 5 | * Duplication parameter for -webkit- browsers
|
|---|
| 6 | */
|
|---|
| 7 | set(decl, prefix) {
|
|---|
| 8 | let value = decl.value.toLowerCase()
|
|---|
| 9 | if (
|
|---|
| 10 | prefix === '-webkit-' &&
|
|---|
| 11 | !value.includes(' ') &&
|
|---|
| 12 | value !== 'contain' &&
|
|---|
| 13 | value !== 'cover'
|
|---|
| 14 | ) {
|
|---|
| 15 | decl.value = decl.value + ' ' + decl.value
|
|---|
| 16 | }
|
|---|
| 17 | return super.set(decl, prefix)
|
|---|
| 18 | }
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | BackgroundSize.names = ['background-size']
|
|---|
| 22 |
|
|---|
| 23 | module.exports = BackgroundSize
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.