Server : Apache System : Linux webm012.cluster129.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : eventfrsgx ( 61451) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/eventfrsgx/www/components/com_sppagebuilder/assets/less/mixins/ |
// Framework grid generation
//
// Used only by Bootstrap to generate the correct number of grid classes given
// any value of `@grid-columns`.
.make-grid-columns() {
// Common styles for all sizes of grid columns, widths 1-12
.sppb-col(@index) when (@index = 1) { // initial
@item: ~".sppb-col-xs-@{index}, .sppb-col-sm-@{index}, .sppb-col-md-@{index}, .sppb-col-lg-@{index}";
.sppb-col((@index + 1), @item);
}
.sppb-col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
@item: ~".sppb-col-xs-@{index}, .sppb-col-sm-@{index}, .sppb-col-md-@{index}, .sppb-col-lg-@{index}";
.sppb-col((@index + 1), ~"@{list}, @{item}");
}
.sppb-col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
}
.sppb-col(1); // kickstart it
}
.float-grid-columns(@class) {
.sppb-col(@index) when (@index = 1) { // initial
@item: ~".sppb-col-@{class}-@{index}";
.sppb-col((@index + 1), @item);
}
.sppb-col(@index, @list) when (@index =< @grid-columns) { // general
@item: ~".sppb-col-@{class}-@{index}";
.sppb-col((@index + 1), ~"@{list}, @{item}");
}
.sppb-col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
float: left;
}
}
.sppb-col(1); // kickstart it
}
.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
.sppb-col-@{class}-@{index} {
width: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
.sppb-col-@{class}-push-@{index} {
left: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
.sppb-col-@{class}-push-0 {
left: auto;
}
}
.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
.sppb-col-@{class}-pull-@{index} {
right: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
.sppb-col-@{class}-pull-0 {
right: auto;
}
}
.calc-grid-column(@index, @class, @type) when (@type = offset) {
.sppb-col-@{class}-offset-@{index} {
margin-left: percentage((@index / @grid-columns));
}
}
// Basic looping in LESS
.loop-grid-columns(@index, @class, @type) when (@index >= 0) {
.calc-grid-column(@index, @class, @type);
// next iteration
.loop-grid-columns((@index - 1), @class, @type);
}
// Create grid for specific class
.make-grid(@class) {
.float-grid-columns(@class);
.loop-grid-columns(@grid-columns, @class, width);
.loop-grid-columns(@grid-columns, @class, pull);
.loop-grid-columns(@grid-columns, @class, push);
.loop-grid-columns(@grid-columns, @class, offset);
}