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
  • #17811
Closed
Open
Issue created Oct 08, 2015 by Administrator@rootContributor

Include a rem-calc() function in utilities

Created by: liquidvisual

I think Foundation handles this well, you enter in a pixel value (or multiple) and the output is in rem units.

Eg.

rem-calc(56) 

...or for shorthand properties:

rem-calc(56 56 56 10) 

I find this particularly helpful when editing values in the variables file. It's a lot easier to think in pixels but output in rems. Especially if you're working off a PSD.

Take this for example:

$font-size-h1: 2.5rem   

What is 2.5rem? It doesn't mean much to me. I need to run this through an online rem convertor before I can figure out what it actually is.

In my opinion, this is much easier to understand quickly:

$font-size-h1: rem-calc(40); // 2.5rem
Assignee
Assign to
Time tracking