Styling: FlexLayout
Oracle® JavaScript Extension Toolkit (JET)
9.1.0
F30737-01
- Version:
- 9.1.0
-
.oj-flex-items-pad
-
Place the pad class on a container or its parent to add child padding.
Deprecated:
Since Description 8.0.0Use appropriate padding classes instead. Example
<div class="oj-flex oj-flex-items-pad"> <div class="oj-flex-item">a</div> <div class="oj-flex-item">b</div> </div> -
.oj-flex
-
The class
oj-flexcan be used for a flexbox based layout.
The oj-flex class is different from a default flexbox in the following ways:- the
flex-wrapproperty is set to 'wrap' - the flex property on the children has been set to auto, one of the common flex values
Example
<div class="oj-flex"> <div class="oj-flex-item">a</div> <div class="oj-flex-item">b</div> </div> - the
-
.oj-flex-item
-
The class oj-flex-item, child of oj-flex.
Example
<div class="oj-flex"> <div class="oj-flex-item">a</div> <div class="oj-flex-item">b</div> </div> -
Category: Flex Direction
-
Responsive classes to set the flex-direction property. In Redwood these classes use the CSS !important property to override classes with higher specificity.
NOTE: IE 11 can have issues when setting the flex-direction property to column in combination with other properties.
For example if the children's flex property is also set to 1 the layout completely breaks on IE.
This is a browser bug you will need to work around, so make sure to test on IE 11 if it's a browser you need to support.
Class template:
-
.oj-
[size](-only)-flex-direction-columnNote: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
[size]Value (required) Name Description smSmall Small screen size range mdMedium Medium screen size range lgLarge Large screen size range xlX-Large Extra large screen size and up Values for
(-only)Value (optional) Name Description -onlyonly Applied to only specified screen size.
Example
<div class="oj-flex oj-sm-flex-direction-column"> <div class="oj-flex-item">a</div> <div class="oj-flex-item">b</div> </div> -
-
Category: Flex
-
Overrides the children's flex property to 1 or 'initial'. 'initial' is one of the common flex values
.NOTE: There is a known webkit bug when using flex: 1 or 0. To work around this you must create a custom class and set the flex-basis to whatever min-width you are using.
Class template:
-
.oj-
[size](-only)-flex-items-[flex]Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
[size]Value (required) Name Description smSmall Small screen size range mdMedium Medium screen size range lgLarge Large screen size range xlX-Large Extra large screen size and up Values for
(-only)Value (optional) Name Description -onlyonly Applied to only specified screen size. Values for
[flex]Value (required) Name Description 0Flex 0 Sizes the item according to the width/height properties, but makes the flex item fully inflexible. 1Flex 1 Sizes the item based on the width/height properties, but makes them fully flexible initialinitial This is the initial value. Sizes the item based on the width/height properties and will size the flex item based on its contents.
Example
<div class="oj-flex oj-sm-flex-items-1"> <div class="oj-flex-item">a</div> <div class="oj-flex-item">b</div> </div> -
-
Category: Flex Item Align Self
-
Responsive classes to set the align-self property. In Redwood these classes use the CSS !important property to override classes with higher specificity.
Class template:
-
.oj-
[size](-only)-align-self(-flexalignself)Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
[size]Value (required) Name Description smSmall Small screen size range mdMedium Medium screen size range lgLarge Large screen size range xlX-Large Extra large screen size and up Values for
(-only)Value (optional) Name Description -onlyonly Applied to only specified screen size. Values for
(-flexalignself)Value (optional) Name Description -flex-startFlex Start The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line. -flex-endFlex End The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line. -centerCenter The flex item’s margin box is centered in the cross axis within the line.
Example
<div class="oj-flex"> <div class="oj-flex-item oj-sm-align-self-center">a</div> <div class="oj-flex-item">b</div> </div> -
-
Category: Flex Justify Content
-
Responsive classes to set the justify-content property.In Redwood these classes use the CSS !important property to override classes with higher specificity.
Class template:
-
.oj-
[size](-only)-justify-content(-flexjustify)Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
[size]Value (required) Name Description smSmall Small screen size range mdMedium Medium screen size range lgLarge Large screen size range xlX-Large Extra large screen size and up Values for
(-only)Value (optional) Name Description -onlyonly Applied to only specified screen size. Values for
(-flexjustify)Value (optional) Name Description -flex-startFlex Start Items are at the start. -flex-endFlex End Items are at the end. -centerCenter Items are centered. -space-betweenSpace Between Space is distributed between items. -space-aroundSpace Around Space is distributed around items.
Example
<div class="oj-flex oj-sm-justify-content-center"> <div class="oj-flex-item">a</div> <div class="oj-flex-item">b</div> </div> -
-
Category: Flex Item Order
-
Responsive classes to set the order property. In Redwood these classes use the CSS !important property to override classes with higher specificity.
Because pages are expected to be designed mobile-first, there are no oj-sm-order classes,
rather the DOM order reflects the design for small screens and then the order classes are used on larger screens.
Class template:
-
.oj-
[size]-order-[0-5]Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
[size]Value (required) Name Description smSmall Small screen size range mdMedium Medium screen size range lgLarge Large screen size range xlX-Large Extra large screen size and up Values for
[0-5]Value (required) Name Description 00 0th place 11 1st place 22 2nd place 33 3rd place 44 4th place 55 5th place
Example
<div class="oj-flex"> <div class="oj-flex-item oj-md-order-1">a</div> <div class="oj-flex-item oj-md-order-2">b</div> </div> -
-
Category: Flex Item Align Items
-
Responsive classes to set the align-items property. In Redwood these classes use the CSS !important property to override classes with higher specificity.
Class template:
-
.oj-
[size](-only)-align-items(-flexalign)Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
[size]Value (required) Name Description smSmall Small screen size range mdMedium Medium screen size range lgLarge Large screen size range xlX-Large Extra large screen size and up Values for
(-only)Value (optional) Name Description -onlyonly Applied to only specified screen size. Values for
(-flexalign)Value (optional) Name Description -flex-startFlex Start Flex items are packed toward the start of the line. -flex-endFlex End Flex items are packed toward the end of the line. -centerCenter Flex items are packed toward the center of the line. -baselineBaseline All participating flex items on the line are aligned such that their baselines align
Example
<div class="oj-flex oj-sm-align-items-center"> <div class="oj-flex-item">a</div> <div class="oj-flex-item">b</div> </div> -
-
Category: Flex Item Flex
-
Overrides the element's flex property to 0, 1 or 'initial'. 'initial' is one of the common flex values). See note about a known webkit bug.
Class template:
-
.oj-
[size](-only)-flex-[flex]Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
[size]Value (required) Name Description smSmall Small screen size range mdMedium Medium screen size range lgLarge Large screen size range xlX-Large Extra large screen size and up Values for
(-only)Value (optional) Name Description -onlyonly Applied to only specified screen size. Values for
[flex]Value (required) Name Description 0Flex 0 Sizes the item according to the width/height properties, but makes the flex item fully inflexible. 1Flex 1 Sizes the item based on the width/height properties, but makes them fully flexible initialinitial This is the initial value. Sizes the item based on the width/height properties and will size the flex item based on its contents.
Example
<div class="oj-flex"> <div class="oj-flex-item oj-sm-flex-1">a</div> <div class="oj-flex-item">b</div> </div> -
-
Category: Flex Item Wrap
-
Responsive classes to set the flex-wrap property.
In Redwood these classes use the CSS !important property to override classes with higher specificity.Class template:
-
.oj-
[size](-only)-flex-wrap-nowrapNote: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
[size]Value (required) Name Description smSmall Small screen size range mdMedium Medium screen size range lgLarge Large screen size range xlX-Large Extra large screen size and up Values for
(-only)Value (optional) Name Description -onlyonly Applied to only specified screen size.
Example
<div class="oj-flex oj-sm-flex-wrap-nowrap"> <div class="oj-flex-item">a</div> <div class="oj-flex-item">b</div> </div> -