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
  • #18137
Closed
Open
Issue created Nov 03, 2015 by Administrator@rootContributor

Responsive heading sizes

Created by: bjorn-ali-goransson

Okay, this one's seriously useful: Pleasant heading sizes in all devices (the H1 is a little too H1 on a mobile)

(10% smaller headings in each mode, except for xs, which is 20% smaller than sm)

.responsive-headings(@tag-name){
  @selector: ~"@{tag-name}, .@{tag-name}";
  @size-variable: ~"font-size-@{tag-name}";

  @{selector} {
    font-size: @@size-variable * 0.6;
  }

  @media (min-width: @screen-sm-min) {
    @{selector} {
      font-size: @@size-variable * 0.8;
    }
  }
  @media (min-width: @screen-md-min) {
    @{selector} {
      font-size: @@size-variable * 0.9;
    }
  }
  @media (min-width: @screen-lg-min) {
    @{selector} {
      font-size: @@size-variable;
    }
  }
}

.responsive-headings(h1);
.responsive-headings(h2);
.responsive-headings(h3);
.responsive-headings(h4);
.responsive-headings(h5);
.responsive-headings(h6);
Assignee
Assign to
Time tracking