|
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:
595 bytes
|
| Rev | Line | |
|---|
| [2058e5c] | 1 | let Declaration = require('../declaration')
|
|---|
| 2 | let flexSpec = require('./flex-spec')
|
|---|
| 3 |
|
|---|
| 4 | class Flex extends Declaration {
|
|---|
| 5 | /**
|
|---|
| 6 | * Return property name by final spec
|
|---|
| 7 | */
|
|---|
| 8 | normalize() {
|
|---|
| 9 | return 'flex'
|
|---|
| 10 | }
|
|---|
| 11 |
|
|---|
| 12 | /**
|
|---|
| 13 | * Return flex property for 2009 and 2012 specs
|
|---|
| 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
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.