123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- import { ContainerWithChildren } from './container.js'
- import Node from './node.js'
- declare namespace Declaration {
- export interface DeclarationRaws extends Record<string, unknown> {
-
- before?: string
-
- between?: string
-
- important?: string
-
- value?: {
- raw: string
- value: string
- }
- }
- export interface DeclarationProps {
-
- important?: boolean
-
- prop: string
-
- raws?: DeclarationRaws
-
- value: string
- }
-
- export { Declaration_ as default }
- }
- declare class Declaration_ extends Node {
- parent: ContainerWithChildren | undefined
- raws: Declaration.DeclarationRaws
- type: 'decl'
- constructor(defaults?: Declaration.DeclarationProps)
- assign(overrides: Declaration.DeclarationProps | object): this
- clone(overrides?: Partial<Declaration.DeclarationProps>): this
- cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): this
- cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): this
- /**
- * It represents a specificity of the declaration.
- *
- * If true, the CSS declaration will have an
- * [important](https:
- * specifier.
- *
- * ```js
- * const root = postcss.parse('a { color: black !important; color: red }')
- *
- * root.first.first.important
- * root.first.last.important
- * ```
- */
- get important(): boolean
- set important(value: boolean)
-
- get prop(): string
- set prop(value: string)
-
- get value(): string
- set value(value: string)
-
- get variable(): boolean
- }
- declare class Declaration extends Declaration_ {}
- export = Declaration
|