OscarGodson / HTML6

A spec to HTML6
http://html6spec.com
169 stars 25 forks source link

A more orthogonal HTML #29

Open bayanr opened 10 years ago

bayanr commented 10 years ago

What could be great is if the HTML spec was based on a small set of tags which had clearly defined and predictable behaviour.

You could you could have the <html:div> tags implemented by the browser and the higher level tags implemented by those low level ones. For example

<html:li> </html:li> could be implemented using my probably awful syntax language(pasl)

<html:li>
     <html:div>
          <html:media type="image" src="dot.png"></html:media>[content]
     </html:div>
</html:li>

with [content] being replaced with the content of the tag.

I'm not sure how feasible this is, but it sure would be nice and would make for a far simpler browser implementation, more uniformity across browsers as well as a more flexible language in general.

Thoughts?

OscarGodson commented 10 years ago

Im not sure I fully understand. HTML6 has the idea of a small set of tags implemented by the browser. Are you talking about just div and lis? I'm not sure I see a point to div since every new tag would act just like a div already.

bayanr commented 10 years ago

I guess my focus here is more on the browser implementation than anything else. Simpler implementation means less surprises when putting things together and your html6 accounts for that apparently, forgive me for misunderstanding.

OscarGodson commented 10 years ago

@bayanr yeah, so the elements listed in the docs are the small set of ones implemented by the browser itself. For example: https://github.com/OscarGodson/HTML6#htmlbutton

That one the browser creates a button and handles all the stuff that goes with it (like pressing enter on it fires events, you can tab to it, etc)

bayanr commented 10 years ago

I don't understand, would actions specific to the button be handled by the browser internals, or would the event handler trigger events specified in the syntax facing the user?

OscarGodson commented 10 years ago

It would look and act exactly like a button element now

bayanr commented 10 years ago

That is the problem. While html is largely well defined there are a bunch of corner cases which are unaccounted for, a simple one being inline divs. Instead of defining each and every tag we can define a small set of generic tags and formally define the rest of html tags in terms of those.

OscarGodson commented 10 years ago

How is an "inline div" unaccounted for exactly? It seems like your describing HTML as it us now from my understanding.

cshaa commented 10 years ago

@bayanr Isn't this an easier way?

li{
 display: block;
}
ul, ol{
 display: list-item;
}
ul{
 list-style-type: disc;
 list-style-position: inside;
}
ol{
   list-style-type: decimal;
   list-style-position: inside;
}

CSS. No need for special tags.

HTML6 is beautiful because nothing is defined and you can define it yourself. If you're good, then your tags will be clearly defined and predictable.

cshaa commented 10 years ago

Ah, now I see. Shadow DOM is what you're searching for. And, yes, it's cool! See this article on HTML5Rocks.