mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,5 Tsd.
aktive Profile

#containerqueries

0 Beiträge0 Beteiligte0 Beiträge heute

Extremely annoying #CSS gotcha: container query units seem to be relative to the `content-box` dimensions. And there doesn't seem to be any way to make them relative to the `border-box` dimensions... which is what I need to solve other problems caused by container queries. 😭

#cssWTF#gotcha#layout

Random #CSS thought of the morning: annoying thing about #containerQueries is a container needs to have children, we can't just use its text content as container item (like for #cssGrid).

Relevant for when we want container size relative font-size.

Take codepen.io/thebabydino/pen/MWR

We cannot have that text content be the text content of the article element (the container whose size it depends on), it needs to be wrapped in a div!

#cssLayout#code#coding

Is it possible yet for a #CSS media object pattern to center-align its text content when it’s shorter than the visual object, but for that content to flow below the object when it’s longer? codepen.io/tylersticka/pen/KKr

I usually give up and go full flex or grid, but that’s a shame when space is limited or the object isn’t square.

(It feels like #ContainerQueries could solve this, but I haven’t had success with that yet, and most examples I’ve found focus on `inline-size`)

So for #css #ContainerQueries you define a container.

BUT does such a container have a name?

Right now I want to explain that we should make a grid container a container query container.

"Make the grid container a container"?

"Make the grid container a container query container"?

Both are confusing.