WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#10618 closed defect (bug) (invalid)

Conditionnal IE CSS not possible for plugins

Reported by: arena Owned by:
Milestone: Priority: low
Severity: normal Version: 2.8.4
Component: Administration Keywords:
Focuses: Cc:

Description

due to a specific test in WP_Styles

 if ( $this->in_default_dir($this->registered[$handle]->src) &&  ...

it is not possible to have IE specific css for plugins?

Change History (6)

comment:1 follow-up: CalebKniffen5 years ago

Couldn't you use the print_styles hook?

comment:2 in reply to: ↑ 1 arena5 years ago

  • Priority changed from normal to low

Replying to CalebKniffen:

Couldn't you use the print_styles hook?

Well sure i can do it on my own.

Anyway for my specific need i changed the layout of the admin page. new layout is ok under all browsers

comment:3 arena4 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

comment:4 scribu4 years ago

  • Milestone changed from Unassigned to Future Release
  • Resolution wontfix deleted
  • Status changed from closed to reopened

comment:5 scribu4 years ago

Don't confuse 'wontfix' with 'haven't gotten around to this ticket yet'.

comment:6 azaozz4 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

This seems to work well:

  wp_enqueue_style('my-style', WP_PLUGIN_URL . '/my-plugin/style.css', ... );
  global $wp_styles;
  $wp_styles->add_data( 'my-style', 'conditional', 'lte IE 7' );
Note: See TracTickets for help on using tickets.