Joana Borges Late
2 min readMar 24, 2023

--

Hello Padraic!

I really enjoyed your reply. And I am happy because you are happy experimenting and discovering your true faith!

You { though and I still sin occasionally. }

Hehehehe!

You { ...CSS weird. It doesn't behave like other programming languages... completely different programming paradigms. HTML and CSS are declarative languages... JavaScript is imperative }

Put aside, for one minute, the imperative versus declarative language aspect. Let's stay with declarative languages only, comparing CSS against HTML: it is all about the USE OF THE SPACE IN THE CODE.

In HTML (declarative language), we declare a tag in one place only. And just looking at the lines above it and below it, we know about its parent and its children - in case it has children. If you don't see a button tag inside a div tag, this means there is no button there.

Maybe you are thinking, "Oh, but I could insert a button using JS!". Exactly, using JS. But we are talking about HTML.

Excluding the facts

1) that each tag can be bloated with attributes and text,

2) that the syntax is verbose and the angle brackets are bad for reading (curly braces are better) and

3) that you can write valid HTML without indentation or with wrong indentation,

HTML is BY FAR the MOST READABLE language ever!

So, what I propose is writing CSS in a more readable (that is also more maintainable) way. By organizing better the SPACE IN THE CODE, like HTML does by its own nature.

For my purpose, it is necessary to stay only with class selectors. And as a bonus, there are no more worries about the FIRST criterion for precedence (based on the kind of selectors).

And I am NOT banishing the SECOND criterion (about the position of the rules): I am using it when I organize the molecules into imaginary layers.

Read again the section "The second issue with the CSS Precedence Rules". That problem really happened to me. I don't know how Zen Garden could solve that (without going molecular or atomic).

By the way, I am 100% in favor of a clear, semantic structure of HTML.

I think you will understand better when you compare the replicas of the imaginary Medium article. Jason Knight accepted to take part in the contest.

I just don't know if he will fight under the banner of the Zen Garden, or he will represent the Templar Knights!

--

--

Responses (1)