Death to px, long live ch
shkspr.mobi
Death to px, long live ch
1–10 of 86 posts
Re: Death to px, long live ch
#2Re: Death to px, long live ch
#3I’ve found that ch and ex units are heavily influenced by latin characters. They just give weird results with non-latin characters leading to magic numbers. But the concept is really solid: use them if you want the spacing relative to text.
Re: Death to px, long live ch
#4In fact, I think CSS made the wrong decision by proliferating so many things, em, %, px, ch, whatever-else. The human brain is not well-equipped to have so many things for basically the same thing. That's a design flaw in CSS, plain and simple. And the author is thus also wrong. There won't be a mass movement of people using "ch". It would be a good first april article though.
Re: Death to px, long live ch
#5Re: Death to px, long live ch
#6I’ve found that ch and ex units are heavily influenced by latin characters. They just give weird results with non-latin characters leading to magic numbers. But the concept is really solid: use them if you want the spacing relative to text.
Re: Death to px, long live ch
#7I’ve found that ch and ex units are heavily influenced by latin characters. They just give weird results with non-latin characters leading to magic numbers. But the concept is really solid: use them if you want the spacing relative to text.
Thought a magic number is when you hard code a number in logic instead of pulling from a data source
Re: Death to px, long live ch
#8Re: Death to px, long live ch
#9Re: Death to px, long live ch
#10Is there a way to use real pixels? My, admittedly quick, search says no. at least nothing jumps out at me from the spec.