GithubHelp home page GithubHelp logo

h5bp / html5-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
55.9K 2.5K 12.2K 21.92 MB

A professional front-end template for building fast, robust, and adaptable web apps or sites.

Home Page: https://html5boilerplate.com/

License: MIT License

HTML 16.40% JavaScript 83.60%
html5-boilerplate html5 robust javascript css best-practices html

html5-boilerplate's People

Contributors

adeelejaz avatar alrra avatar arthurvr avatar chuanxshi avatar coliff avatar darktable avatar dependabot[bot] avatar drublic avatar git2samus avatar gmoulin avatar greenkeeperio-bot avatar h5bp-bot avatar jbueza avatar joemorgan avatar kblomqvist avatar leocolomb avatar mathiasbynens avatar mattyclarkson avatar mdonoughe avatar meleyal avatar mikealmond avatar mikeescobedo avatar necolas avatar paulirish avatar richienb avatar rigelglen avatar roblarsen avatar vltansky avatar wraithkenny avatar xhmikosr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

html5-boilerplate's Issues

mobile stylesheet include

i'm not sure on the best way to serve this..

from:
http://www.cssquirrel.com/presentations/refresh-2009-12/

<link rel="stylesheet" href="mobile.css" media="handheld, screen and (max-device-width: 480px)" type="text/css" />
(Since the iPhone Thinks It's a Big Boy)


<link rel="stylesheet" href="mobile.css" media="handheld, only screen and (max-device-width: 480px)" type="text/css" />
(To Help An Anonymous Quirky Browser So It Won't Think It's Mobile)


<link rel="stylesheet" href="mobile.css" media="handheld, only screen and (max-device-width: 480px)" type="text/css" />
<meta name="viewport" content="width = 320" />
(So The iPhone Won't Be Zoomed Out)


Here's A Solution
<link rel="stylesheet" href="standard.css" media="screen and (min-device-width: 481px)" type="text/css" />
<link rel="stylesheet" href="mobile.css" media="handheld, only screen and (max-device-width: 480px)" type="text/css" />
(Option To Override With JS-Powered Switch)
(Save It With A Cookie)

Documentation: How to use Boilerplate effectively

Talking to some folks, I come to realize the templates definitely could use some documentation.
I'm going to just keep updating the content of this ticket, if anyone has anything to add, comment.

  • What is htaccess and what does it do?
  • What is Modernizr and what does it do?
  • What do I have to do when I updated my images, css, or js?
    • If you're not using the apache .htaccess, you're fine. Otherwise.. there is fairly moderate caching on the static assets so users don't redownload them every pageload. As a result, you'll have to increment the ?v=1 to 2 and beyond each time you push the changes live to your host. (This will be addressed automatically in the future with a build script)
  • What's going on in plugins.js?
    ** Hypothetically you'd put your jquery plugins inside of the (function($){ ... })(jQuery) block. This is good incase the plugin developers didn't write their plugins well.

apache syntaxhighlighter brush

Right now on the site http://html5boilerplate.com - the entire htaccess section is pretty ugly looking. This is because there is no "brush" for the syntax highlighter script we're using.

http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/

It would be pimp to have a real brush so the section would come off looking pretty good.

Anyone would regex smarts could tackle this in an hour or so.
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/custom.html

javascript and css versioning

Since you are using such far-future expires headers for caching in the .htaccess file should you not be using a format to version your css and javascript files.

Such as the "script.js?v=1.0" or similar example in the .htaccess file

a name!

freestylehtml
thestartingtemplate
sensible markup
the markup zygote
website embryo

"an un-framework"

button padding in ff

button::-moz-focus-inner {border: none; /* overrides extra padding in Firefox */}

mobile/iOS css revisions

(I have revised this ticket summary after the issue has been fixed for clarity)

  • Scott jehl was concerned with maximum scale = 1
  • @riddle posted a few concerns as well.. "No scaling, no text adjustment?"

After discussions with Matt Henry, a front-end dev mobile expert, recently from Yahoo!, now at Viget...
We concluded to drop maximum-scale=1 and leave text-size-adjust commented out by default.

max-scale doesnt let the user zoom in as they please. However it prevents some weird layout shifting when a device is changed from portrait to landscape. It doesn't seem like a good default.

initial-scale remains 1. It's default is 'auto' and I have no understanding why a mobile browser would set it to anything other than 1, but it's explicitly set for now..

Also.. worth watching http://people.opera.com/rune/TR/css-viewport/ (though it's unimplemented anywhere so far)

launch todos

DONE:

  • header/footer elements.
  • clarify license
  • contributors section (and inspired by ish) - we'll include html5reset
  • rename github repo

TODO:

  • create non-documented release zip
  • name that non-documented release.. (ideas?)
  • write post
  • contact homies

webm

Add WebM to the .htaccess file:
AddType video/webm webm

thx Kenneth D. Nordahl

Optimize fallback to local jQuery (screw `unescape`!)

It's awesome you've added a fallback jQuery in case Google’s CDN goes down. Currently, you're using the following code:

<script>!window.jQuery && document.write(unescape('%3Cscript src="js/jquery-1.4.2.min.js"%3E%3C/script%3E'))</script>

You might be able to save a few precious milliseconds by getting rid of the unescape() call and using string literal escapes (\xNN) instead.

<script>!window.jQuery && document.write('\x3Cscript src="js/jquery-1.4.2.min.js"\x3E\x3C/script\x3E')</script>

miketaylr's feedback

Notes on Paul Irish's starter template.

Mike Taylor
11/08/2009

  • meta name=keywords? I'm no SEO wizard, but I tend to still use this guy in conjunction with meta name=description.
  • using HTML5 doctype and a html5 shiv script for IE, yet <div id=header>, <div id=footer>.
    Why not <header> & <footer>? Although I can understand if you don't want to force people to go server-side to fix FF2.
  • How is<html lang=en> different from <meta http-equiv="content-language" content="en">? There might be something I'm not aware of here.
  • In html5, <script type> defaults to text/javascript if not present. So, you can leave it out if you want to live in the future. I don't know if there are any real-world consequences to doing so today.

http://www.whatwg.org/specs/web-apps/current-work/#script
'(The default, which is used if the attribute is absent, is "text/javascript".)'

  • Remy's html5 enabling script is a little out of date--<dialog> is no longer in the spec, nor is <eventsource>. (There are naturally more new elements in the spec, but I can't imagine you'd try to style a element, for example.)
  • In script.js small typo:

//common domready code => common domready code

  • In script.js FOO.config and FOO.strings could use some simple explanatory comments to explain why they're in there.
  • In reset.css:
    • dialog can be removed from lines 21 and 36.
    • Line 32 of the html5 reset stylesheet (body{line-height:1} is essentially getting overwritten by line 109 (yui's body * {line-height:1.22em}, right? Or would there be some meaningful reason to have body at 1 but all of body's descendants at 1.22em? If not, 32 could be removed.
    • Shouldn't line 121 also include .ie6? i.e., .ie6 img, .ie7 img {-ms-interpol...;}
    • A few missing ending semi-colons: line 129, 140, 151, 152
    • If you were crazy like i am, you could change line 144 -> color: #003366 -> color: #36.

Vary and Last-Modified headers

via aaron peters at http://html5boilerplate.com/#comment-67835184

You can further improve browser and proxy caching, and thus page performance:

  1. To ensure proxy caching of CSS and JS files, ensure you send the Vary: Accept-Encoding response header as well (not just the Cache-control: public header), if you send them Gzipped.

http://code.google.com/speed/page-speed/docs/caching.html#LeverageProxyCaching

  1. Send the Last-Modified header, to enable browser to make conditional requests and enable the server to send a (small, fast) 304 response.
    Set the Last-Modified date to the last time the resource was changed.

http://code.google.com/speed/page-speed/docs/caching.html#LeverageBrowserCaching

Arial and Helvetica vs just sans-serif

From Comment on html5boilerplate.com: http://html5boilerplate.com/#comment-67622441

Key Points:

In general Arial is a better screen font than Helvetica being developed for the screen in the first place. More pressing problem is that Helvetica on Windows does not render well at all and you don't want to ignore the majority of your audience ;) - http://html5boilerplate.com/#comment-67626905

This is very true - Helvetica on Windows looks awful. But can't this be solved by simply using sans-serif as the first font-face? I'm pretty sure that will default to Helvetica on Macs and Arial on Windows. - http://html5boilerplate.com/#comment-67654932

.htaccess some comments cause errors

these 2 comments cause err500 (for me at least)

ExpiresByType image/vnd.microsoft.icon "access plus 1 week" #favicon.ico

and

FileETag Size #can this be moved outside of the Location block?

placing the comments on separate lines solves the issue

outline styling for accessibility.

from patrick lauke, who did the research:

@paul_irish @jared_w_smith i'd actually remove a:focus { outline: thin dotted; } as you're not suppressing it for generic a

@paul_irish @jared_w_smith and replace a:active { outline: none; } with a:hover, a:active { outline: none; } perhaps?

script loading solution




# This issue thread is now closed. ## It was fun, but the conversations have moved elsewhere for now. Thanks ### In appreciation of the funtimes we had, @rmurphey made us a happy word cloud of the thread.

Enjoy.





via labjs or require.

my "boilerplate" load.js file has LABjs inlined in it, and then uses it to load jquery, GA, and one site js file. if it helps, I have an integrated RequireJS+jQuery in one file: http://bit.ly/dAiqEG ;)

also how does this play into the expectation of a build script that concatenates and minifies all script? should script loading be an option?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.