2023-08-17 09:47:40 +00:00
|
|
|
let Declaration = require('../declaration')
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
class MaskBorder extends Declaration {
|
2022-01-21 08:28:41 +00:00
|
|
|
/**
|
|
|
|
* Return property name by final spec
|
|
|
|
*/
|
2023-08-17 09:47:40 +00:00
|
|
|
normalize() {
|
|
|
|
return this.name.replace('box-image', 'border')
|
2022-01-21 08:28:41 +00:00
|
|
|
}
|
2023-08-17 09:47:40 +00:00
|
|
|
|
2022-01-21 08:28:41 +00:00
|
|
|
/**
|
|
|
|
* Return flex property for 2012 spec
|
|
|
|
*/
|
2023-08-17 09:47:40 +00:00
|
|
|
prefixed(prop, prefix) {
|
|
|
|
let result = super.prefixed(prop, prefix)
|
2022-01-21 08:28:41 +00:00
|
|
|
if (prefix === '-webkit-') {
|
2023-08-17 09:47:40 +00:00
|
|
|
result = result.replace('border', 'box-image')
|
2022-01-21 08:28:41 +00:00
|
|
|
}
|
2023-08-17 09:47:40 +00:00
|
|
|
return result
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
MaskBorder.names = [
|
|
|
|
'mask-border',
|
|
|
|
'mask-border-source',
|
|
|
|
'mask-border-slice',
|
|
|
|
'mask-border-width',
|
|
|
|
'mask-border-outset',
|
|
|
|
'mask-border-repeat',
|
|
|
|
'mask-box-image',
|
|
|
|
'mask-box-image-source',
|
|
|
|
'mask-box-image-slice',
|
|
|
|
'mask-box-image-width',
|
|
|
|
'mask-box-image-outset',
|
|
|
|
'mask-box-image-repeat'
|
|
|
|
]
|
|
|
|
|
|
|
|
module.exports = MaskBorder
|