Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

column-offset function #525

Description

@xaddict

I'm looking for an easy way to calculate just the offset of a column (think of bootstrap's col-sm-offset-3).

column-width(3/12) + column-gutter(1/12) would be an easy way to calculate this but both of those functions return a string.

To get rid of the string I need the following code:
$offset3: to-number(str-slice(column-width(3/12), 0, -2)) + $gutter + unquote("%");

where to-number is an annoying helper function just to get the percentage string to be recognised as a float.

Is there any way column-width and column-gutter can be modified to only return a float?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions