Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConflictResolver

ConflictResolver is a utility class that crawls a Block, the block it inherits from, and any other explicitly referenced blocks where resolution rules are applied, and resolves property values accordingly.

Hierarchy

  • ConflictResolver

Index

Constructors

constructor

Properties

config

Methods

Private mergeKeySelectors

  • mergeKeySelectors(s1: ParsedSelector, s2: ParsedSelector): ParsedSelector[]
  • Given two conflicting ParsedSelectors, return a list of selector rules that select elements with both rules present.

    Parameters

    • s1: ParsedSelector

      Conflicting ParsedSelector 1.

    • s2: ParsedSelector

      Conflicting ParsedSelector 1.

    Returns ParsedSelector[]

    A list of ParsedSelector rules that select all possible elements that can have both styles applied.

resolve

  • resolve(root: Root, block: Block): void
  • Given a ruleset and Block, resolve all resolve() and resolve-inherited() calls with the appropriate values from the local block and resolved blocks.

    Parameters

    • root: Root

      The PostCSS ruleset to operate on.

    • block: Block

      The owner block of these rules.

    Returns void

Private resolveConflictWith

  • resolveConflictWith(referenceStr: string, other: Style, decl: Declaration, otherDecls: Declaration[], isOverride: boolean): ConflictType

resolveInheritance

  • resolveInheritance(root: Root, block: Block): void
  • Given a ruleset and Block, resolve all conflicts against the parent block as an override by automatically injecting resolve-inherited() calls for conflicting properties.

    Parameters

    • root: Root

      The PostCSS ruleset to operate on.

    • block: Block

      The owner block of these rules.

    Returns void

sourceLocation

Private splitSelector

  • splitSelector(s: CompoundSelector): [CompoundSelector, selectorParser.Combinator, CompoundSelector] | [undefined, undefined, CompoundSelector]
  • Splits a CompoundSelector linked list into an array of [ CompoundSelector, Combinator, CompoundSelector ], where the first CompoundSelector is all but the last selector segment.

    Parameters

    • s: CompoundSelector

      The compound selector to split.

    Returns [CompoundSelector, selectorParser.Combinator, CompoundSelector] | [undefined, undefined, CompoundSelector]

Generated using TypeDoc