12345678910111213141516171819202122 |
- import * as AST from '../ast';
- import Env from '../env';
-
- export class MediaQueryPredicate {
- public property: AST.Property;
- public value: AST.Value;
-
- public constructor(
- property: AST.Property,
- value: AST.Value
- ) {
- this.property = property;
- this.value = value;
- }
-
- public compile(env: Env, opts: AST.Opts) {
- const wordSpacer = opts.prettyPrint ? ' ' : '';
- const property = this.property.compile(env, opts);
- const value = this.value.compile(env, opts);
- return `${property}:${wordSpacer}${value}`;
- }
- }
|