Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

UtilityAtRule

interfaz Since 1.2.0

Una at-rule creada con UtilityHelpers.atRule, por ejemplo @media o @supports. Sin cuerpo se emite como sentencia (@layer a, b;).

ts
import type { UtilityAtRule } from "@meekojs/meeko/postcss";

Source code src/compiler/css/utilities.ts:142

Declaración #

ts
interface UtilityAtRule {
	readonly kind: 'atrule'
	readonly name: string
	readonly params: string
	readonly declarations: UtilityAtRuleDeclarations
	readonly children: readonly UtilityOutput[]
	readonly block: boolean
}

Example #

ts
import { defineUtilities, type UtilityAtRule } from "@meekojs/meeko/postcss";

export default defineUtilities(({ atRule, rule }) => {
  const wide: UtilityAtRule = atRule("media", "(min-width: 48rem)", rule(".stack", { flexDirection: "row" }));
  return wide;
});

Propiedades #

kind #

propiedad sólo lectura

readonly kind: 'atrule'

Discriminante: una at-rule como @media o @supports.

name #

propiedad sólo lectura

readonly name: string

Nombre sin @: media, supports, container…

params #

propiedad sólo lectura

readonly params: string

Parámetros tras el nombre, por ejemplo (min-width: 48rem).

declarations #

propiedad sólo lectura

readonly declarations: UtilityAtRuleDeclarations

Declaraciones del cuerpo, para @font-face o @property.

children #

propiedad sólo lectura

readonly children: readonly UtilityOutput[]

Reglas, at-rules y CSS del cuerpo.

block #

propiedad sólo lectura

readonly block: boolean

false cuando la at-rule es una sentencia sin { }.

See also #

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/compiler/css/utilities.ts