Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Opt out of modular scale #25

Open
csshugs opened this issue Feb 19, 2020 · 0 comments
Open

feat: Opt out of modular scale #25

csshugs opened this issue Feb 19, 2020 · 0 comments
Assignees
Labels
feature New feature
Milestone

Comments

@csshugs
Copy link
Owner

csshugs commented Feb 19, 2020

As the name of FluidMS suggests, it serves as a combination of fluid typography and Modular Scale. However, there might be projects that just don’t need/want the Modular Scale approach but still want fluid typography. So instead of deciding for one ratio value that determines the scale, maybe each entity of the scale needs to be determined individually.

I could imagine that the FluidMS settings will then look something like this:

$FLUIDMS-CONFIG: (
    min-font-size: 16px, // Still define a base font-size for small screen...
    max-font-size: 24px, // ...and for large screen.
    min-viewport: 480px,
    max-viewport: 1280px,
    ratio: false, // Disable the ratio.
    // Alter the default Sass list to a map, so we can assign
    // (rem-)values to the individual scale entities.
    scales: (
        6: 3rem,
        5: 2.5rem,
        4: 2rem,
        3: 1.7rem,
        2: 1.4rem,
        1: 1.2rem
        -1: 0.8rem,
        -2: 0.65rem,
        -3: 0.55rem,
    ),
) !default;

This way, we’d still have fluid typography, but we can define the font-sizes of the individual font-size scale entities individually (i.e. breaking the Modular Scale).

@csshugs csshugs added the feature New feature label Feb 19, 2020
@csshugs csshugs added this to the 0.3.0 milestone Feb 19, 2020
@csshugs csshugs self-assigned this Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant