@vivliostyle/core
    Preparing search index...

    Class Box

    Represent a box generated by a (pseudo)element. When constructed, a box corresponding to ::before pseudoelement is also constructed and stored in beforeBox property, whereas one corresponding ::after pseudoelement is not constructed and afterBox property is null. afterBox is constructed by buildAfterPseudoElementBox method.

    Cascaded style values for the box.

    The start offset of the box. It coincides with the start offset of the element if the box is generated by the element or the ::before pseudoelement. When the box corresponds to the ::after pseudoelement, the offset is just after the content before the ::after pseudoelement.

    True if the box is generated by the root element (not pseudoelement).

    FlowChunk to which the box belongs to.

    True if the box is right after the block start edge.

    True if the box is right after the flow start.

    True if the parent box has a displayed box.

    Index

    Constructors

    • Parameters

      • context: Context
      • style: ElementStyle
      • offset: number
      • isRoot: boolean
      • flowChunk: FlowChunk
      • atBlockStart: boolean
      • atFlowStart: boolean
      • isParentBoxDisplayed: boolean

      Returns Box

    Properties

    afterBox: Box = null
    atBlockStart: boolean
    atFlowStart: boolean
    beforeBox: Box = null
    breakBefore: string = null
    context: Context
    flowChunk: FlowChunk
    flowName: string
    hasBoxValue: boolean = null
    isBlockValue: boolean = null
    isParentBoxDisplayed: boolean
    isRoot: boolean
    offset: number
    styleValues: { [key: string]: Val } = ...

    Methods

    • Build a box corresponding to ::after pseudoelement and stores it in afterBox property.

      Parameters

      • offset: number

        The start offset of the ::after pseudoelement box, which is just after the content before the ::after pseudoelement.

      • atBlockStart: boolean

        True if the box is right after the block start edge.

      • atFlowStart: boolean

        True if the box is right after the flow start.

      Returns void

    • Parameters

      • edge: string

      Returns string