DEV Community

Daniel Sellers
Daniel Sellers

Posted on • Originally published at designfrontier.net on

1

Biology and CSS

I am the average height of my grandfather’s generation. I have brown hair, that is rapidly going gray even at the ripe old age of 31. I have blue eyes and olive skin.

Now that you know more about my physical appearance than you wanted to let’s get down to brass tacks.

The inheritance model that resulted in me having these physical characteristics is complex. At a genetic level during my mother’s pregnancy, recessive and dominant traits were engaging in complex calculations to determine what physical attributes I would have. Blue eyes beat out my brother’s hazel eyes, and my sister’s brown eyes. The early graying gene and brown hair beat out my sister’s red hair.

At this point you are wondering if you have stumbled onto the wrong blog. Because what does this have to do programming and CSS?

Well it turns out that CSS uses basically the same inheritance model. Just like each of your parents contributed traits to you. Different parts of their biological inheritance influence your physical attributes. DOM elements go through the same thing. They inherit different attributes from their parents and based on a dominance calculation (specificity!) their appearance takes shape.

I’ve found that this tends to make thinking about CSS inheritance a lot easier. This isn’t CS inheritance that you have seen in other languages. This is inheritance as your body knows it. This is one of the most dynamic and powerful inheritance models in existence. Enjoy it! Sure it looks like magic sometimes, but so does any sufficiently advanced technology.

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more