UtilityAtRuleDeclarations
interfaz Since 1.3.0
Declaraciones del cuerpo de una at-rule creada con UtilityHelpers.atRule: las
propiedades de UtilityDeclarations y los descriptores de @font-face (src,
fontDisplay, unicodeRange…), @property (syntax, inherits, initialValue),
@page, @counter-style, @font-palette-values y @view-transition, tipados con csstype.
Es un subtipo de UtilityDeclarations.
ts
import type { UtilityAtRuleDeclarations } from "@meekojs/meeko/postcss";Source code src/compiler/css/utilities.ts:99
Declaración #
ts
interface UtilityAtRuleDeclarations extends UtilityDeclarations, DeclaredProperties<Omit<AtRuleDescriptors, keyof UtilityDeclarations>> {}Example #
ts
import { defineUtilities, type UtilityAtRuleDeclarations } from "@meekojs/meeko/postcss";
const inter: UtilityAtRuleDeclarations = {
fontFamily: "Inter",
src: "url('/fonts/inter.woff2') format('woff2')",
fontDisplay: "swap",
};
export default defineUtilities(({ atRule }) => [
atRule("font-face", "", inter),
atRule("property", "--angle", { syntax: "'<angle>'", inherits: "false", initialValue: "0deg" }),
]);