WordPress.org

Ready to get started?Download WordPress

Forums

modernizr and/or normalize for html5reset theme? (2 posts)

  1. cmegown
    Member
    Posted 2 years ago #

    Firstly, I'm building a framework based off the HTML5Reset theme and I want to optimize it for browser support for HTML5 & CSS3. I've used Normalize before, but not Modernizr, and my question is:

    Is it wise to use both? If so, which one do I call before the other? If not, which one would be more beneficial?

    Any helps and/or tips would be greatly appreciated :) Thank you in advance!

  2. saltlakejohn
    Member
    Posted 1 year ago #

    normalize.css equalizes the styling of certain HTML elements that show up in varying ways from one browser to another. For instance,

    q {
        quotes: "\201C" "\201D" "\2018" "\2019";
    }

    will force all major browsers to quote in an identical way (American style). Of course, you may set that to match whatever you prefer. (English style,"\2018" "\2019" "\201C" "\201D") Don't use a reset stylesheet at all when you use normalize, but do add stylings of your own for your theme enhancements. It's a simple, short bit of CSS, commented and well-documented.

    modernizr.js looks at browser capabilities. It "detects features" available in every browser hits that page. modernizr plants that information in the <html> tag at the top of each page and shows it as classes for you to style in your CSS stylesheet. For instance, <html class="borderradius boxshadow"> if a browser hitting that page has those 2 capabilities. It is a powerful, read "complex", program. I have over-simplified here; it checks many features. Read a good 2010 article at A List Apart. Use modernizr.js last thing in the <head> section, placing a link to it just before the closing </head> tag.

Topic Closed

This topic has been closed to new replies.

About this Topic