Live data from Hacker News

Hell Yes CSS

wizardzines.com

11–20 of 120 posts

Re: Hell Yes CSS

#11
post #7

Earlier quoted context omitted.

The answer to (a) (along with many other things) is to use Flexbox: .my-container { display: flex; justify-content: center; align-items: center; } This should work for (b) as long as the height isn't in terms of a percentage: .my-video { --my-video-height: 120px; height: var(--my-video-height); width: calc(var(--my-video-height) * 16/9); }

You can also use grid and the place-content shorthand! These things are getting better. CSS was a nightmare in the 2000s.

Even I'll admit that Grid is complicated. It serves a valid use-case, but it's honestly a very rare one in my experience and the learning curve is steep

Re: Hell Yes CSS

#12
I paid $60 to a guy on Fiverr to do css for me just a few days ago. I should have been able to do it myself but after fooling with it for awhile I gave up.

Re: Hell Yes CSS

#14
post #12

I paid $60 to a guy on Fiverr to do css for me just a few days ago. I should have been able to do it myself but after fooling with it for awhile I gave up.

I'm sure someone will come and say they disagree, but I find CSS extremely unintuitive as well. The primitives it has compose very poorly. There are too many ways to do the same thing, each with their own weird quirks. Sometimes it's really hard to get it to render something simple. I mean... Just centering something on the screen is needlessly complicated. I wish CSS was more like a programming language, with a minimal set of primitives that are nicely composable, instead of 1000 bells and whistles that go in every direction.

Re: Hell Yes CSS

#15
Just a question as a non native speaker. Is the "hell yes" in the title considered slightly offensive? On par with "Damn LLVM" or something?

Re: Hell Yes CSS

#16
post #7

Earlier quoted context omitted.

The answer to (a) (along with many other things) is to use Flexbox: .my-container { display: flex; justify-content: center; align-items: center; } This should work for (b) as long as the height isn't in terms of a percentage: .my-video { --my-video-height: 120px; height: var(--my-video-height); width: calc(var(--my-video-height) * 16/9); }

You can also use grid and the place-content shorthand! These things are getting better. CSS was a nightmare in the 2000s.

Grid is nice but overused in my opinion. However, at the end of the day whatever gets the job done and is sane is a valid solution in my eyes but I prefer to think of grid as anything requiring centering on two-axis and/or macroscopic to the task at hand.

So for instance I would do the responsive page layout in grid, probably. Then I would do positioning the elements within a article or section with flexbox.

Re: Hell Yes CSS

#17
post #15

Just a question as a non native speaker. Is the "hell yes" in the title considered slightly offensive? On par with "Damn LLVM" or something?

Only to anyone over 70.

Anyone who would take offense at that is going to find something to be offended by in anything ediger than Mr. Roger's Neighborhood.

Re: Hell Yes CSS

#18
post #15

Just a question as a non native speaker. Is the "hell yes" in the title considered slightly offensive? On par with "Damn LLVM" or something?

It is used in the positive sense with an extra emphasis of excitement.

Re: Hell Yes CSS

#19

Earlier quoted context omitted.

You can also use grid and the place-content shorthand! These things are getting better. CSS was a nightmare in the 2000s.

Even I'll admit that Grid is complicated. It serves a valid use-case, but it's honestly a very rare one in my experience and the learning curve is steep

Personally I love CSS Grid. It allows me to move contents around easily from Desktop to Mobile view just by defining different grid-template-areas.

Re: Hell Yes CSS

#20
post #15

Just a question as a non native speaker. Is the "hell yes" in the title considered slightly offensive? On par with "Damn LLVM" or something?

Your elementary school teacher would give you dirty looks if you said it, but your teenaged and adult friends would give you high fives and "hell yeahs" right back.
Post reply on HN