| 1 | let Declaration = require('../declaration') |
| 2 | |
| 3 | const BASIC = [ |
| 4 | 'none', |
| 5 | 'underline', |
| 6 | 'overline', |
| 7 | 'line-through', |
| 8 | 'blink', |
| 9 | 'inherit', |
| 10 | 'initial', |
| 11 | 'unset' |
| 12 | ] |
| 13 | |
| 14 | class TextDecoration extends Declaration { |
| 15 | /** |
| 16 | * Do not add prefixes for basic values. |
| 17 | */ |
| 18 | check(decl) { |
| 19 | return decl.value.split(/\s+/).some(i => !BASIC.includes(i)) |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | TextDecoration.names = ['text-decoration'] |
| 24 | |
| 25 | module.exports = TextDecoration |