nunomaduro / termwind

🍃 In short, it's like Tailwind CSS, but for the PHP command-line applications.
MIT License
2.29k stars 78 forks source link

HTML #29

Closed ju5t closed 3 years ago

ju5t commented 3 years ago

I read your post on Twitter about using the span()-method as a way to render lines. I feel a bit sad that it has been changed already. I hope to make a case to at least make line() available aside any HTML-tags. And link instead of a.

  1. If you go through some of the bash/zsh manuals for commands like echo, grep, awk and others there is no mention of a span, a div or an a-tag. Every manual calls it a line, not a div.
  2. It's command LINE interface. Although the README calls it a command-span application these days :)
  3. It's not a span if it has a line break (again, a line). It's a block element. But why bother with semantics? It's a line, after all.
  4. HTML elements are too opinionated.

Now that we're on the subject. You've also mentioned including h1. I personally don't like that. The command line doesn't know or care about headings. I would argue that if you need a heading, you'd extend line (wouldn't a class for it make more sense?) and give it all its classes to be a header.

All grumpiness aside. The idea of using Tailwind colours (or any type of colour) is awesome. Oh, yea. Another small feature request: the Color enum should probably be configurable :)

No matter what you decide, this is still a cool package that's going to be really useful.

nunomaduro commented 3 years ago

Thanks for the feedback.