mia,
@mia@front-end.social avatar

What would you want to understand better about #CSS - about how it works, or why it works the way it does?

(This is research for a thing)

css,
@css@front-end.social avatar

@mia What I will say may sound surprising but I think people need to better understand the basic flow algorithm involving block and inline elements.

Many new developers start their code by using a ton of Flexbox and CSS Grid (because it's trending and everyone talk about them) while in reality they simply need to use the default block/inline elements and let the browser do the job.

ericmikkelsen,

@mia css perspective, and the weird stuff around css parallax

fcalderan,

@mia how exactly the contain property works and how should I choose it

elly,
@elly@front-end.social avatar

@mia One thing that’s caught me a few times is why svw and svi include the (non-overlay) scrollbar width in their size?

I think I looked into the CSSWG GitHub issues for this once but I either didn’t remember or didn’t understand it. 😂

julzmon,

@mia I still get stuck all the time when it comes to positioning and alignment of children inside flex and grid.

mauvedeity,
@mauvedeity@mastodon.social avatar

@mia how it works. But I’m a way that makes the why easier to grasp.

pawelgrzybek,
@pawelgrzybek@mastodon.social avatar

@mia I would love to understand why margins collapse as they do. Why margins collapse not paddings. Imitating print design software? Any other reasons?

Also, I am very curious how browser calculates pixel fractions (ie calc(100px / 3)). I remember significant differences between the browsers in handling sub pixels.

joshwayne,
@joshwayne@mastodon.social avatar

@mia definitely grid. I designed a page that broke the box model a lot and I was told it was the perfect use case for css grid but after pulling my hair out for days I abandoned it and used flexbox.

cmmdmx,
@cmmdmx@mastodon.social avatar

@mia cross platform CSS-only + consistent scrollbars 😅

mia,
@mia@front-end.social avatar

@cmmdmx can you expand on this? say more! :)

cmmdmx,
@cmmdmx@mastodon.social avatar

@mia

Sure!

I am aware of all the webkit features to style scrollbars. Unfortunately it's only webkit... Firefox therefore also supports some properties.

But what really bothers me is the different behavior of scrollbar margin / or the overlay behavior.

I haven't found a generic solution to have overlay(-like) behavior in all major browsers with only CSS and overflow:auto...

lofi,
@lofi@vis.social avatar

@mia @5t3ph how does it actually work? Even one simple example, like text-decorate, what’s actually happening when we set that property?

mitten,
@mitten@social.lol avatar

@mia I’d like to have a better understanding of how to efficiently build rules so that they cascade and work well together - that is, how to organize the CSS code itself so that it works well as a “scaffolding” or “skeleton”.

michelle,
@michelle@front-end.social avatar

@mia Overflow

simevidas,
@simevidas@mastodon.social avatar

@mia One thing that I’ll try to figure out in the next few days is why exactly did browsers vendors not make 100svw equivalent to the viewport width when a classic scrollbar is present. The svw is pretty much irrelevant in mobile browsers, so there would not be a conflict.

simevidas,
@simevidas@mastodon.social avatar

@mia I think I figured out why.

If 100svw was the smaller viewport width when a vertical classic scrollbar is present, then 100svh would be the smaller viewport height when a horizontal classic scrollbar is present. But 100svh already means “smaller viewport height when mobile browser’s UI is expanded”, so the same 100svh value would have two completely different behaviors in mobile vs. desktop browsers.

simevidas,
@simevidas@mastodon.social avatar

@mia So if a website used 100svh to fix a layout issue in mobile browsers, there would be a potentially unwanted side-effect in desktop browsers.

tylersticka,
@tylersticka@social.lol avatar

@mia I’ve been making websites for 27 years (16 professionally), and I still don’t fully understand the relationship between html and body. Granted, I haven’t really researched it, but every time I’m starting from scratch and remember that the body background color fills the whole thing even when it has margins and stuff, I think “gosh, that is so weird.”

sarajw,
@sarajw@front-end.social avatar
css,
@css@front-end.social avatar

@tylersticka @mia and it's not only related to html and body because both of them are as tall as your content and yet the background fill all the screen because everything is propagated to the canvas (yes another actor in play)

https://drafts.csswg.org/css-backgrounds/#special-backgrounds

noleli,
@noleli@mastodon.social avatar

@mia - display: flow-root. What is it and why would I use it?

  • I theoretically understand flex-shrink/flex-grow, but don’t always intuit resulting behavior correctly.
  • People think of the difference between flex and grid as just 1D vs 2D, but it seems like flex is more oriented toward laying out items with their intrinsic sizes, and grid is more about the layout imposing sizing extrinsically on grid items. It’s not black and white, but the APIs tilt heavily in that direction. Why?
kinoauge,

@mia Stacking contexts

TerrorBite,

@mia why isn't box-sizing: border-box; the default

  • All
  • Subscribed
  • Moderated
  • Favorites
  • CSS
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • InstantRegret
  • tacticalgear
  • rosin
  • love
  • Youngstown
  • slotface
  • ngwrru68w68
  • kavyap
  • cubers
  • thenastyranch
  • mdbf
  • provamag3
  • modclub
  • GTA5RPClips
  • normalnudes
  • khanakhh
  • everett
  • cisconetworking
  • osvaldo12
  • anitta
  • Leos
  • Durango
  • tester
  • megavids
  • JUstTest
  • All magazines