contao / official-demo

Contao Official Demo
17 stars 14 forks source link

is em value in vertical spaces necessary ? [for discussion] #58

Open MoniqueHahnefeld opened 9 years ago

MoniqueHahnefeld commented 9 years ago

if it's necessary I'd like to use it also for the horizontal spaces and use the unit rem. What do you mean @Samuelll, @may17

may17 commented 9 years ago

I am not a big fan of rem. To many drawbacks.

MoniqueHahnefeld commented 9 years ago

what drawbacks you mean? so what's the advantages of the em-units in the theme now. make that em-declarations any sence?

Aybee commented 9 years ago

EM or REM in vertical spaces makes sense. e.g. p{margin-bottom:1em}. This makes sure that the distance between paragraphs relates to the actual font-size of a paragraph.

MoniqueHahnefeld commented 9 years ago

@Aybee Thx, I supposed something like that. Want to be sure about that :) What do you think about the global font-size unit, we should use? I prefer rem and not px.

Aybee commented 9 years ago

I always use REM http://caniuse.com/#feat=rem for font-size.

sascha-mueller commented 9 years ago

me to. REM and, if necessary, px Fallback via mixin.

Am 15.07.2015 um 23:10 schrieb Andreas Burg:

I always use REM http://caniuse.com/#feat=rem

— Reply to this email directly or view it on GitHub https://github.com/contao/official-demo/issues/58#issuecomment-121748596.

may17 commented 9 years ago

@MoniqueHahnefeld https://code.google.com/p/chromium/issues/detail?id=320754 https://vasilis.nl/nerd/dislike-rem-unit/ https://mindtheshift.wordpress.com/2015/04/02/r-i-p-rem-viva-css-reference-pixel/

Aybee commented 9 years ago

Short statement:

I don't care about IE8. I think you neither do.

I don't use PX as I don't want to disregard the users browsers font size settings respectively the output devices default font size setting. And I like to be able to easily adjust the overall font sizes by just changing one value. Normaly my HTML gets no setting so BODY gets the users (devices) font size if I set it to 1rem.

I prefer REM over EM as I don't want this font-size inheritance (if I want this inheritance I use EM).

And yes, devices already support zooming of PX values so this is not a reason for using REM/EM long since.

may17 commented 9 years ago

Its my wish to create a COD 2 with a new modern look. The contents of the cod are good (just the frontpage needs an update for my opinion) but the design isnt up to date.

Perhaps it makes more sense to use rem in newer version? What do you think?

sascha-mueller commented 9 years ago

Ich mag REM und arbeitegern damit. Generell bin ich also dafür.

may17 commented 9 years ago

@Samuelll feel free to refactor it :)

sascha-mueller commented 9 years ago

@may17 Wie stehst Du denn zu REM für die fontsitze in diesem Projekt?

Aybee commented 9 years ago

@may17 ...but the design isnt up to date...

I totaly agree. Maybe it's just down to the colors. (Which I never liked).

Use PX when it makes sense. Use EM where it makes sense (e.g. margin-bottom of paragraphs, or if you think the inheritance is exactly what is needed in a special situation). Use REM when you want to respect the devices font-size settings and don't want to juggle around with unwanted inheritance.

With the padding in the content boxes for example I sometimes use PX and sometimes REM. To me it's always hard to decide what to use. But maybe this is not very important.

BTW I never understood the viewport breakpoints in EM. I think EM is a flexible value, but viewport width always is a PX value. Am I wrong or do you know more about that one?