Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !24915

Add order-last grid class

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/cahbb/order-last-class into v4-dev Nov 29, 2017
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 2

Created by: cahbb

This PR adds a new .order-last grid class.

It does the exact opposite thing of .order-first. It reorders the target element to be the last using order: $columns + 1;

<div class="container">
  <div class="row">
    <div class="col order-sm-last">
      First by default, but last on sm
    </div>
    <div class="col">
      Second by default, and still second on sm
    </div>
    <div class="col order-sm-first">
      Last by default, but first on sm
    </div>
  </div>
</div>

This gives the user a more intuitive way of understanding how the columns are ordered. Saying "I want this to be the last child on sm" and not begin to figure out how many columns you have in your grid and so on. The child is going to be what you say - the last child.

As it is now you would use the class .order-sm-12 instead of .order-sm-last in the above example.

🚀 💪

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/cahbb/order-last-class