Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A more orthogonal HTML #29

Open
bayanr opened this issue Apr 9, 2014 · 9 comments
Open

A more orthogonal HTML #29

bayanr opened this issue Apr 9, 2014 · 9 comments

Comments

@bayanr
Copy link

bayanr commented Apr 9, 2014

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
Copy link
Owner

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
Copy link
Author

bayanr commented Apr 9, 2014

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
Copy link
Owner

@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
Copy link
Author

bayanr commented Apr 9, 2014

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
Copy link
Owner

It would look and act exactly like a button element now

@bayanr
Copy link
Author

bayanr commented Apr 9, 2014

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
Copy link
Owner

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

@cshaa
Copy link
Contributor

cshaa commented Apr 12, 2014

@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
Copy link
Contributor

cshaa commented Sep 16, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants