Frage

In Bootstrap 3 I am able to do the follow (for semantic markup):

.div1 {
    .make-xs-column(12);
}
.div2 {
    .make-xs-column(12);
}

Example HTML:

<div class="div1">
    <!-- Stuff Goes Here -->
</div>
<div class="div2">
    <!-- More Stuff Goes Here -->
</div>

Within inline class definitions I can change the order of div1 and div2 by doing:

<div class="div1 col-xs-push-12">
</div>
<div class="div2 col-xs-pull-12">
</div>

Is it possible to change the column ordering with LESS mixins? Or is this feature not currently available? Would it be good practice to do something like this?:

.div1 {
    .make-xs-column(12);
    .col-sm-push-12;
}
.div2 {
    .make-xs-column(12);
    .col-sm-pull-12;
}

Edited: I meant to ask about xs columns rather than sm. Should I do pull and push on sm+ devices and reverse the order of my markup?

War es hilfreich?

Lösung

It is the same story as with .make-*-column(), i.e. there're .make-*-column-offset .make-*-column-push and .make-*-column-pull mixins.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top