P2 styles clashing with MEJS media player
-
The design of the MediaElementJS audio / video player, which is included by default with WordPress since 3.6, is “broken” by the button styling of the P2 theme’s CSS.
To see the problem, simply insert an audio or video shortcode into one of your posts.
If you view it in a compatible theme, such as Twentyfourteen, the media player looks fine.
If you view it in P2, the player has some very weird, egg-shaped button styling. This happens because the CSS of P2 uses IDs as style selectors, like this:
#wrapper button { ... }
This code is overriding the audio player CSS, that uses classes:
.mejs-controls .mejs-button button { ... }
The best solution would be to refactor the P2 CSS, so that it relies on classes rather than IDs (classes are easier to override).
The easy and unelegant solution is to duplicate the MEJS button styles and add them to the theme stylesheet, together with the offending ID.
- The topic ‘P2 styles clashing with MEJS media player’ is closed to new replies.