Skip to content

Converting styling of all internal apps, Settings and core ownCloud from em to px. - #2143

Closed
raghunayyar wants to merge 14 commits into
masterfrom
em-to-px
Closed

raghunayyar wants to merge 14 commits into
masterfrom
em-to-px

Conversation

@raghunayyar

Copy link
Copy Markdown
Contributor

The styling written in "em" that was causing various issues like #801 and #1747 to users who used different sizes in the browsers has been converted to the more convenient "px". I have tried to cover almost the entire CSS of the core repository. I gave it a test and the layout seemed fine. I hope I haven't missed out something. So, someone can give this a hard test as a lot of styling is affected by this.
cc // @jancborchardt @Raydiation @eMerzh

@ghost ghost assigned jancborchardt Mar 6, 2013
@eMerzh

eMerzh commented Mar 6, 2013

Copy link
Copy Markdown
Contributor

It seems to fix the pbm for files at least :)

@BernhardPosselt

Copy link
Copy Markdown
Contributor

wow 👍

@karlitschek

Copy link
Copy Markdown
Contributor

I really really really hope that his doesn't break things.

@raghunayyar

Copy link
Copy Markdown
Contributor Author

I want more people to check on this please. I have been careful with this, but the chances of breaking things is also high. @karlitschek should we wait with this for OC6, btw ?

@karlitschek

Copy link
Copy Markdown
Contributor

@raghunayyar If you think that the risk is high then we definitely have to wait.

@raghunayyar

Copy link
Copy Markdown
Contributor Author

@karlitschek I guess we can wait for some more 👍 for this. If some issue pops up, I am ready to merge it after OC5 is released.
@jancborchardt : need your take on this. :)

@jancborchardt

Copy link
Copy Markdown
Contributor

As set in the milestone and as said in other discussions, of course a change like this has to wait for ownCloud 6.

Big thanks @raghunayyar! I’ll check it out later. And everyone else, please don’t press the merge button on this!

@raghunayyar

Copy link
Copy Markdown
Contributor Author

@jancborchardt @karlitschek @Raydiation @eMerzh I guess this is the right time to get this in. Other wise, more commits will be thee in terms of em making it unmanageable when we near OC6.
Another thing, IMO one of the first steps towards OC6 should be at least adhering to the style-guidelines written so that it is followed for the subsequent commits from the developers. What say?

@stefannagtegaal

Copy link
Copy Markdown

Why do we want px instead of em's?

@raghunayyar

Copy link
Copy Markdown
Contributor Author

@stefannagtegaal I have tagged a couple of issues in this PR. You can check them as a reason. :-)

@karlitschek

Copy link
Copy Markdown
Contributor

I'm ok with changing to em. But I think @jancborchardt should approve this because we changed that to px with a reason in the first place.

@tanghus

tanghus commented Mar 17, 2013

Copy link
Copy Markdown
Contributor

I'm ok with changing to em. But I think @jancborchardt should approve this
because we changed that to px with a reason in the first place.

Actually it's the other way around: From em to px

@jancborchardt

Copy link
Copy Markdown
Contributor

@raghunayyar everything seems to work but has gotten a tad smaller. 1em usually equates to 16px instead of 12. Can you test and update that?

@stefannagtegaal see this mailing list post and the followup. Short: px is controllable while em can easily result in a mess (and it did several times for us, see upload button), px is not = device pixels but a relative measurement just like em, and Bootstrap (which you seem to like according from the recommendation on the mailing list) also uses px.

@jancborchardt

Copy link
Copy Markdown
Contributor

So for the record 👎 until the 16px/12px stuff is resolved. Just so that no one clicks the »merge« button. :)

@Raydiation did you see the stuff getting smaller also when you tested it?

@raghunayyar

Copy link
Copy Markdown
Contributor Author

@jancborchardt stuff getting smaller totally depends on how you have taken 1em in your browser. ;)
From what I see, the sizes are fine with 12px but too big with 16px. Should I post screenshots, for making the picture more clear? :)

@raghunayyar

Copy link
Copy Markdown
Contributor Author

Here are a couple of screenshots of how I see stuff here on my machine.
Screen Shot 2013-03-17 at 7 42 41 PM
Screen Shot 2013-03-17 at 7 42 22 PM
Screen Shot 2013-03-17 at 7 42 55 PM

@stefannagtegaal

Copy link
Copy Markdown

The problem is that most browsers use 16px as the default font-size (which results in 1em), while for example IE 6 has implemented a default font-size of 13px (if I correctly recall).

The best and most cross-browser way to solve this is:
html {
font-size 16px; /** overrides browser default */
}

body {
font-size: 0.75em; /** Results in 12px */
}

etc, etc...

It should be noted that once the user manually overrides the default minimum font-size in his browser, everything changes again.

Despite everything above, I really see another big advantage of using Googles Bootstrap here, which gives us a solid base to work on..

@Niduroki

Copy link
Copy Markdown

Wondering whether this will be okay on high DPI displays …

em has it's advantage of being relative to the screen it's on, px can't say that.

@jancborchardt

Copy link
Copy Markdown
Contributor

@Niduroki

Copy link
Copy Markdown

Makes stuff quite smaller for me …
em-to-px:
Screenshot343
em-to-px~14:
Screenshot344

@raghunayyar

Copy link
Copy Markdown
Contributor Author

@Kondou-ger checked this PR after a long time. I guess ding this with 1em as 14px would make more sense. cc @jancborchardt

@jancborchardt

Copy link
Copy Markdown
Contributor

@raghunayyar yeah, probably it’s best to do 14px – as 12px makes everything smaller and 16px too big. That’s because the default font size was set to .8em

In the future we should probably make the interface a bit bigger anyway so it’s more easily clickable, but that’s a separate issue.

@stefannagtegaal for the record since you quote a problem iwth IE6: We only support IE down to version 8.

Comment thread apps/files/css/files.css

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be 11px instead of 9px? (12*0.9=10.8)

@raghunayyar

Copy link
Copy Markdown
Contributor Author

@kabum awesome, I did everything manually so there might be errors here. I am making a new PR for this mostly though. taking 14px as 1 em. :)

@MorrisJobke

Copy link
Copy Markdown
Contributor

@raghunayyar so I will check this new PR too :) ... just mention me

@jancborchardt

Copy link
Copy Markdown
Contributor

Also maybe separate it into smaller steps: one for the core/styles.css, one for settings.css, etc. - makes it much easier to review.

On 16.04.2013, at 15:47, Raghu Nayyar [email protected] wrote:

@kabum awesome, I did everything manually so there might be errors here. I am making a new PR for this mostly though. taking 14px as 1 em. :)

—
Reply to this email directly or view it on GitHub.

@LukasReschke
LukasReschke deleted the em-to-px branch March 25, 2014 20:15
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants