WordPress / twentytwenty

Twenty Twenty is included in Core as of WordPress 5.3 🎉 To report any issues, please go here: https://core.trac.wordpress.org/newticket
Other
301 stars 140 forks source link

doctype uppercase to lowercase #981

Closed bappi closed 5 years ago

bappi commented 5 years ago

There's no reason for the uppercase doctype. It was discussed and committed to _s repo also

pattonwebz commented 5 years ago

Hey @bappi thanks for opening this PR. I looked into the discussion on _s repo you mentioned and followed up on a few connected issues/merges elsewhere and still I am not sure if there are many compelling reasons to change this.

It is case-insensitive at specification level and the primary reasons I found for swapping to lowercase are about possible compression improvements - theoretically the lowercase characters are more common throughout the majority of documents and thus there is potential for fractions of bytes to be saved.

I don't see that there's a real benefit to swapping this or any major downside to keeping uppercase. Are there other things I am missing about the swap?

bappi commented 5 years ago

There aren't any major things about it, the thing is it's becoming more common to use lowercase doctype in all other places.

So we should consider this to keep the flow.

pattonwebz commented 5 years ago

Understood, thanks for the explanation. I was worried I had missed something when I looked it up.

Looking at some other themes I see that it is becoming more common to user lowercase. I do not have a preference either way. This could be merged if nobody objects.

CC: @ianbelanger79 @andersnoren @carolinan for any farther discussions if needed.

nielslange commented 5 years ago

Apparently, DOCTYPE was case-sensitive up to XHTML 1.1, and is case-insensitive since HTML5. That said, I created a small list to highlight which site is following which convention:

https://apple.com/ <!DOCTYPE html>
https://cnn.com/ <!DOCTYPE html>
https://developer.mozilla.org/ <!DOCTYPE html>
https://github.com/ <!DOCTYPE html>
https://hackerone.com/ <!DOCTYPE html>
https://medium.com/ <!doctype html>
https://microsoft.com/ <!DOCTYPE html>
https://techcrunch.com/ <!DOCTYPE html>
https://wordpress.com/ <!DOCTYPE html>
https://wordpress.org/ <!DOCTYPE html>

Based on these stats and due to legacy reasons, personally I would stick to <!DOCTYPE html>.

ianbelanger79 commented 5 years ago

I agree with @nielslange, we should leave it as-is for now. Closing this PR as wontfix