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

Get 2nd next #4

Open
vwasteels opened this issue Jan 11, 2022 · 0 comments
Open

Get 2nd next #4

vwasteels opened this issue Jan 11, 2022 · 0 comments

Comments

@vwasteels
Copy link

Hello, I'm wondering if there is a way to get the second next on the list, example :

$scales: (
  small: 14px,
  normal: 18px, 
  large: 22px,
  xlarge: 26px,
  xxlarge: 40px,
);

@include blockContent($baseSize: normal) {
  font-size: map-get($scales, $baseSize);

  h1 {
    font-size: map-get-next($scales, $baseSize);
  }

  h2 {
    font-size: map-get-next($scales, $baseSize, 2); // <-- this one 
  }
}

// USAGE 
.someText {
  @include blockContent(small);
}
.someOtherText {
  @include blockContent(large);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant