Skip to content

Use with postcss-modular-scale #6

@strarsis

Description

@strarsis

Quite often vertical-rhythm + modular-scale (postcss-modular-scale) is combined.

How can this be combined?
When this vertical rhythm processor uses the parent font-size as base for the rhythm,
will it also correctly switch between rhythms when the parent font-size changes by mediaquery?
I guess px-to-rem or px-to-em (with different parent font sizes) is necessary in that case to allow proper nesting?

:root {
  --ms-bases: 1, 0.75;
  --ms-ratios: 2;
}

.header {
  font-size: ms(4)rem;
}

In the example above taken from the postcss-modular-scale docs,
there would be a parent with base font-size, but not globally as not the html or body element is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions