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
  • Issues
  • #10357
Closed
Open
Issue created Sep 01, 2013 by Administrator@rootContributor

Using `.container` as a mixin is impossible

Created by: dminkovsky

I am trying to avoid semantically polluting my markup with Bootstrap's selectors. Rather than including Bootstrap's classes in my HTML, I would rather incorporate its rulesets in my own rulesets.

For example, say I've already got this HTML:

<div class="content"></div>

I want to make div#content a Boostrap .container. To that end, I wish that in my LESS I could simply do:

@import "variables.less";
@import "../boostrap/less/grid.less";
.content {
  .container;
}

However, this doesn't really make my .content DIV a .container because of the @media queries in grid.less that are beyond the initial .container ruleset. They don't get included in the resulting CSS for .content. Am I missing some way I could do this with LESS?

I've searched the issues list for this and the closest topic I found was "https://github.com/twbs/bootstrap/pull/10160". That PR doesn't seem to address this problem.

Assignee
Assign to
Time tracking