Unitless and percentage units for variables

it's needed for certain calculated styling features such as:

font-size: calc(var(--font-base-size) * var(--font-h1-size-mod));

where the base size is a rem and I'm looking to calculate different heading sizes based on one base size value to globally change font styles across the site quickly and consistently. Or if I wanted unitless line height.

  • Steve Clark
  • Jan 10 2024
  • Nathanael commented
    25 Apr 18:37

    I also want to use unitless variables to control the number of grid rows/columns in various contexts, etc.

  • Healthy Shark commented
    24 Jan 07:11

    it's needed for certain calculated styling features such as:

    font-size: calc(var(--font-base-size) * var(--font-h1-size-mod));

    where the base size is a rem and I'm looking to calculate different heading sizes based on one base size value to globally change font styles across the site quickly and consistently. Or if I wanted unitless line height.

  • Luz Wedgeworth commented
    18 Jan 13:39

    Yes!!!

  • Keywon Chung commented
    17 Jan 21:52

    Unitless is also needed to change z-index, etc.

  • Luz Wedgeworth commented
    16 Jan 13:14

    Yes!!

  • Keywon Chung commented
    16 Jan 00:54

    Yes we need the percentage unit in size variables! It's often used for sizing elements

  • Tanel Rebane commented
    13 Jan 15:59

    Yes please!!!

  • Tobias Vollprecht commented
    12 Jan 13:50

    Indeed - it is needed! By the way - in the interaction settings you can assign percentages to variables. Why not in the variables panel?

  • Ray Tri commented
    11 Jan 15:21

    This is extremely needed.