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
  • !10055

optimized grid.less to saving a few KB in total

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/masterbee/optimized-grid into master Aug 23, 2013
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: masterbee

@mdo et al,

I took a few moments to optimize the code for the grid.less. The goal was to reduce the code bloat that was being generated by some of the current declarations, you are already using the "" selector for the box-model and other declarations in various CSS parts elsewhere, so I took advantage of the [class=] and [class^=] combo goodness ,along with some LESS looping fun to make this a bit easier to maintain.

Surprisingly, there was only approx. 1KB reduction from the current bootstrap.min.css but I wanted to submit it as a potential improvement since the smaller the better when it comes to mobile devices and their rather finicky network connection.

I am also thinking about venturing into making a quick grunt module for this project that will group and re-order the media-queries that is currently outputted. The idea is still optimization since there is a lot of duplication in terms of media queries throughout the CSS. I can safely assume that the regrouping and concat-ing of like media queries will reduce the current existing bloat due to their duplication, but wanted to check to if there is a want to do that. Let me know

PR for your review, let me know if you have any questions.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/masterbee/optimized-grid