-
Notifications
You must be signed in to change notification settings - Fork 36
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
Advanced options #48
Comments
Can you tell me more about how you use it? To be completely honest, I rarely use my own tools for anything (I've been stuck in legacy code for much of my career). I'd love to hear your thoughts on how we can improve this for the PostCSS version. |
@FranzSkuffka ping. Teach me your ways. :P |
I did not forget you :* got this in my wunderlist. What I can say for now is that I have used typographic in two live projects successfully: http://ufo-eberbach.de/ The latter uses uppercase type for I want to thank you for this awesome tool! I actually am practicing design through code in an efficient way (the second site took me 7 hours with no framework code) and typographic is essential for this. The current draft of my paper is very drafty but you're more than welcome to take a look! |
Wow your sites look great! I'm glad typographic helped you. I was never a fan of my implementation of vertical rhythm so I never really used typographic after I made it. It's a lot of bullshit guess/check math. I'm going to completely revisit the technique behind our vertical rhythm with the rewrite. Once I have that, I'll tweak the settings a billion times in real world usage until it's as smooth as butter. The next version should be bulletproof and awesome. I'll actually use the next version. I see what you're saying about the uppercase/letter-spacing thing (I did it on http://stylus-lang.com) but I'm not aware of any mathematical principle on which to space letters out. I always just do it til it kinda looks right. Lemme know if you know of a formula and I'll see about adding it to the next version. I wish I went to college for CSS. :D Looks kinda fun. |
Pretty sure the spacing is, like for line-height font-specific and thus not solvable through a formula if you do not add metadata to the fonts. I was hoping to set a variable and then use a mixin provided. I was kind of skeptic about your vertical-rhythm implementation but it still worked out :) Thanks for the comments on design! If you add enough whitespace, I reckon, everything starts looking smooth. |
BTW standard CSS looks interesting. That badge idea really caught me :D:D Are you planning to incorporate SUIT / Title CSS or ? Or is it just a styleguide? |
Yeah I'm gonna redo the modular scale. I think I screwed that up too. =) In fact, I screwed this whole thing up. The next version will actually be correct. 👍 It will just be a styleguide/linter but we can't implement it until stylelint gets some functional editor plugins. Who knows how long that will take? Months? Years? |
Let me know when you are starting on postcss-typographic. Have you decided on the JS flavor yet? (please say coffeescript :D) |
Re: letter-spacing Forgot we're having a convo about it over here: #43 |
How do you expect text-transform to work? How could Typographic make it simpler than: h6 {
text-transform: uppercase;
} ? |
When applying this transformation, I also want it to respect a variable which is, let's say whereas |
Hm. All this letter spacing stuff makes me worry it might be font-specific? |
yes. I think there are no CSS hacks in place for finding out which font is actually used by the browser. Which means adding metadata is pretty useless. It follows that setting letter-spacing or tracking is up to the developer leveraging this library. He needs to decide which values are most suitable for his font stack. |
I don't think we can write a reliable font family fetcher in anything other than JS. Even if we fetched font families with PostCSS in a clever way, we wouldn't know what font the end user was getting in the stack. Like, letter-spacing might be different for That said, there is such a unit as an |
I had to test this out for myself. http://codepen.io/franzskuffka/pen/gPErev You, sir, are completely right. I am pretty sure using x-height is the right way to go. |
It kinda makes you wonder why anyone would ever use anything other than x-height for any sizing (since all sizing is "supposed to be based on content")... |
We're stupid. 1em == 2ex. |
I disagree. If you look at my pen: You can observe, that while em is constant for every font, ex is actually different. 1em is roughly 2 ext, but not exactly. |
@FranzSkuffka I can't figure it out. I'm drunk and I hate Jade |
Anyway, 1em !== 2ex, but it's pretty close. 1em is actually probably better to scale off of because it's the size of a uppercase char whereas 2ex is just the size of the x-height * 2. |
All that matters are the red boxes. You observe see that the ex-positioned boxes are shifted in relation to each other whereas the em-positioned are not. Follows that ex is actually different per font and em is not. |
Ah I see what you're saying. So 1em just === 16px?! It doesn't === the height of an uppercase character of the font?!?! The scandal! |
Yes exactly. It's just a reference to the parent element's font size basically. |
Welcome to teh webz. |
BTW that's exactly what I imagine my future as frontend engineer. monday, 6AM, drunk, lurking github 👍 |
|
Ah crap it's 6am and I'm drunk lurking github... wtf is wrong with me? I think yesterday was Valentines day or something too.. |
Nothing. people suck |
Yeah I figured just because somewhere someone wrote something nice about typography I doesn't mean the browser devs adhere to it. |
In fact, I think if we don't change anything, |
Whereas 2ex could be anything just depending on where the x-height was (could be any random place depending on just how screwy the font in question is). |
So I think em's are probably the best thing to size off of. And to that point, 1rem === html default font size (which is usually 16px). So rather than getting font sizes unset with em's inheritance crap-assery, we can scale in rems for true ultimate power. http://codepen.io/corysimmons/pen/obVxJW?editors=1100 (vertical rhythm in like 3 drunk hours or 10 sober minutes) |
I honestly have no idea what 1em really is. Not the height of an uppercase letter though. I think they have nothing to do with anything. ex seems legit though |
I gotta write this paper now though. I shalt replace my presence with another German. |
Nevermind, I think you're right. 1em doesn't have crap to do with the font face. It just grabs whatever font size it can inherit and applies that. So if The interesting part is that font-size 16px doesn't mean anything. The 16px doesn't mean the height of the tallest glyph, or the width of the widest glyph, or anything useful or meaningful. It just means "Meh. 16px'ish. Who knows?" I've been googling for a while now and no one (not even the w3c) will straight up say wtf the size in In fact, w3cschools has no idea, MDN has no idea (and flat out gets some stuff wrong), and w3c doesn't specify so I'm assuming they have no idea. Yay.
https://drafts.csswg.org/css-fonts-3/#propdef-font-size Nevermind, can't use font-adjust because browser support and can't even |
Yeah font-size is something bounding-box-ish. And I just figured that ex behaves just like rem. So no calculation PITA.
|
That's a huge gotcha and I don't want to make this reliant on a polyfill or anything. |
This could be optional. In addition to that, fonts of similar character have almost identical x-height. The font stacks in place should be fairly consistent. |
I'd rather not for this next version anyway. Adding things like that leads down a dark and complicated path for very little payoff. |
okay 😢 |
I'll definitely work on some nice tracking stuff tho (probably with |
Bonus:
|
I wish I was on the IE team. You could just sit around all day and goof off. "Eh, 1/2 an em is close enough." |
kek They are not even trying. |
I really have no idea why anyone specifically develops for it anymore. They obviously don't care so why do we? |
$$$ makes sense for e-commerce and such. I read the following somewhere:
As long as they're tech savvy enough to spend money, it makes economic sense. |
touche |
In my personal experience, there are two options to a typographic set I adjust almost everytime, that are not included here yet.
Looking forward to any comments & thoughts on this.
The text was updated successfully, but these errors were encountered: