Skip to Content
Test-Driven JavaScript Development
book

Test-Driven JavaScript Development

by Ravi Kumar Gupta
December 2015
Intermediate to advanced content levelIntermediate to advanced
240 pages
4h 57m
English
Packt Publishing
Content preview from Test-Driven JavaScript Development

Modernizr methods

Modernizr allows you to extend it by writing more tests and utilizing them to detect features of your choice. Along with that, there are methods available for testing CSS prefixes and media queries.

Modernizr.prefixed()

You might have seen CSS as in the following example:

    -moz-border-radius: 10px 10px;
    -webkit-border-top-left-radius: 10px;
    -webkit-border-top-right-radius: 10px;
    -webkit-border-bottom-right-radius: 10px;
    -webkit-border-bottom-left-radius: 10px;
    border-radius: 10px 10px;

The preceding CSS is to put radius on elements like div and so on. If you note, there are prefixes before border-radius or border-xxx-xxx-radius. These are called vendor or browser prefixes. The following table shows the browsers and their prefixes: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Test-Driven JavaScript Development

Test-Driven JavaScript Development

Christian Johansen
Front-End Development Projects with Vue.js

Front-End Development Projects with Vue.js

Raymond Camden, Hugo Di Francesco, Clifford Gurney, Philip Kirkbride, Maya Shavin, Dániel Szabó

Publisher Resources

ISBN: 9781782174929Supplemental Content