Problem/Motivation

The class media--view-mode- is always showing up empty when inspecting the DOM around an embedded media entity.

Proposed resolution

view_mode.id() is always empty in the Media entity Twig template. Replace it with just view_mode

Core media.html.twig template indicates one of the available variables is view_mode.

/**
 * @file
 * Default theme implementation to present a media item.
 *
 * Available variables:
 * - view_mode: View mode; for example, "teaser" or "full".

Remaining tasks

User interface changes

API changes

Data model changes

Comments

jwilson3 created an issue. See original summary.

  • jwilson3 committed c7826fe4 on 2.1.x
    Issue #3346326 by jwilson3: Broken view_mode css class on media entities
    
jwilson3’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.