Opened 13 years ago
Closed 13 years ago
#24568 closed feature request (duplicate)
Modernizr a part of WordPress?
| Reported by: | Looimaster | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | External Libraries | Version: | 3.6 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
I think that Modernizr is currently the best and highly useful library for detecting browser features. Something as useful as jQuery or Iris Colorpicker.
Shouldn't it become a part of WordPress? Many plugins and themes add it and developers need to use "function_exists" checks to prevent conflicts.
Having:
<script>
if ( Modernizr.touch ) {
}
</script>
instead of for instance:
<?php
if ( wp_is_mobile() ) {
}
?>
would be great!
Change History (4)
#4
@
13 years ago
- Component General → External Libraries
- Milestone Awaiting Review
- Resolution → duplicate
- Status new → closed
Duplicate of #23739.
jQuery and Iris Colorpicker are both used in core. Modernizr not.
If Modernizr should be used in core, then there should be a discussion first, which explains the benefits of using Modernizr instead of our current feature detection.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
And also in case of CSS styling I can think of many advantages:
.touch .element { display: none; }