All files / src/compiler/phases/2-analyze/visitors StyleDirective.js

100% Statements 16/16
100% Branches 4/4
100% Functions 1/1
100% Lines 15/15

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 162x 2x 2x 2x 2x 2x 2x 2x 2x 77x 1x 1x 76x 76x 76x  
/** @import { StyleDirective } from '#compiler' */
/** @import { Context } from '../types' */
import * as e from '../../../errors.js';
 
/**
 * @param {StyleDirective} node
 * @param {Context} context
 */
export function StyleDirective(node, context) {
	if (node.modifiers.length > 1 || (node.modifiers.length && node.modifiers[0] !== 'important')) {
		e.style_directive_invalid_modifier(node);
	}
 
	context.next();
}