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 TextDecorationSkipInk extends Declaration {
|
2022-01-21 08:28:41 +00:00
|
|
|
/**
|
|
|
|
* Change prefix for ink value
|
|
|
|
*/
|
2023-08-17 09:47:40 +00:00
|
|
|
set(decl, prefix) {
|
2022-01-21 08:28:41 +00:00
|
|
|
if (decl.prop === 'text-decoration-skip-ink' && decl.value === 'auto') {
|
2023-08-17 09:47:40 +00:00
|
|
|
decl.prop = prefix + 'text-decoration-skip'
|
|
|
|
decl.value = 'ink'
|
|
|
|
return decl
|
2022-01-21 08:28:41 +00:00
|
|
|
} else {
|
2023-08-17 09:47:40 +00:00
|
|
|
return super.set(decl, prefix)
|
2022-01-21 08:28:41 +00:00
|
|
|
}
|
2023-08-17 09:47:40 +00:00
|
|
|
}
|
|
|
|
}
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
TextDecorationSkipInk.names = [
|
|
|
|
'text-decoration-skip-ink',
|
|
|
|
'text-decoration-skip'
|
|
|
|
]
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
module.exports = TextDecorationSkipInk
|