Giter Site home page Giter Site logo

royalfig / fluid-typography-calculator Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 3.0 2.37 MB

A fluid typography calculator. Determine the CSS clamp property given limits for font size and viewport width.

Home Page: https://royalfig.github.io/fluid-typography-calculator/

HTML 76.30% JavaScript 18.14% CSS 5.56%
fluid-typography viewport calculator rem font

fluid-typography-calculator's People

Contributors

royalfig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fluid-typography-calculator's Issues

calculation with rem and container query units

It would be better if the font size was calculated using a linear function in my opinion.
For example:
If the width of the container is 14rem then the font size should be 1rem. If the container is 60rem wide, then the font size should be 1.25rem.
Then you could calculate a linear function using the two points (14/1) and (60/1.25) and the font size should then change depending on the width of the container and the font size set by the user in the browser.
What do you say to this?

e.g.

p {
font-size: calc((100cqi/280) + 17px) / 16 * 1rem;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.