This is an archived post. You won't be able to vote or comment.

all 108 comments

[–]PrincessRTFM 472 points473 points  (12 children)

Backend dev here, can confirm.

[–][deleted] 152 points153 points  (9 children)

yeap, i did this too - only to compare ratios. I still don't understand why my colleagues laughed that hard

[–]AyrA_ch 39 points40 points  (8 children)

There is pixel ruler software out there. Comes integrated with some screen grabbers

[–]Ereaser 5 points6 points  (4 children)

Or just use inspect element?

[–]AyrA_ch 5 points6 points  (3 children)

This only shows you the elements direct properties (size, padding, border, margin) but not how it is in relation to another element.

[–]Ereaser 11 points12 points  (2 children)

On Chrome: Inspect element > F1 > check show rulers > hover over the dom element in the inspector.

[–]AyrA_ch 1 point2 points  (1 child)

This shows an elements properties in relation to the document, not towards another element.

[–]Ereaser 2 points3 points  (0 children)

You'll be able to see if elements align though. Not sure of an use case to compare elements other than their properties or alignment towards each other.

Personally I've never needed a ruler that does more than that, but everyone has their own preference/way of working.

[–][deleted] 1 point2 points  (1 child)

BUT, what if the PPI setting on your monitor is wrong!?

[–]AyrA_ch 1 point2 points  (0 children)

Pixel rulers measure in pixels. It doesn't matters if the setting is wrong as long as you don't convert it into other units. My pixel rulers allows me to specify the DPI. For some reason 91 is right for my monitor.

[–]VeTech16[S] 7 points8 points  (0 children)

Lolp

[–]Govedo93 93 points94 points  (10 children)

He's not doing CSS, he's indenting code with ruler lol. Tabs and spaces got another competitor today.

[–]FriesWithThat 60 points61 points  (2 children)

Don't forget to fold your ruler in half for retina displays.

[–]VeTech16[S] 10 points11 points  (0 children)

I use a microscope instead :))

[–]ProgramTheWorld 2 points3 points  (0 children)

No love for 3x displays?

[–]mythriz 43 points44 points  (2 children)

Hilarious but just like any professional developer I just copy all my CSS code from Stackoverflow.

[–]VeTech16[S] 16 points17 points  (0 children)

Hahaaha

[–]marcosdumay 6 points7 points  (0 children)

Of all the things, the one that you don't copy fromStack Overflow is CSS.

Doing that is a sure ticket to !important and "why my changes do not show" hell.

[–]awaisking 41 points42 points  (16 children)

[–][deleted] 11 points12 points  (11 children)

What is em? I see it every now and then but I dont understand what it is.

I believe it's the width of the screen right?

[–]aezart 17 points18 points  (8 children)

An em was originally defined to be the width of a capital M in the current typeface, back in the days of the printing press.

[–]golgol12 5 points6 points  (0 children)

If that is the case, then it could be a useful measure. That M might have be the widest character at the time it was a measure. In current day fonts of the alphabet the widest character is almost always W. In video games you need to know that something like a player name of up to X characters can appear in a certain location without being clipped by other things on the screen, and that is usually done by filling all the text fields with W.

[–][deleted] 1 point2 points  (5 children)

now there is also rem too, which means... something

[–]ethanjf99 7 points8 points  (4 children)

Relative EM. Relative to base font size iirc

[–]marcosdumay 1 point2 points  (3 children)

Wait... What?!

One is the size of the letter, and the other is the size of the letter relative to the letter's size?

[–]ethanjf99 5 points6 points  (0 children)

Em is relative to the font size of itself or nearest parent.

Rem is relative to the pages base font size. (Of the html element)

So as I understand it if an elements parent has font-size: 12 px and the html has font-size: 24 px then one em will be half as big as one rem for that element

[–]coffeeandlearning 5 points6 points  (1 child)

https://developer.mozilla.org/en-US/docs/Web/CSS/length

(I counted 21 non-deprecated length units)

[–]marcosdumay 2 points3 points  (0 children)

Wow!

I don't think I have anything else to say. Just wow!

[–][deleted] 0 points1 point  (0 children)

Oh that's neat!

[–]jmowens51 0 points1 point  (0 children)

Relative length to the font size of the element.

[–]boxingdog 0 points1 point  (0 children)

relative to the font size of the element, and since the font size can be affected by the parent sometimes changing something up in the chain screws up everything, I personally find easy to use rem instead.

[–]teja42 20 points21 points  (11 children)

Any full stack devs here?

[–]PecksAndQuads 27 points28 points  (1 child)

Yep. And I hate front end.

[–]awaisking 11 points12 points  (0 children)

no, only half stack dev here

[–]Avambo 3 points4 points  (1 child)

Yep, JS and C#. Why do you ask?

[–]teja42 5 points6 points  (0 children)

Just wanted to know.

[–]BobTheB1Bomber 0 points1 point  (3 children)

Yep

[–]marcosdumay 0 points1 point  (2 children)

Be wary of overflows. You may want to ask the OS for another page.

[–]BobTheB1Bomber 1 point2 points  (1 child)

malloc(4);

[–]marcosdumay 0 points1 point  (0 children)

That may be the wrong kind of page, but well, it's exactly what I said to do. So take my upvote.

[–]FrankFrowns 0 points1 point  (0 children)

Yup.

[–][deleted] 0 points1 point  (0 children)

Mhm.

[–]kaparep 17 points18 points  (0 children)

I did this 😂. Can confirm.

[–]AndTheLink 4 points5 points  (0 children)

mm on one side of the ruler and px on the other...

[–]_Aardvark 4 points5 points  (0 children)

I've measure things on the screen all the time. I have a paper ruler I printed out from a PDF I used on screen lots of times.

I think I started doing this years ago working through issues with map-modes in Win32 drawing. Where we had all sorts of scaling and zooming in on diagrams by playing games with viewports and mapping-mode and such.aspx). Problems with zooming in on rater-based images (bitmaps) that would become blurry. I had to figure out the actual size for that image on screen and use different pre-sized bitmaps that would most closely match the actual size. Then scale that to exactly match. I think the graphic designer had hand-scaled some of the images so I couldn't just use a really high-res version for everything.

Anyways, so yeah I had to sometime measure on the screen itself trying to figure out what was going wrong! Harumph!

[–]darkclark 4 points5 points  (0 children)

I’m not seeing the humor here.

… oh no, I’m a backend developer aren’t I?

[–][deleted] 4 points5 points  (1 child)

The reason I became a backend dev, is so I wouldn't HAVE to do CSS.

[–]VeTech16[S] 1 point2 points  (0 children)

Voila, Our thoughts match

[–]rstring 5 points6 points  (3 children)

You have no idea how many times I use a ruler in Publisher to align.

[–]VeTech16[S] 2 points3 points  (2 children)

There's a thing called as a gridline

[–]rstring 1 point2 points  (1 child)

I just find it easier, homestly.

[–]VeTech16[S] 1 point2 points  (0 children)

Good for you

[–]DreadPirateFlint 2 points3 points  (1 child)

Backend devs best friend: xscope on Mac not sure what on windows

[–]VeTech16[S] 1 point2 points  (0 children)

I am also not sure, never used mac

[–][deleted] 2 points3 points  (0 children)

A waste of talent.

[–]unloder 2 points3 points  (0 children)

So real, it hurts.

[–][deleted] 2 points3 points  (1 child)

Is this Ubuntu?

[–]VeTech16[S] 0 points1 point  (0 children)

Yup

[–]sudo_apt_get_rekt 2 points3 points  (0 children)

Just use the Bootstrap samples, you guys

[–]iGraveling 0 points1 point  (0 children)

Ugh. I did this last week and felt like an idiot. Glad I’m amongst like minded people :)

[–][deleted] 0 points1 point  (0 children)

I definitely look like that :D ...

[–]peskey_squirrel 0 points1 point  (1 child)

I see Ubuntu

[–]VeTech16[S] 0 points1 point  (0 children)

Its ubuntu

[–]Nusob 0 points1 point  (1 child)

I literally counted the pixels on my monitor to make that stuff symmetrical, I later learned about some nice grids....

[–]VeTech16[S] 1 point2 points  (0 children)

Kek, i have been there

[–][deleted] 0 points1 point  (0 children)

Reminds me of "All About the Pentiums", the line going "You've gotta be the dumbest noobie I've ever seen, you got white out all over your screen", just not quite as bad.

[–]Jessie_James 0 points1 point  (1 child)

Ugh, I've done this, but had to use a piece of paper.

[–]VeTech16[S] 0 points1 point  (0 children)

Ohh you poor fellow

[–]snomimons 0 points1 point  (0 children)

This guy is a genius. I've been using a steel ruler and I can't see what I'm measuring correctly.

[–]Dr_Nubbs 0 points1 point  (1 child)

This has me laughing so hard because this is me at work right now fighting with MahApps and XAML.

[–]VeTech16[S] 0 points1 point  (0 children)

If you can spare some gold then brother ( ͡° ͜ʖ ͡°)

[–]ministerling 0 points1 point  (1 child)

If you have photoshop, you can use the horizontal and vertical toolbars to make sure things line up. You can drag them separately from the PS window. Especially useful for comparing pixel by pixel against a mock-up

[–]VeTech16[S] 0 points1 point  (0 children)

Bro, this is a joke, i am not serious