Custom tags for readability is one of those ideas which sound good in theory but stupid in practice. Think ` `, get a Slack thread where three seniors debate whether it's ` ` or ` ` while the shipper quietly ships it with ` `.
You can make up HTML tags
151–160 of 202 posts
Re: You can make up HTML tags
#152I've been doing this for about three or four years. Clever idea, tricky in practice. I don't think I'd recommend this approach broadly. But it works for me. It's definitely possible to take it too far. When most tags in your HTML are custom elements, it creates new readability problems. You can't immediately guess what's inline, what's block, etc. And it's just a lot of overhead for new people to learn. I've arrived…
Re: You can make up HTML tags
#153Many years ago, I decided to reinvent the `blink` tag, because the monsters who make browsers removed support for it. I didn't know you could just make up tags, but I figured I'd give it a shot, and with a bit of jquery glue and playing with visibility settings, I was able to fix browsers and bring back the glorious blinking. I was surprised you could just do that; I would have assumed that the types of tags are fina…
Talking about this, I am still sad Flash got removed from the web. Nothing to replace it with to afaik.
It was so satisfying being able to animate something, and immediately have the ability to create code out if it.
I have not found a platform to replace that, though GameMaker gives something of a facsimile.
Re: You can make up HTML tags
#154Earlier quoted context omitted.
I used custom elements extensively in 2014 when support was not as widespread. I think it's a beautiful, elegant solution and I'm still a little bit bitter that React became as big as it was. Now everything "has" to be a SPA because developers want to use React, whereas most users would actually be better served with good 'ol HTML with some custom elements where needed.
> I think it's a beautiful, elegant solution Very confused by statements like these. They are extremely verbose. They are too high level, preventing many low-level optimizations. They are too low-level, preventing you from using/implementing them without going into the details of how they actually work. They break many platform assumptions and conventions, creating no end of problems both for end users and implemente…
Re: You can make up HTML tags
#155Re: You can make up HTML tags
#156Many years ago, I decided to reinvent the `blink` tag, because the monsters who make browsers removed support for it. I didn't know you could just make up tags, but I figured I'd give it a shot, and with a bit of jquery glue and playing with visibility settings, I was able to fix browsers and bring back the glorious blinking. I was surprised you could just do that; I would have assumed that the types of tags are fina…
Talking about this, I am still sad Flash got removed from the web. Nothing to replace it with to afaik.
Sites like Kongregate amd albinoblacksheep are using it to revive their old catalog.
Re: You can make up HTML tags
#157This is how you can set default styles for all your custom elements: :where(:not(:defined)) { display: block; }
Re: You can make up HTML tags
#158I used this to implement , the opposite of , to be able to designate sections of a page to be hidden if JS was disabled. You can of course do the same thing with classes, but custom tags are fun. https://github.com/aaviator42/yes-script
By the way, you can also do this pure CSS using the scripting media feature: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/A...
Re: You can make up HTML tags
#159I've been doing this for about three or four years. Clever idea, tricky in practice. I don't think I'd recommend this approach broadly. But it works for me. It's definitely possible to take it too far. When most tags in your HTML are custom elements, it creates new readability problems. You can't immediately guess what's inline, what's block, etc. And it's just a lot of overhead for new people to learn. I've arrived…
I'm highly interested in approaches that utilize web grain in a balanced practical way. Do you have a framework/toolbelt or example sites to share? Would love to see. If you're interested in my approach to custom elements I created: https://github.com/crisdosaygo/good.html It utlizes custom elements, has autohooks for granular DOM updates, uses native JS template literal syntax for interpolation, imposes ordered comp…
Re: You can make up HTML tags
#160Earlier quoted context omitted.
Talking about this, I am still sad Flash got removed from the web. Nothing to replace it with to afaik.
I stand by that Flash was the most fun way to write software, especially games. It was so satisfying being able to animate something, and immediately have the ability to create code out if it. I have not found a platform to replace that, though GameMaker gives something of a facsimile.