Live data from Hacker News

You can make up HTML tags

maurycyz.com

71–80 of 202 posts

Re: You can make up HTML tags

#71
post #53

Earlier quoted context omitted.

> because the monsters who make browsers removed support for it Most browsers never implemented it in the first place. Safari, Chrome, IE and Edge never had it. In terms of current browser names, it was only Firefox and Opera that ever had it, until 2013.

Huh, I would have sworn that Internet Explorer had the blink tag at one point, but I think my parents had Netscape and then Mozilla pretty early so maybe that's what I'm confusing it with. Regardless, I stand by my comment. Monsters! I want my browser to be obnoxious.

I think I remember reading articles about how to implement blink in IE using behaviors, some IE only thing that didn't take hold(?), Maybe this was around IE5.

Re: You can make up HTML tags

#72
My problem with custom tags is that they require a hyphen, and that makes it impossible to have consistency between tag names and variable names.

With classes, I can do:

    carList = document.querySelector('.carList')
With custom tags, that is not possible because variable names cannot have hyphens in them.

Re: You can make up HTML tags

#73
I learned this back when HTML5 was brand new around 15-ish years ago. If you wanted to use the new tags like , the only “polyfill” needed was some css styles. You can see it in the early versions of the HTML5 Boilerplate:

https://github.com/h5bp/html5-boilerplate/blob/v0.9/css/styl...

I realized that I could just make up tags and style them and it was work.

Re: You can make up HTML tags

#74
> Good luck trying to insert something inside of “article-heading” but after “article-quote” on the first try.

You don't need much, but an editor - collapse the sections to get the view as small as in the blog snippet, and then you'll have both opening and closing of the tag you're in highlighted, so you won't miss and won't need any luck

Re: You can make up HTML tags

#75
post #53

Earlier quoted context omitted.

> because the monsters who make browsers removed support for it Most browsers never implemented it in the first place. Safari, Chrome, IE and Edge never had it. In terms of current browser names, it was only Firefox and Opera that ever had it, until 2013.

Huh, I would have sworn that Internet Explorer had the blink tag at one point, but I think my parents had Netscape and then Mozilla pretty early so maybe that's what I'm confusing it with. Regardless, I stand by my comment. Monsters! I want my browser to be obnoxious.

Never mind, Microsoft got you with .

In theory, in 1996 Netscape and Microsoft agreed to kill and https://www.w3.org/People/Raggett/book4/ch02.html>, but although they were kept out of the spec, neither removed its implementation, and then IE dominated the browser market, and became popular enough that the remaining parties were bullied into shipping it (Netscape in 2002, Presto in 2003, no idea about the KHTML/WebKit timeline), and so ultimately it was put into the HTML Standard.

Re: You can make up HTML tags

#77
post #65

That's how https://janetdocs.org/ does syntax highlighting: ``` ( defn bench `Feed bench a wrapped func and int, receive int for time in ns` [ thunk times ] ( def start ( os/clock :cputime :tuple )) ```

That's kinda cool but the article addresses a major concern with this strategy that is not addressed here. Which is that many of these tags (e.g. , , etc) might someday become part of the HTML standard.

The article states that anything with a dash is guaranteed not to be and another commenter here shared their strategy that involved a naming convention like , , etc. Perhaps substituting x for j would make sense and alleviate the concern of possible future clashes with web standards

Re: You can make up HTML tags

#78

Earlier quoted context omitted.

Interesting, I'd be curious to know why you all decided not to go with it if you're open to sharing! Minimally to know if I should look at any other promising frameworks.

I see a good case for my company to use Lit for creating complex components such as highly interactive panels/widgets to be shared between React/Angular apps in our large ecosystem. However the decision was: 1. Prefer sharing plain JS/TS over framework code so try that first and 2. if the component is so complex and tricky to get right, it probably needs to be re-implemented in each framework anyways (or some sort of…

Ah yeah, definitely a much different equation when introducing this across many apps as a shared component library. Mixing different DOM abstractions together could get tricky for sure.

And yes attempting to add a new paradigm for that many people is I am sure quite the task. More political than technical in many ways as well.

Thanks for sharing!

Re: You can make up HTML tags

#80
I was forced to use this years ago because there is only a :nth-of-type selector, but no :nth-of-class. So whenever you need nth-of-class, switch to made-up tags and use nth-of-type. (A tag is a type.)
Post reply on HN