Search Results for

    Show / Hide Table of Contents

    Class CSSHelpers

    Methods that are frequently needed to help implement common CSS3 features - TODO: this may get merged into one of the ILayoutAlgorithm-base-classes in future

    Inheritance
    Object
    CSSHelpers
    Namespace: NinjaTools.FlexBuilder
    Assembly: cs.temp.dll.dll
    Syntax
    public static class CSSHelpers

    Methods

    - (Single) ContentSizeForBoxSize(FlexItem, Axis, Single)

    Parameters
    FlexItem element
    Axis axis
    Single boxLength
    Returns
    Single

    - (Single) ConvertBorderLengthToOuterLength(FlexItem, Axis, Single, Nullable)

    note: do not pass this a ContentLength, compiler cannot warn you if you make that mistake

    Parameters
    FlexItem element
    Axis axis
    Single borderSize
    Nullable<Single> effectiveContainerInnerSize
    Returns
    Single

    - (ContentLength) ConvertBoxLengthToInnerLength(FlexItem, Axis, BoxLength, Func<>>)

    Parameters
    FlexItem element
    Axis axis
    BoxLength boxSize
    Func<Nullable<Single>> effectiveContainerInnerSize
    Returns
    ContentLength

    - (ContentLength) ConvertBoxLengthToInnerLength(RootFlexContainer, BoxLength)

    RFC's aren't allowed FlexItem's, so all their Box/Content/Outer/Inner/Padding/Margins values are - by definition - the same

    Parameters
    RootFlexContainer rfc
    BoxLength boxSize
    Returns
    ContentLength

    - (Single) ConvertBoxLengthToOuterLength(FlexItem, Axis, Single, ContentLength, Boolean)

    Spec: https://www.w3.org/TR/css-sizing-3/#outer-size

    Outer Size === "content_box + padding + border + margins" -- i.e. the outermost variant of a CSS Box

    Note: Requires that the size passed in is the 'box' size, which depends on the element's boxmode (CONTENT_BOX vs BORDER_BOX etc)

    Parameters
    FlexItem element
    Axis axis
    Single boxSize
    ContentLength effectiveContainerInnerSize
    Boolean debug
    Returns
    Single

    - (BoxLength) ConvertOuterLengthToBoxLength(FlexItem, Axis, Single, ContentLength)

    Note: "outer" length is the same as "margin-box" length by definition

    Parameters
    FlexItem item
    Axis axis
    Single outerLength
    ContentLength effectiveContainerInnerSize
    Returns
    BoxLength
    Exceptions
    Exception

    - (ContentLength) ConvertOuterLengthToInnerLength(FlexItem, Axis, Single, ContentLength)

    Note: "inner" length is the same as "content" length by definition, Note: "outer" length is the same as "margin-box" length by definition

    i.e. this ALWAYS subtracts BOTH the padding AND the margins

    Parameters
    FlexItem item
    Axis axis
    Single outerLength
    ContentLength effectiveContainerInnerSize
    Returns
    ContentLength
    Exceptions
    Exception

    - (Axis) CrossAxis(FlexDirection)

    Parameters
    FlexDirection direction
    Returns
    Axis

    - (Axis) CrossFromMain(Axis)

    Parameters
    Axis mainAxis
    Returns
    Axis

    - (Axis) MainAxis(FlexDirection)

    Parameters
    FlexDirection direction
    Returns
    Axis

    - (Axis) MainFromCross(Axis)

    Parameters
    Axis crossAxis
    Returns
    Axis
    In This Article
    Back to top http://flexbuilder.ninja