HTML and CSS Reference
In-Depth Information
Search box styling
When you set the type of an input element to search, all WebKit browsers like Safari,
Chrome, Mobile Safari, and soon, add UI chrome, which is difficult to style. HTML5
Boilerplate comes with a set of styles that normalize the look and feel of the search
box across all browsers while also making it easy to style.
Conditional classes
The index.html page comes with a set of classes on the HTML element that
makes it easy to tweak your styles for IE versions below 9.
Modernizr is a JavaScript library that tests for the existence of HTML5 technologies
and outputs a set of classes on the HTML element based on their presence or ab-
sence in the browser that is loading your website. For example, if a browser lacks
support for border radius, Modernizr outputs the class no-borderradius , while
on browsers that support border radius, it will output the class borderradius . A
custom build of Modernizr is included within Boilerplate.
Learn more about developing with Modernizr from their documentation at ht-
tp:// and this slide deck at
chaelenslow/its-a-mod-world-a-practical-guide-to-rocking-modernizr is a good in-
troduction to using Modernizr.
No console.log errors
Oftentimes, when working in modern browsers, you tend to use the console.log
function to debug your JavaScript code. How many times have you forgotten to re-
move them or comment them out in production, only to find them throwing errors in
Internet Explorer or other browsers that do not support the use of this function? You
can safely use the log function included within the plugin.js file to log statements
only in browsers with tools that support it.
Search WWH ::

Custom Search