(mediaRule: CSSMediaRule)
| 133 | } |
| 134 | |
| 135 | function readMedia(mediaRule: CSSMediaRule) { |
| 136 | const key = `@media ${mediaRule.media[0]}` |
| 137 | // const dest = computed[key] || (computed[key] = {}) |
| 138 | const dest = {} |
| 139 | for (const rule of mediaRule.cssRules) { |
| 140 | if (rule instanceof CSSStyleRule) { |
| 141 | readRule(rule, dest) |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | // Don't add media rule to computed styles |
| 146 | // if no styles were actually applied |
| 147 | if (Object.keys(dest).length > 0) { |
| 148 | computed[key] = dest |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | /** |
| 153 | * This provides a layer of compatibility between the render() function from |
no test coverage detected