Last Updated on August 13, 2019
Filed under Shortcodes

Columns

Sweetness v1.x Only

The main Theme Layout is built using Bootstrap's 12 Column Grid; however, our internal columns uses a different format. Hint: After your last colum set, you should include the [clear] shortcode to "clear" any floats.

1/3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam tristique dignissim ante, at sagittis diam vestibulum nec. In hac habitasse platea dictumst.

[one_third][one_third]

1/3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam tristique dignissim ante, at sagittis diam vestibulum nec. In hac habitasse platea dictumst.

[one_third][one_third]

1/3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam tristique dignissim ante, at sagittis diam vestibulum nec. In hac habitasse platea dictumst.

[one_third last][one_third]

2/3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam tristique dignissim ante, at sagittis diam vestibulum nec. In hac habitasse platea dictumst. In hac habitasse platea dictumst. Nam tristique dignissim ante, at sagittis diam vestibulum nec. In hac habitasse platea dictumst. In hac habitasse platea dictumst.

[two_third][two_third]

1/3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam tristique dignissim ante, at sagittis diam vestibulum nec. In hac habitasse platea dictumst.

[one_third last][one_third]

1/4

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fourth][one_fourth]

1/4

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fourth][one_fourth]

1/4

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fourth][one_fourth]

1/4

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fourth last][one_fourth]

1/2

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_half][one_half]

1/4

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fourth][one_fourth]

1/4

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fourth last][one_fourth]

1/5

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fifth][one_fifth]

1/5

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fifth][one_fifth]

1/5

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fifth][one_fifth]

1/5

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fifth][one_fifth]

1/5

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_fifth last][one_fifth]

2/5

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[two_fifth][two_fifth]

3/5

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[three_fifth last][three_fifth]

1/6

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_sixth][one_sixth]

1/6

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_sixth][one_sixth]

1/6

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_sixth][one_sixth]

1/6

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_sixth][one_sixth]

1/6

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_sixth][one_sixth]

1/6

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[one_sixth last][one_sixth]

Bootstrap Columns

With v1.5.6 of Sweetness, we've incorporated Bootstraps columns within the shortcode API. The way it works is that a set of columns, called a row, must be wrapped in [row] shortcode. Then the inner columns are built using the [column] shortcode.

Basic syntax

[row]
[column size="1/2" stack="sm"]...[/column]
[column size="1/2" stack="sm"]...[/column]
[/row]

What is important is that the total number of columns must equal to 1. In the example above 1/2 + 1/2 equals one or 1/1.

In addition to the size option, stack represents when the columns will collapse based on the screen width. If you need a complex stack layout based on screen sizes, pull, push, etc, size can be omitted, in this case you would apply the grid classes to the class option for the [column] shortcode.

Row Options

Argument Default Description
equal_height false Makes all columns the same height of the tallest one. - true or false
class None Any additional CSS classes.

Column Options

Argument Default Description
size A fraction of 1 (whole). The combined columns of each row should equal to 1 otherwise excess columns will wrap to the next line.
Sizes: 1/6, 1/5, 2/5, 3/5, 4/5, 1/4, 2/4, 3/4, 1/3, 2/3, or 1/2
stack sm The viewport break when the columns should stack vertically - xs, sm, md, lg
class None Any additional CSS classes.