| 1 |
let Declaration = require('../declaration') |
| 2 |
|
| 3 |
class GridStart extends Declaration { |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
check(decl) { |
| 8 |
let value = decl.value |
| 9 |
return !value.includes('/') && !value.includes('span') |
| 10 |
} |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
normalize(prop) { |
| 16 |
return prop.replace('-start', '') |
| 17 |
} |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
prefixed(prop, prefix) { |
| 23 |
let result = super.prefixed(prop, prefix) |
| 24 |
if (prefix === '-ms-') { |
| 25 |
result = result.replace('-start', '') |
| 26 |
} |
| 27 |
return result |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
GridStart.names = ['grid-row-start', 'grid-column-start'] |
| 32 |
|
| 33 |
module.exports = GridStart |