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

Add scalable font size import #479

Open
argyleink opened this issue Mar 7, 2024 · 2 comments
Open

Add scalable font size import #479

argyleink opened this issue Mar 7, 2024 · 2 comments
Labels
enhancement New feature or request to be explored

Comments

@argyleink
Copy link
Owner

prototype / demo https://codepen.io/argyleink/pen/Yzgbgzm

@layer demo {
  .scaleable {
    h1, h2, h3, h4 {
      font-size: calc(1rem * pow(var(--scale, 1.4), var(--heading-scale)));
    }
    
    h1 { --heading-scale: 4 }
    h2 { --heading-scale: 3 }
    h3 { --heading-scale: 2 }
    h4 { --heading-scale: 1 }
  }
}
@argyleink argyleink added enhancement New feature or request to be explored labels Mar 7, 2024
@Brian-Pob
Copy link
Contributor

I like the idea. Where would this be added? In Normalize? As a prop-pack?

@argyleink
Copy link
Owner Author

yeah, prop pack, as an alternative set to the relative font sizes 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request to be explored
Projects
None yet
Development

No branches or pull requests

2 participants