Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

References

Re-exports AcceptedPlugin
Re-exports AnyNode
Renames and re-exports AtRule_
Re-exports AtRuleProps
Re-exports Builder
Re-exports ChildNode
Re-exports ChildProps
Renames and re-exports Comment_
Re-exports CommentProps
Renames and re-exports Container_
Re-exports ContainerProps
Renames and re-exports CssSyntaxError_
Renames and re-exports Declaration_
Re-exports DeclarationProps
Renames and re-exports Document_
Re-exports DocumentProps
Re-exports FilePosition
Re-exports Helpers
Renames and re-exports Input_
Renames and re-exports LazyResult_
Re-exports Message
Re-exports Node
Re-exports NodeErrorOptions
Re-exports NodeProps
Re-exports OldPlugin
Re-exports Parser
Re-exports Plugin
Re-exports PluginCreator
Re-exports Position
Re-exports Postcss
Re-exports ProcessOptions
Renames and re-exports Processor_
Renames and re-exports Result_
Renames and re-exports Root_
Re-exports RootProps
Renames and re-exports Rule_
Re-exports RuleProps
Re-exports Source
Re-exports SourceMap
Re-exports SourceMapOptions
Re-exports Stringifier
Re-exports Syntax
Re-exports TransformCallback
Re-exports Transformer
Renames and re-exports Warning_
Re-exports WarningOptions
Renames and re-exports postcss

Variables

list: List

Functions

  • Creates a new AtRule node.

    Parameters

    • Optional defaults: AtRuleProps

      Properties for the new node.

    Returns AtRule_

    New at-rule node.

  • Creates a new Comment node.

    Parameters

    • Optional defaults: CommentProps

      Properties for the new node.

    Returns Comment_

    New comment node

  • Creates a new Declaration node.

    Parameters

    Returns Declaration_

    New declaration node.

  • Creates a new Document node.

    Parameters

    Returns Document_

    New document node.

  • fromJSON(data: object): Node
  • fromJSON(data: object[]): Node[]
  • Rehydrate a JSON AST (from Node#toJSON) back into the AST classes.

    const json = root.toJSON()
    // save to file, send by network, etc
    const root2 = postcss.fromJSON(json)

    Parameters

    • data: object

    Returns Node

  • Rehydrate a JSON AST (from Node#toJSON) back into the AST classes.

    const json = root.toJSON()
    // save to file, send by network, etc
    const root2 = postcss.fromJSON(json)

    Parameters

    • data: object[]

    Returns Node[]

  • Parses source css and returns a new Root or Document node, which contains the source CSS nodes.

    // Simple CSS concatenation with source map support
    const root1 = postcss.parse(css1, { from: file1 })
    const root2 = postcss.parse(css2, { from: file2 })
    root1.append(root2).toResult().css

    Parameters

    Returns Root_

  • Creates a new Root node.

    Parameters

    Returns Root_

    New root node.

  • Creates a new Rule node.

    Parameters

    Returns Rule_

    New rule node.

  • Default function to convert a node tree into a CSS string.

    Parameters

    Returns void