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

diet doesn't allow boolean attributes without value in HTML5 #475

Closed
MartinNowak opened this issue Jan 21, 2014 · 9 comments
Closed

diet doesn't allow boolean attributes without value in HTML5 #475

MartinNowak opened this issue Jan 21, 2014 · 9 comments

Comments

@MartinNowak
Copy link
Contributor

I wanted to get <textarea autofocus></textarea>, so I tried textarea(autofocus) in the diet template but that results in <textarea autofocus="autofocus"></textarea>.

http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#boolean-attribute

@s-ludwig
Copy link
Member

I don't find the discussion now, but people have expressed the desire for this behavior for better backwards compatibility with non-HTML 5 conformant browsers.

Maybe a global run time switch makes sense to force the short version?

@MartinNowak
Copy link
Contributor Author

Couldn't we use the !!! 5 tag for this decision?
It's not very important though.

@nazriel
Copy link
Contributor

nazriel commented Feb 8, 2014

@s-ludwig: yeah, can we use doctype to determine it?

Btw, Jade wants to deprecate the !!! tag in favor of doctype tag, are we going to do the same?

@MartinNowak
Copy link
Contributor Author

If the doctype is html jade knows not to mirror the attribute and uses the terse style (understood by all browsers).

http://jade-lang.com/reference/#booleanattribs

@s-ludwig
Copy link
Member

s-ludwig commented Feb 9, 2014

Yes, supporting HTML doctypes < 5 + dropping the mirroring on 5 sounds like a reasonable solution. Then everyone can decide for himself if backwards compatibility with non-HTML 5 browsers is needed or not.

@nazriel
Copy link
Contributor

nazriel commented Feb 9, 2014

Fix: #512

nazriel added a commit to nazriel/vibe.d that referenced this issue Feb 10, 2014
s-ludwig added a commit that referenced this issue Feb 12, 2014
Fix issue #475: diet doesn't allow boolean attributes without value in H...
@nazriel
Copy link
Contributor

nazriel commented Feb 13, 2014

@s-ludwig I guess we can close it now?
Or there is still something to improve?

@s-ludwig
Copy link
Member

Right, no I think it should be fine now.

@MartinNowak
Copy link
Contributor Author

Nice, thanks guys.

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