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

Move styles out of make-col-ready, in favour of make-row

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/lunelson/feature/col-inherit into v4-dev Jan 29, 2018
  • Overview 0
  • Commits 2
  • Pipelines 0
  • Changes 3

Created by: lunelson

Since .col- elements are required to be direct children of .row elements, the styles in the make-col-ready mixin can be more simply and efficiently applied (bytes saved), and IMO be more in keeping with the dynamics of flexbox (i.e. container > item structure), if they are applied as part of the make-row mixin using a direct-child universal selector.

As a further optimisation, I suggest removing position: relative and adding explicit flex values, since flex-item defaults are not cross-browser consistent. Also, an alternative way of writing the direct-child selector, rather than using the universal selector, would be .col, [class^="col-"], [class*=" col-"]; this might be preferable for clarity, but I'm not sure if it creates the possibility of a specificity conflict. With the universal selector, the .col classes breakpoint- and variant-specific styles clearly override the ones they inherit by being direct-children of .row

EDITS:

  • restored the make-col-ready mixin with comment to the effect of deprecation, in order to not break dependent code
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/lunelson/feature/col-inherit