|
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:
819 bytes
|
| Rev | Line | |
|---|
| [2058e5c] | 1 | let OldValue = require('../old-value')
|
|---|
| 2 | let Value = require('../value')
|
|---|
| 3 |
|
|---|
| 4 | class Pixelated extends Value {
|
|---|
| 5 | /**
|
|---|
| 6 | * Different name for WebKit and Firefox
|
|---|
| 7 | */
|
|---|
| 8 | old(prefix) {
|
|---|
| 9 | if (prefix === '-webkit-') {
|
|---|
| 10 | return new OldValue(this.name, '-webkit-optimize-contrast')
|
|---|
| 11 | }
|
|---|
| 12 | if (prefix === '-moz-') {
|
|---|
| 13 | return new OldValue(this.name, '-moz-crisp-edges')
|
|---|
| 14 | }
|
|---|
| 15 | return super.old(prefix)
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | /**
|
|---|
| 19 | * Use non-standard name for WebKit and Firefox
|
|---|
| 20 | */
|
|---|
| 21 | replace(string, prefix) {
|
|---|
| 22 | if (prefix === '-webkit-') {
|
|---|
| 23 | return string.replace(this.regexp(), '$1-webkit-optimize-contrast')
|
|---|
| 24 | }
|
|---|
| 25 | if (prefix === '-moz-') {
|
|---|
| 26 | return string.replace(this.regexp(), '$1-moz-crisp-edges')
|
|---|
| 27 | }
|
|---|
| 28 | return super.replace(string, prefix)
|
|---|
| 29 | }
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | Pixelated.names = ['pixelated']
|
|---|
| 33 |
|
|---|
| 34 | module.exports = Pixelated
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.