Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "css inline-block"
-
Me every time I have to adjust the css:
*center that div*
*hit refresh*
Fuck, now that button is over there.
*adjust the padding and kajigger with the margin a little*
*hit refresh*
Ah, I'm an idiot. I forgot to set the display to inline-block.
*adjust the display*
*hit refresh*
WHY THE FUCK IS THE BACKGROUND RED NOW??!?!?!?10 -
90% of rants about CSS are just people who don't even know CSS2 properly and never heard of CSS3.
That's like crying about not having a nice car without even owning a drivers license. Bullshit.14 -
The longer I work on front-end the more controversial my opinions become:
- Styling a button with display:flex is dumb.
- The DOM is not hard, unlike what the React team wants to have you believe.
- Specifying a <form> action matters, even if it's empty
- ES5 was the real JS revolution, ES6 mostly sugar-coated marketing
- Disciplined BEM (S)CSS is simple and flexible enough for most needs (vs CSS-in-JS, CSS modules)
- If editor support for Jsdoc were as advanced as Typescript, you wouldn't need the latter.
- There are cases where using floats and inline-block displays is better than the flex CSS box model12 -
Me: *opens devTools*
Firefox: yea bro lemme just ..uh.. hmm yeah so this is the css for the element, see?
Me: Thanks.
Me:
Me: this makes no sense, why would I ever do that?
Firefox: also you can't have width on an anchor tag. I can't put that rule into effect
Me: I didn't put any width on your inline element, you sure about that?
Firefox: yea try using display: inline-block
Me: No. I'll just delete that. *checks file*
Me: Maybe that line is wrong because IT DOES NOT FUCKING EXIST!
What is this shit? I just restarted you! What else do you need, a reinstall? Drink too much over the holidays?
It's like the css editor has become a shallow tray with rules on it, and as soon as you bump it a little everything spills over and then Firefox just thinks oops, I've got this font-size: 200% lying around, lemme stick this into the hr tag which makes sense because THERE CAN'T BE ANY TEXT IN IT.9 -
This sort of CSS failure:
div { display: inline-block; width: 50%; }
span { display: inline-block; width: 50%; }
<div>go left</div>
<span>go right dammit</span>8 -
her: he's probably thinking about other girls
me: *in CSS, both "display: inline-block" and "display: inline block" are perfectly valid things and they even mean the same*