Trivia: The letter "e" is special. πŸ§™β€β™‚οΈ

Adam Crockett πŸŒ€ - Sep 19 '19 - - Dev Community

So you think you know all the CSS values and that only numbers are well.. numbers.

Well what if I told you that there is one number or should I say letter that you can enter in a number field and use in CSS values you would not expect. e is a trend setter because in CSS you can do this:

z-index: 9e9;
Enter fullscreen mode Exit fullscreen mode

Interesting no?

In html this will also work:

<input type='number' value='e'/>
Enter fullscreen mode Exit fullscreen mode

Okay so before I explain.. I was once presented with a feedback form asking me to rate my experience between 1 and 10, I didn't think much of the form so I entered e, I'm not sure what the SQL database behind this thought of my helpful data, but there you go, you can't rely on client side validation.

Okay what is e all about? E or exponent is equivalent to pow() or power of. In my CSS example this notation gives a huge number 9 times 10 to the power of 9 (edit) and certainly larger than 9999px, so if you want to write less for your money's worth, e is the way to go.

Html number fields also count e as a number when no other letter will actually be typeable.

So that's e, a computed notation worth knowing.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .