A stylesheet language written in TypeScript that compiles to CSS
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

mediaQueryPredicate.ts 545B

12345678910111213141516171819202122
  1. import * as AST from '../ast';
  2. import Env from '../env';
  3. export class MediaQueryPredicate {
  4. public property: AST.Property;
  5. public value: AST.Value;
  6. public constructor(
  7. property: AST.Property,
  8. value: AST.Value
  9. ) {
  10. this.property = property;
  11. this.value = value;
  12. }
  13. public compile(env: Env, opts: AST.Opts) {
  14. const wordSpacer = opts.prettyPrint ? ' ' : '';
  15. const property = this.property.compile(env, opts);
  16. const value = this.value.compile(env, opts);
  17. return `${property}:${wordSpacer}${value}`;
  18. }
  19. }