DEV Community

Discussion on: Are CSS and HTML programming languages?

Collapse
 
louislow profile image
Louis Low • Edited

How do you like my joke?

<style>
  if[state="true"] > return { color: blue }
  if[state="false"] > return { display: none }
  if[state]:not([state="true"]) > return:after { color:red; content: "Invalid Boolean!" }
</style>

<if state="true">
  <return>
    Hello World!
  </return>
</if>
Enter fullscreen mode Exit fullscreen mode
Collapse
 
themoviemadman profile image
Eliseo D'Annunzio

Loouis, that is actually quite logical code there!

You may want to change:

if[state]:not([state="true"])

to

if[state]:not([state="true"]):not([state=“false”])