Comments (4)
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.
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.
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.
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)
- Using em instead rem HOT 11
- something is odd here HOT 4
- NPM Package? HOT 2
- Create a Stylus port
- Create a Less port
- Rewrite $step3 on sgl-heading mixins ? HOT 7
- Use !default in your variables _config.scss HOT 6
- dart-sass: deprecation warning: !global assignments won't be able to declare new variables HOT 3
- Default export HOT 7
- Error: Invalid null operation: "null times 2.36859" HOT 11
- npm publish HOT 3
- Don't append unit HOT 3
- Use pow() when available
- Consider constant naming conventions HOT 2
- Consider using SassDoc HOT 12
- use less generic functions names HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sassy-gridlover.