Closed cibulka closed 10 years ago
oh god, dont look at the code, lol, its still quite messy, - and I'm still figuring out what to include, I've been using it on a few projects to get my head around whats useful and frustrating and definitely want to extend it and document it more fully.
I have thought about and would like to add it as an option to the ktype() mixin. I was toying with a shift param that allows you to shift it by a px amount and then uses all the same rem conversion and fallback stuff I'm throwing around, which would be a single px value. Its not that its hard but it really is a by hand sort of technique that can go horribly wrong if implemented poorly. Its why I'm not really a fan of his current mixin and I think it needs a more careful implementation.
Its a great suggestion though in terms of adding more depth to knife a typographic tool and definitely worth adding to the TODO's.
Thanks for the feedback.
PS: if you'er up for the challenge feel free to contribute via pull requests etc.
Thanks for your reply! I'm very glad to hear that you plan to develop Knife further.
About "tedious baseline" - I completely agree that the technique is very "by hand" and fragile, although it seems to me, that it can still be serious enhancement for some more text-based designs. I will try to play with it myself and if I come up with something useful, I'm definitely letting you know!
Take care. :)
Hello Paul,
thanks for your work on Knife, it seems quite simple and very much to the point!
To my question: You reference Razvan Onofrei's article "Aligning type to baseline the right way" about forcing the type to align TO the grid baselines, not in the middle of them (as would be the default CSS behaviour). If I understand Knife's code correctly though, you don't implement that.
Are you planning to include "the right baseline"? Of course, it is quite tedious and fragile (layout would break if the font-family would be replaced with something of different cap height), but at the same time, quite desirable on text-centered designs.
I know this does not sit in your to-do list, but Razvan Onofrei provided simple mixin, that could be (I think) easily included to Knife. On some conditional variable (say
force-tedious-baseline: true
) maybe?Also, personally I would appreciate more documentation of mixins intended for "public" use with Knife - overview of parameters of
ktype
mixin etc. I can always check the code and see how well you made it :), but see the overview on readme is maybe a little more practical.Thanks again, P!