(rule: CSSStyleRule, dest: ComputedStyles)
| 121 | } |
| 122 | |
| 123 | function readRule(rule: CSSStyleRule, dest: ComputedStyles) { |
| 124 | if (matchesSafe(div, rule.selectorText)) { |
| 125 | const {style} = rule |
| 126 | for (let i = 0; i < style.length; i++) { |
| 127 | const prop = style[i] |
| 128 | dest[prop] = style.getPropertyValue(prop) |
| 129 | } |
| 130 | } else { |
| 131 | // console.warn('no match:', rule.selectorText) |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | function readMedia(mediaRule: CSSMediaRule) { |
| 136 | const key = `@media ${mediaRule.media[0]}` |
no test coverage detected