top | item 5478200 Em Baseline Generator 60 points| jbrooksuk | 13 years ago |joshnh.com | reply 28 comments order hn newest [+] [-] binarymax|13 years ago|reply This is very nice, but wondering if the em can be rounded a bit? I'm not sure there's much difference between 1.5238095238095237em; and 1.524em; [+] [-] joshnh|13 years ago|reply Good call, I've fixed that. load replies (1) [+] [-] Kiro|13 years ago|reply Why do I need to use em? I thought browsers handled things like zooming on their own nowadays. What's wrong with px? [+] [-] joshnh|13 years ago|reply Ems are more versatile. When increasing the size of all fonts at a particular breakpoint for instance. Instead of having to adjust each font-size property individually you can simply change the font-size of the root element. [+] [-] arianvanp|13 years ago|reply With em you define a base font-size in px. And then you express multiples of the base in em, instead of multiplying manually load replies (1) [+] [-] pasiaj|13 years ago|reply Excellent! You should also checkout http://www.gridlover.net/ [+] [-] exceptione|13 years ago|reply The letters are hanging in the air, i think a good demonstration would show the baseline of the letters to coincide with the line pattern!http://upload.wikimedia.org/wikipedia/commons/3/39/Typograph... [+] [-] joshnh|13 years ago|reply Hi, creator here. Unfortunately that's not how CSS works. See here for more information: http://joshnh.com/2012/10/12/how-does-line-height-actually-w... load replies (1) [+] [-] cooop|13 years ago|reply > The letters are hanging in the air, i think a good demonstration would show the baseline of the letters to coincide with the line pattern!Why?Like OP has demonstrated, this isn't how CSS works.To do so because this is how things are done in print is backwards.You could argue letters sitting on their baseline feels nicer to you, though I'd argue this was form over function.Nice work, OP. load replies (1) [+] [-] ksherlock|13 years ago|reply You could check out http://www.baselinecss.com which uses a lineheight + top to push text down. [+] [-] lucisferre|13 years ago|reply Would be nice to have classes for the 6 font sizes as well. I typically don't use H tags to control font size. [+] [-] envex|13 years ago|reply Seems easy enough to just edit the generated code to add your classes.Also, shouldn't you be using headlines when headlines should be used instead of classes? Semantics and everything. load replies (1) [+] [-] eoconnell|13 years ago|reply I prefer using rem over em. Em values multiply when nested where rem values do not. [+] [-] joshnh|13 years ago|reply I plan on having an option to output rem with px fallback code. [+] [-] GhotiFish|13 years ago|reply Might I recommend lorem ipsum to paragraph. paragraph paragraph. paragraph. ?It gives a more meaningful look at how a paragraph would actually look. [+] [-] namuol|13 years ago|reply We require more Lorem. [+] [-] GhotiFish|13 years ago|reply Another thing: When your reactive layout switches to a single column. Float the sliders. so they're always visible.Actually floating the sliders so they're always visible is probably a good idea regardless of layout. [+] [-] joshnh|13 years ago|reply What browser/OS? I can't replicate the issue you seem to be having.
[+] [-] binarymax|13 years ago|reply This is very nice, but wondering if the em can be rounded a bit? I'm not sure there's much difference between 1.5238095238095237em; and 1.524em; [+] [-] joshnh|13 years ago|reply Good call, I've fixed that. load replies (1)
[+] [-] Kiro|13 years ago|reply Why do I need to use em? I thought browsers handled things like zooming on their own nowadays. What's wrong with px? [+] [-] joshnh|13 years ago|reply Ems are more versatile. When increasing the size of all fonts at a particular breakpoint for instance. Instead of having to adjust each font-size property individually you can simply change the font-size of the root element. [+] [-] arianvanp|13 years ago|reply With em you define a base font-size in px. And then you express multiples of the base in em, instead of multiplying manually load replies (1)
[+] [-] joshnh|13 years ago|reply Ems are more versatile. When increasing the size of all fonts at a particular breakpoint for instance. Instead of having to adjust each font-size property individually you can simply change the font-size of the root element.
[+] [-] arianvanp|13 years ago|reply With em you define a base font-size in px. And then you express multiples of the base in em, instead of multiplying manually load replies (1)
[+] [-] exceptione|13 years ago|reply The letters are hanging in the air, i think a good demonstration would show the baseline of the letters to coincide with the line pattern!http://upload.wikimedia.org/wikipedia/commons/3/39/Typograph... [+] [-] joshnh|13 years ago|reply Hi, creator here. Unfortunately that's not how CSS works. See here for more information: http://joshnh.com/2012/10/12/how-does-line-height-actually-w... load replies (1) [+] [-] cooop|13 years ago|reply > The letters are hanging in the air, i think a good demonstration would show the baseline of the letters to coincide with the line pattern!Why?Like OP has demonstrated, this isn't how CSS works.To do so because this is how things are done in print is backwards.You could argue letters sitting on their baseline feels nicer to you, though I'd argue this was form over function.Nice work, OP. load replies (1) [+] [-] ksherlock|13 years ago|reply You could check out http://www.baselinecss.com which uses a lineheight + top to push text down.
[+] [-] joshnh|13 years ago|reply Hi, creator here. Unfortunately that's not how CSS works. See here for more information: http://joshnh.com/2012/10/12/how-does-line-height-actually-w... load replies (1)
[+] [-] cooop|13 years ago|reply > The letters are hanging in the air, i think a good demonstration would show the baseline of the letters to coincide with the line pattern!Why?Like OP has demonstrated, this isn't how CSS works.To do so because this is how things are done in print is backwards.You could argue letters sitting on their baseline feels nicer to you, though I'd argue this was form over function.Nice work, OP. load replies (1)
[+] [-] ksherlock|13 years ago|reply You could check out http://www.baselinecss.com which uses a lineheight + top to push text down.
[+] [-] lucisferre|13 years ago|reply Would be nice to have classes for the 6 font sizes as well. I typically don't use H tags to control font size. [+] [-] envex|13 years ago|reply Seems easy enough to just edit the generated code to add your classes.Also, shouldn't you be using headlines when headlines should be used instead of classes? Semantics and everything. load replies (1)
[+] [-] envex|13 years ago|reply Seems easy enough to just edit the generated code to add your classes.Also, shouldn't you be using headlines when headlines should be used instead of classes? Semantics and everything. load replies (1)
[+] [-] eoconnell|13 years ago|reply I prefer using rem over em. Em values multiply when nested where rem values do not. [+] [-] joshnh|13 years ago|reply I plan on having an option to output rem with px fallback code.
[+] [-] GhotiFish|13 years ago|reply Might I recommend lorem ipsum to paragraph. paragraph paragraph. paragraph. ?It gives a more meaningful look at how a paragraph would actually look.
[+] [-] GhotiFish|13 years ago|reply Another thing: When your reactive layout switches to a single column. Float the sliders. so they're always visible.Actually floating the sliders so they're always visible is probably a good idea regardless of layout. [+] [-] joshnh|13 years ago|reply What browser/OS? I can't replicate the issue you seem to be having.
[+] [-] joshnh|13 years ago|reply What browser/OS? I can't replicate the issue you seem to be having.
[+] [-] binarymax|13 years ago|reply
[+] [-] joshnh|13 years ago|reply
[+] [-] Kiro|13 years ago|reply
[+] [-] joshnh|13 years ago|reply
[+] [-] arianvanp|13 years ago|reply
[+] [-] pasiaj|13 years ago|reply
[+] [-] exceptione|13 years ago|reply
http://upload.wikimedia.org/wikipedia/commons/3/39/Typograph...
[+] [-] joshnh|13 years ago|reply
[+] [-] cooop|13 years ago|reply
Why?
Like OP has demonstrated, this isn't how CSS works.
To do so because this is how things are done in print is backwards.
You could argue letters sitting on their baseline feels nicer to you, though I'd argue this was form over function.
Nice work, OP.
[+] [-] ksherlock|13 years ago|reply
[+] [-] lucisferre|13 years ago|reply
[+] [-] envex|13 years ago|reply
Also, shouldn't you be using headlines when headlines should be used instead of classes? Semantics and everything.
[+] [-] eoconnell|13 years ago|reply
[+] [-] joshnh|13 years ago|reply
[+] [-] GhotiFish|13 years ago|reply
It gives a more meaningful look at how a paragraph would actually look.
[+] [-] namuol|13 years ago|reply
[+] [-] GhotiFish|13 years ago|reply
Actually floating the sliders so they're always visible is probably a good idea regardless of layout.
[+] [-] joshnh|13 years ago|reply