WordPress.org

Make WordPress Core

#35921 closed defect (bug) (fixed)

wp_enqueue_style media

Reported by: camaran Owned by: ocean90
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: Script Loader Keywords: has-patch
Focuses: docs Cc:

Description

wp_enqueue_style support:
'all',
'aural' - Deprecated.,
'braille' - Deprecated.,
'handheld' - Deprecated.,
'projection' - Deprecated.,
'print',
'screen',
'tty' - Deprecated.,
'tv' - Deprecated.
it's possible to support media query

Attachments (1)

35921.patch (2.3 KB) - added by ocean90 19 months ago.

Download all attachments as: .zip

Change History (5)

#1 @ocean90
19 months ago

  • Component changed from General to Script Loader
  • Keywords reporter-feedback added

Hello @camaran, could you please explain in a few more words about what you want to enhance?

#2 @camaran
19 months ago

for example

<link rel="stylesheet" media="(max-width: 640px)" href="max-640px.css">
<link rel="stylesheet" media="(min-width: 640px)" href="min-640px.css">
<link rel="stylesheet" media="(orientation: portrait)" href="portrait.css">
<link rel="stylesheet" media="(orientation: landscape)" href="landscape.css">

for example these support

Last edited 19 months ago by camaran (previous) (diff)

#3 @ocean90
19 months ago

  • Focuses docs added
  • Keywords has-patch added; reporter-feedback removed
  • Milestone changed from Awaiting Review to 4.5
  • Type changed from enhancement to defect (bug)
  • Version 4.4.2 deleted

Yes, media queries are supported. 35921.patch updates the docs and adds unit tests.

@ocean90
19 months ago

#4 @ocean90
19 months ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 36649:

Styles: Clarify the allowed values for the $media parameter of wp_register_style()/wp_enqueue_style().

Adds unit test.

Fixes #35921.

Note: See TracTickets for help on using tickets.