source: node_modules/autoprefixer/lib/hacks/flex-grow.js

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
RevLine 
[2058e5c]1let Declaration = require('../declaration')
2let flexSpec = require('./flex-spec')
3
4class 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
28Flex.names = ['flex-grow', 'flex-positive']
29
30module.exports = Flex
Note: See TracBrowser for help on using the repository browser.