Styling: ResponsiveSpacing
Oracle® JavaScript Extension Toolkit (JET)
18.1.0
G25382-01
Description
Responsive Spacing Style classes
-
Category: margin with multiplier by screen size
-
Add some margin with a multiplier to an element based upon a certain screen size.
- oj-sm-only* applies only to a small screen.
- oj-md-only* applies only to a medium screen.
- oj-lg-only* applies only to a large screen.
In Redwood these classes use the !important rule.
Here are some examples:oj-md-only-margin-2x: two unit of margin on all sides on a medium width screen.oj-md-only-margin-4x-top: four units of margin on the top on on a medium width screen.oj-lg-only-margin-1x-start: one unit of margin on the start side on a large width screen
Class template:
-
.oj-
[size-only]-margin-[multiplier](-edge)Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
[size-only]Value (required) Name Description sm-onlySmall Small screen size range only md-onlyMedium Medium screen size range only lg-onlyLarge Large screen size range only Values for
[multiplier]Value (required) Name Description 00 zero(no) unit of spacing 1x1x Single unit of spacing 2x2x Two times the single unit of spacing 3x3x Three times the single unit of spacing 4x4x Four times the single unit of spacing 5x5x Five times the 1x unit of spacing 6x6x Six times the 1x unit of spacing 7x7x Seven times the 1x unit of spacing 8x8x Eight times the 1x unit of spacing 9x9x Nine times the 1x unit of spacing 10x10x Ten times the 1x unit of spacing 11x11x Eleven times the 1x unit of spacing 12x12x Tweleve times the 1x unit of spacing Values for
(-edge)Value (optional) Name Description -startStart Applies to start edge (left edge in ltr mode, right edge in rtl mode) -endEnd Applies to end edge (right edge in ltr mode, left edge in rtl mode) -topTop Applies to top edge -bottomBottom Applies to bottom edge -horizontalHorizontal Applies to start and end edges -verticalVertical Applies to top and and bottom edges
Example
<div class="oj-md-only-margin-2x-vertical oj-lg-only-margin-3x-vertical"> <!-- content --> </div> -
Category: Padding with multiplier by screen size
-
Add some padding with a multiplier to an element based upon a certain screen size.
- oj-sm-only* applies only to a small screen.
- oj-md-only* applies only to a medium screen.
- oj-lg-only* applies only to a large screen.
In Redwood these classes use the !important rule.
Here are some examples:oj-md-only-padding-2x: two unit of padding on all sides on a medium width screen.oj-md-only-padding-4x-top: four units of padding on the top on on a medium width screen.oj-lg-only-padding-1x-start: one unit of padding on the start sideon a large width screen
Class template:
-
.oj-
[size-only]-padding-[multiplier](-edge)Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
[size-only]Value (required) Name Description sm-onlySmall Small screen size range only md-onlyMedium Medium screen size range only lg-onlyLarge Large screen size range only Values for
[multiplier]Value (required) Name Description 00 zero(no) unit of spacing 1x1x Single unit of spacing 2x2x Two times the single unit of spacing 3x3x Three times the single unit of spacing 4x4x Four times the single unit of spacing 5x5x Five times the 1x unit of spacing 6x6x Six times the 1x unit of spacing 7x7x Seven times the 1x unit of spacing 8x8x Eight times the 1x unit of spacing 9x9x Nine times the 1x unit of spacing 10x10x Ten times the 1x unit of spacing 11x11x Eleven times the 1x unit of spacing 12x12x Tweleve times the 1x unit of spacing Values for
(-edge)Value (optional) Name Description -startStart Applies to start edge (left edge in ltr mode, right edge in rtl mode) -endEnd Applies to end edge (right edge in ltr mode, left edge in rtl mode) -topTop Applies to top edge -bottomBottom Applies to bottom edge -horizontalHorizontal Applies to start and end edges -verticalVertical Applies to top and and bottom edges
Example
<div class="oj-md-only-padding-2x-vertical oj-lg-only-padding-3x-vertical"> <!-- content --> </div> -
Category: margin with multiplier by minimum screen size
-
Add some margin with a multiplier to an element based upon a minimum screen size.
- oj-sm-* applies to small width and up screens.
- oj-md-* applies to medium width and up screens.
- oj-lg-* applies to large width and up screens.
- oj-xl-* applies to extra large screens only.
Here are some examples:oj-md-margin-2x: two unit of margin on all sides on medium width and wider screensoj-md-margin-4x-top: four units of margin on the top on medium width and wider screensoj-lg-margin-1x-start: one unit of margin on the start side on large width and wider screens
Class template:
-
.oj-
[size]-margin-[multiplier](-edge)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
[multiplier]Value (required) Name Description 00 zero(no) unit of spacing 1x1x Single unit of spacing 2x2x Two times the single unit of spacing 3x3x Three times the single unit of spacing 4x4x Four times the single unit of spacing 5x5x Five times the 1x unit of spacing 6x6x Six times the 1x unit of spacing 7x7x Seven times the 1x unit of spacing 8x8x Eight times the 1x unit of spacing 9x9x Nine times the 1x unit of spacing 10x10x Ten times the 1x unit of spacing 11x11x Eleven times the 1x unit of spacing 12x12x Tweleve times the 1x unit of spacing Values for
(-edge)Value (optional) Name Description -startStart Applies to start edge (left edge in ltr mode, right edge in rtl mode) -endEnd Applies to end edge (right edge in ltr mode, left edge in rtl mode) -topTop Applies to top edge -bottomBottom Applies to bottom edge -horizontalHorizontal Applies to start and end edges -verticalVertical Applies to top and and bottom edges
Example
<div class="oj-md-margin-2x-vertical oj-lg-margin-3x-vertical"> <!-- content --> </div> -
Category: Padding with multiplier by minimum screen size
-
Add some padding with a multiplier to an element based upon a minimum screen size.
- oj-sm-* applies to small width and up screens.
- oj-md-* applies to medium width and up screens.
- oj-lg-* applies to large width and up screens.
- oj-xl-* applies to extra large screens only.
Here are some examples:oj-md-padding-2x: two unit of padding on all sides on medium width and wider screensoj-md-padding-4x-top: four units of padding on the top on medium width and wider screensoj-lg-padding-1x-start: one unit of padding on the start side on large width and wider screens
Class template:
-
.oj-
[size]-padding-[multiplier](-edge)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
[multiplier]Value (required) Name Description 00 zero(no) unit of spacing 1x1x Single unit of spacing 2x2x Two times the single unit of spacing 3x3x Three times the single unit of spacing 4x4x Four times the single unit of spacing 5x5x Five times the 1x unit of spacing 6x6x Six times the 1x unit of spacing 7x7x Seven times the 1x unit of spacing 8x8x Eight times the 1x unit of spacing 9x9x Nine times the 1x unit of spacing 10x10x Ten times the 1x unit of spacing 11x11x Eleven times the 1x unit of spacing 12x12x Tweleve times the 1x unit of spacing Values for
(-edge)Value (optional) Name Description -startStart Applies to start edge (left edge in ltr mode, right edge in rtl mode) -endEnd Applies to end edge (right edge in ltr mode, left edge in rtl mode) -topTop Applies to top edge -bottomBottom Applies to bottom edge -horizontalHorizontal Applies to start and end edges -verticalVertical Applies to top and and bottom edges
Example
<div class="oj-md-padding-2x-vertical oj-lg-padding-3x-vertical"> <!-- content --> </div> -
Category: Margin
-
Add some margin
Class template:
-
.oj-margin
(-edge)Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
(-edge)Value (optional) Name Description -startStart Applies to start edge (left edge in ltr mode, right edge in rtl mode) -endEnd Applies to end edge (right edge in ltr mode, left edge in rtl mode) -topTop Applies to top edge -bottomBottom Applies to bottom edge -horizontalHorizontal Applies to start and end edges -verticalVertical Applies to top and and bottom edges
Deprecated:
Since Description 4.0.0use the 2x responsive margin classes instead, meaning oj-sm-margin-2x(-edge) -
-
Category: Margin
-
Add some margin
Class template:
-
.oj-margin-lg
(-edge)Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
(-edge)Value (optional) Name Description -startStart Applies to start edge (left edge in ltr mode, right edge in rtl mode) -endEnd Applies to end edge (right edge in ltr mode, left edge in rtl mode) -topTop Applies to top edge -bottomBottom Applies to bottom edge -horizontalHorizontal Applies to start and end edges -verticalVertical Applies to top and and bottom edges
Deprecated:
Since Description 4.0.0use the 4x responsive margin classes instead, meaning oj-sm-margin-4x(-edge) -
-
Category: Padding
-
Add some padding
Class template:
-
.oj-padding
(-edge)Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
(-edge)Value (optional) Name Description -startStart Applies to start edge (left edge in ltr mode, right edge in rtl mode) -endEnd Applies to end edge (right edge in ltr mode, left edge in rtl mode) -topTop Applies to top edge -bottomBottom Applies to bottom edge -horizontalHorizontal Applies to start and end edges -verticalVertical Applies to top and and bottom edges
Deprecated:
Since Description 4.0.0use the 2x responsive padding classes instead, meaning oj-sm-padding-2x(-edge) -
-
Category: Padding
-
Add some padding
Class template:
-
.oj-padding-lg
(-edge)Note: Square brackets signify required token substitutions whereas parentheses signify optional token substitutions.
-
Values for
(-edge)Value (optional) Name Description -startStart Applies to start edge (left edge in ltr mode, right edge in rtl mode) -endEnd Applies to end edge (right edge in ltr mode, left edge in rtl mode) -topTop Applies to top edge -bottomBottom Applies to bottom edge -horizontalHorizontal Applies to start and end edges -verticalVertical Applies to top and and bottom edges
Deprecated:
Since Description 4.0.0use the 4x responsive padding classes instead, meaning oj-sm-padding-4x(-edge) -