Class FlexboxBasis
Wraps a FlexBasis (which could be dimensionless, e.g. 'CONTENT', or could require a dimension, e.g. 'LENGTH') and a potentially-null float (for the cases of PERCENT and LENGTH) into a single variable.
Inherited Members
Namespace: NinjaTools.FlexBuilder.CSS3
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class FlexboxBasis : FloatEnum<FlexBasis>
Constructors
- (void) FlexboxBasis(FlexBasis)
Sets the basis to any mode, and sets the dimension to 0 (for LENGTH or PERCENT)
Parameters
FlexBasis | mode |
- (void) FlexboxBasis(Single, FlexBasis)
Properties
- (FlexboxBasis) Auto
Shorthand for creating a struct set to basis = AUTO
- (FlexboxBasis) Content
Shorthand for creating a struct set to basis = CONTENT
Methods
- (Boolean) CanResolve(ContentLength, out Single)
Parameters
ContentLength | parentContainerInnerLengthThisAxis | |
Single | resolvedPixelValue |
Returns
Boolean |
- (FlexBasis) ResolvePercentBasis(FlexboxBasis, CSSAvailableLength, out BoxLength)
Takes a supplied FlexboxBasis in PERCENT mode, and the inner length of its parent (if known), and calculates the effective mode: if you provided a definite Parent Inner Length then it returns the resolved size in pixels, but if you provided an indefinite parent-inner-length then it fallsback to CONTENT mode (this is the default required by the CSS3 spec).
Parameters
FlexboxBasis | basis | flex-basis to evaluate |
CSSAvailableLength | parentContainerMainInnerLength | the INNER CONTENT length of the parent, i.e. the total length available to the child |
BoxLength | resolvedPercentValue | If it was resolved to an actual pixel value, this is that value |
Returns
FlexBasis | PERCENT or CONTENT based on what it could resolve |
Exceptions
Exception |
- (FlexBasis)
ResolvePercentBasis(FlexboxBasis, ContentLength, out Nullable)
Takes a supplied FlexboxBasis in PERCENT mode, and the inner length of its parent (if known), and calculates the effective mode: if you provided a definite Parent Inner Length then it returns the resolved size in pixels, but if you provided an indefinite parent-inner-length then it fallsback to CONTENT mode (this is the default required by the CSS3 spec).
Parameters
FlexboxBasis | basis | flex-basis to evaluate |
ContentLength | parentContainerMainInnerLength | the INNER CONTENT length of the parent, i.e. the total length available to the child |
Nullable<Single> | resolvedPercentValue | If it was resolved to an actual pixel value, this is that value |
Returns
FlexBasis | PERCENT or CONTENT based on what it could resolve |
Exceptions
Exception |
- (String) ToString()
Returns
String |