Padding and margin



The Margin selectors are identical to the padding selectors. They only have the the indicator of -ma in their class names instead of -pa




Description

The Ueyen navigation bar allows creating a nav-bar with a set of items (linked buttons). The navigation can be set to change its alignment on the different breakpoint



Basic selectors

The following selectors class names can be used to add a padding to an element from small -s to huge -h.



un-pa

The same result as un-pa-m (Medium padding)

un-pa-s

Small padding - all sides.

un-pa-m

Medium padding - all sides

un-pa-l

Large padding - all sides

un-pa-h

Huge padding - all sides

un-pa-no

Removes the padding - all sides



Example of basic use

The following elements have small to huge padding

Markup

Small
Medium
Large
Huge


Small
Medium
Large
Huge


Padding and breakpoints

All the padding basic selectors can be followed by :s to :h (small to huge) to apply the padding in different breakpoints.



Small padding:
un-pa-s:s

Small padding on larger than Breakpoint Small

un-pa-s:m

Small padding on larger than Breakpoint Large.

un-pa-s:l

Small padding on larger than Breakpoint large.

un-pa-s:h

Small padding on larger than Breakpoint Huge.




Medium padding:
un-pa-m:s

Medium padding on larger than Breakpoint Small

un-pa-m:m

Medium padding on larger than Breakpoint Large.

un-pa-m:l

Medium padding on larger than Breakpoint large.

un-pa-m:h

Medium padding on larger than Breakpoint Huge.




Large padding:
un-pa-l:s

Large padding on larger than Breakpoint Small

un-pa-l:m

Large padding on larger than Breakpoint Large.

un-pa-l:l

Large padding on larger than Breakpoint large.

un-pa-l:h

Large padding on larger than Breakpoint Huge.




Huge padding:
un-pa-h:s

Huge padding on larger than Breakpoint Small

un-pa-h:m

Huge padding on larger than Breakpoint Large.

un-pa-h:l

Huge padding on larger than Breakpoint large.

un-pa-h:h

Huge padding on larger than Breakpoint Huge.



Example of using padding with brekpoints

The element has the class selectors of un-pa-s un-pa-l:s un-pa-h:h.


The result will be:

un-pa-s Small padding on screens smaller than the breakpoint small (default padding).

un-pa-l:s Large padding on screens larger than the breakpoint small.

un-pa-h:h Huge padding on screens larger than the breakpoint huge.



Markup

Padding & Breakpoints
Padding & Breakpoints


Directional padding

All the basic selectors for padding and margin can be used for a specific direction. See the following class selectors:



Top padding:
un-pa-top-s

Top-Small padding

un-pa-top-m

Top-Medium padding.

un-pa-top-l

Top-Large padding.

un-pa-top-h

Top-Huge padding.




Right padding:
un-pa-right-s

Right-Small padding

un-pa-right-m

Right-Medium padding.

un-pa-right-l

Right-Large padding.

un-pa-right-h

Right-Huge padding.




Bottom aligned:
un-pa-bottom-s

Bottom-Small padding

un-pa-bottom-m

Bottom-Medium padding.

un-pa-bottom-l

Bottom-Large padding.

un-pa-bottom-h

Bottom-Huge padding.




Left aligned:
un-pa-left-s

Left-Small padding

un-pa-left-m

Left-Medium padding.

un-pa-left-l

Left-Large padding.

un-pa-left-h

Left-Huge padding.





Example of using directional padding

The following elements have top to left padding:

Markup

Top Large
Right Medium
Bottom Huge
Left Large


Top Large
Right Medium
Bottom Huge
Left Large


Directional Padding and breakpoints

All the directional padding selectors can be followed by :s to :h (small to huge) to apply the directional padding in different breakpoints.



Some example selectors :
un-pa-left-s:s

Left Small padding on larger than Breakpoint Small

un-pa-top-l:m

Top Large padding on larger than Breakpoint Medium.

un-pa-bottom-h:l

Bottom Huge padding on larger than Breakpoint large.

un-pa-right-s:h

Right Small padding on larger than Breakpoint Huge.





Padding for children

ALL the padding selectors described above can be applied to the children of the targetted element (including the padding-and-breakpoint selectors).



How to target the childre:

Simply add * after the padding indicator -pa



Some example selectors:
un-pa*

Padding on all the children elements, on all-directions.

un-pa*-top

Top padding on all the children elements, on all-directions.

un-pa*-bottom-h

Bottom Huge padding on all the children elements

un-pa*-right-s:h

Right Small padding on all the children elements, larger than Breakpoint Huge.



Example of padding for children

The following elements are all having a large padding, simply by giving the class name of un-pa*-l to their parent element:

Markup

Children element
Children element
Children element
Children element
Children element
Children element




In this example, the Margin is also used. Note that, margin selectors are exactly the same as padding selectors, only with -ma indicator, instead of -pa


Children element
Children element
Children element
Children element
Children element
Children element