Skip to content

Mixing percentual and pixel values in $container-max-widths #28399

@mspae

Description

@mspae

Given this variable override value:

$container-max-widths: map-merge(
  (
    sm: 100%,
    md: 90%,
    lg: 90%,
    xl: 1440px,
  ),
  $container-max-widths
);

The _assert-ascending function fails because px and percent values are not comparable.

Maps which only contain percentages work, because of this fix #26689 – However this does not work if the map contains both types.

I believe this is a valid (and common) use case: There should be a maximum size for the container from a certain viewport width onward, before then the container should be flexible.

Conversely it could be possible that the container should turn into a percentual width from a certain viewport width onward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions