en.osm.town is one of the many independent Mastodon servers you can use to participate in the fediverse.
An independent, community of OpenStreetMap people on the Fediverse/Mastodon. Funding graciously provided by the OpenStreetMap Foundation.

Server stats:

251
active users

#cssgrid

1 post1 participant0 posts today

#cssWish That we could have a zero count for the number of columns in `repeat()`.

That repeat count is often computed. Let's say I want double the width for selected column k out of n columns:

```
repeat(var(--k), var(--w))
calc(2*var(--w)
repeat(calc(var(--n) - var(--k) - 1), var(--w))
```

#CSS#code#coding

I thought I would have to let collapsing margins go when I went with the "fluid breakout layout" using CSS grid.

But then I remembered that CSS grid has the gap feature which you can use for row-gap only which while not being collapsing margins can fulfill the same need.

Modern CSS really is amazing.

#css #cssGrid #webDev

Ok, this has me really stumped.

I have two grid items which overlap each other.
The grid container has a black background. The 1st item (which I thought would be 'bottom' in the stack) is red background and opacity:0.5. So it appears darker, which is what I expected. The 2nd item (which I assumed would stack above) is yellow, and opaque.

But the 2nd item seems to have been overlaid by the transparent one beneath it! The text is not selectable.

codepen.io/artfulrobot/pen/jOg

Hey @piccalilli!

I found buildexcellentwebsit.es extremely insightful and inspiring! It pushed me to finally completely restructure my personal website’s #CSS, after many years of mess.

I used the awesome utopia.fyi to generate the vars, (actually, I am using the SCSS library).

Unfortunately, though, I find the massive use of all those calc() and clamp() functions to be quite heavy in terms of performance… #Lighthouse gave the website a very bad performance score (see screenshot). It even seems that while scrolling the page it lags (😳) even if it’s super simple and built with pure #HTML and CSS!

Do you have any ideas or suggestions? 🤔

Thank you so much for all the interesting things you share! ❤️🚀

(The current unstable development version of my website is at https://dev.tommi.space/, I am using the homepage as reference)

Cc: @j98 + @trys

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!