DEV Community

Tim Pozza
Tim Pozza

Posted on

nth-child CSSGrid Checkerboard Pattern

Even after cobbling this example, following a cursory search for something that might explain to me the subtleties of nth-child and nth-of-type, these two pseudo-selectors remain in my mind still as somewhat of a mystery.

In testing out various approaches, my imagining of their use soared into Machine Learning territory, as patterns flashed across my screen like so many blinking lights in an early Bond movie computer mainframe housing, calculating ballistic missle trajectories to the forbidden hard target.

It's doubtful the grid presented here will destroy the world any time soon... I really hope not. It may be the games which we decide to play on a board such as this that will really determine what any given set of patterns will ultimately mean for the fate of Mankind.

Since, for me, it's trouble enough figuring out nth-child and nth-of-type, I'm leaving the ways of intrigue behind as too much bother on top of the search for a solid use case for this hard-won bit of 'legendary' programming.

It's OK if you laugh. That's part of every good game no matter how inconsequential it may seem.

If you have some idea to make use out of it, so much the better. I'd like to hear what you might do or want to see done.

Top comments (0)