| 1 |
let Declaration = require('../declaration') |
| 2 |
let flexSpec = require('./flex-spec') |
| 3 |
|
| 4 |
class Flex extends Declaration { |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
normalize() { |
| 9 |
return 'flex' |
| 10 |
} |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
prefixed(prop, prefix) { |
| 16 |
let spec |
| 17 |
;[spec, prefix] = flexSpec(prefix) |
| 18 |
if (spec === 2009) { |
| 19 |
return prefix + 'box-flex' |
| 20 |
} |
| 21 |
if (spec === 2012) { |
| 22 |
return prefix + 'flex-positive' |
| 23 |
} |
| 24 |
return super.prefixed(prop, prefix) |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
Flex.names = ['flex-grow', 'flex-positive'] |
| 29 |
|
| 30 |
module.exports = Flex |