GithubHelp home page GithubHelp logo

Line Heights with Ems about sassy-gridlover HOT 4 CLOSED

hiulit avatar hiulit commented on May 29, 2024
Line Heights with Ems

from sassy-gridlover.

Comments (4)

ChrisSargent avatar ChrisSargent commented on May 29, 2024

Also - is there any quick way to tighten up the line heights on some headings? Or should it be overwritten in the SASS?

Chris

from sassy-gridlover.

hiulit avatar hiulit commented on May 29, 2024

Hi there @ChrisSargent

First of all, I'm glad you like it :)
And yes, you are right. When using em the layout goes slightly off the grid :(

First I thought it was because of the decimal precision. I did a little research on the subject and I found this issue sass/sass#1122.

By default, Sass has a decimal precision of 5 (and it seems that it's not gonna change any time soon) and the Gridlover app uses a decimal precision of 16, so I thought this might be it.

But then I realized that what the Gridlover app actually does is to ceil() the decimals when using em (or at least in some cases, I don't know exactly).
So, instead of outputting 1.2222222222222222em, they output 1.2222222222222223em.
That's what does the trick, I think.

I borrowed some functions from @terkel https://gist.github.com/terkel/4373420 to help with this matter and I think I got it working.

I'll release a new version with these changes and I would really love to hear your feedback!

P.S. Speaking of the debug mode. Maybe I wasn't clear enough or maybe it should be done differently, but right now it must be declared in your _variables.scss or _config.scss or the like in order to work. Basically, it must be declared before the @import "sassy-gridlover".
Do you think it could be implemented in another way? Maybe with a mixin?

P.P.S. I'm afraid there's no easy way to do what you want with the line heights. This project is essentially a 'Sass port' of the Gridlover app and they don't provide this kind of functionality.
You could try playing with the default line-height and scale-factor and see if you get something more to your liking. But apart from that, I think it's best if you just override them yourself.

from sassy-gridlover.

hiulit avatar hiulit commented on May 29, 2024

Hey @ChrisSargent

I've just released a new version https://github.com/hiulit/Sassy-Gridlover/releases/tag/v3.1.1 with some changes regarding this issue ;)

from sassy-gridlover.

ChrisSargent avatar ChrisSargent commented on May 29, 2024

Awesome, I'll try to update asap but it'll probably be a day or two.

Chris

On 14 Jul 2016, at 15:48, hiulit [email protected] wrote:

Hey @ChrisSargent

I've just released a new version https://github.com/hiulit/Sassy-Gridlover/releases/tag/v3.1.1 with some changes regarding this issue ;)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

from sassy-gridlover.

Related Issues (17)

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.