新增: - backend/venv/ - Python 虚拟环境 - backend/start.sh - 启动脚本(使用虚拟环境) - backend/requirements.txt - 依赖列表 - .gitignore - 忽略虚拟环境和缓存文件 说明: - 每个项目使用独立虚拟环境 - 避免依赖冲突 - 启动脚本自动创建和激活虚拟环境
40 lines
801 B
JavaScript
40 lines
801 B
JavaScript
let Declaration = require('../declaration')
|
|
let flexSpec = require('./flex-spec')
|
|
|
|
class FlexShrink extends Declaration {
|
|
/**
|
|
* Return property name by final spec
|
|
*/
|
|
normalize() {
|
|
return 'flex-shrink'
|
|
}
|
|
|
|
/**
|
|
* Return flex property for 2012 spec
|
|
*/
|
|
prefixed(prop, prefix) {
|
|
let spec
|
|
;[spec, prefix] = flexSpec(prefix)
|
|
if (spec === 2012) {
|
|
return prefix + 'flex-negative'
|
|
}
|
|
return super.prefixed(prop, prefix)
|
|
}
|
|
|
|
/**
|
|
* Ignore 2009 spec and use flex property for 2012
|
|
*/
|
|
set(decl, prefix) {
|
|
let spec
|
|
;[spec, prefix] = flexSpec(prefix)
|
|
if (spec === 2012 || spec === 'final') {
|
|
return super.set(decl, prefix)
|
|
}
|
|
return undefined
|
|
}
|
|
}
|
|
|
|
FlexShrink.names = ['flex-shrink', 'flex-negative']
|
|
|
|
module.exports = FlexShrink
|