|
Last change
on this file since 2058e5c was 2058e5c, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Working / before login
|
-
Property mode
set to
100644
|
|
File size:
711 bytes
|
| Line | |
|---|
| 1 | let Selector = require('../selector')
|
|---|
| 2 |
|
|---|
| 3 | class Placeholder extends Selector {
|
|---|
| 4 | /**
|
|---|
| 5 | * Add old mozilla to possible prefixes
|
|---|
| 6 | */
|
|---|
| 7 | possible() {
|
|---|
| 8 | return super.possible().concat(['-moz- old', '-ms- old'])
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | /**
|
|---|
| 12 | * Return different selectors depend on prefix
|
|---|
| 13 | */
|
|---|
| 14 | prefixed(prefix) {
|
|---|
| 15 | if (prefix === '-webkit-') {
|
|---|
| 16 | return '::-webkit-input-placeholder'
|
|---|
| 17 | }
|
|---|
| 18 | if (prefix === '-ms-') {
|
|---|
| 19 | return '::-ms-input-placeholder'
|
|---|
| 20 | }
|
|---|
| 21 | if (prefix === '-ms- old') {
|
|---|
| 22 | return ':-ms-input-placeholder'
|
|---|
| 23 | }
|
|---|
| 24 | if (prefix === '-moz- old') {
|
|---|
| 25 | return ':-moz-placeholder'
|
|---|
| 26 | }
|
|---|
| 27 | return `::${prefix}placeholder`
|
|---|
| 28 | }
|
|---|
| 29 | }
|
|---|
| 30 |
|
|---|
| 31 | Placeholder.names = ['::placeholder']
|
|---|
| 32 |
|
|---|
| 33 | module.exports = Placeholder
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.