You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Picture uses the TACC template override logic that hoists instance.attributes_strto <a> or to <figure>, child templates cannot reliably add a separate class on <img> for the img-only case.
video.of.portal-logo.class.bug.issue.GH-1185.mov
State
Header logo1 needs portal-logo on <img>. Though Core-Stylessupports logo having link and not having link (i.e. <img>-only markup), Core-CMSfails to add class="portal-logo" to <img> when logo has no link (or no caption).
Linked header logos (default: home page link) are unaffected.
Cause
taccsite_cms/templates/djangocms_picture/default/picture.html hoists plugin attributes to the parent when link, caption, default caption, or child plugins exist. Otherwise attributes render on <img>. A second class="portal-logo" via picture_attributes_img duplicates class on <img> when attributes are not hoisted; browsers keep one value, so portal-logo is lost.
Reproduction
Header logo plugin with portal_logo picture template.
Problem
When a Picture uses the TACC template override logic that hoists
instance.attributes_strto<a>or to<figure>, child templates cannot reliably add a separateclasson<img>for the img-only case.video.of.portal-logo.class.bug.issue.GH-1185.mov
State
Header logo1 needs
portal-logoon<img>. Though Core-Styles supports logo having link and not having link (i.e.<img>-only markup), Core-CMS fails to addclass="portal-logo"to<img>when logo has no link (or no caption).Linked header logos (default: home page link) are unaffected.
Cause
taccsite_cms/templates/djangocms_picture/default/picture.htmlhoists plugin attributes to the parent when link, caption, default caption, or child plugins exist. Otherwise attributes render on<img>. A secondclass="portal-logo"viapicture_attributes_imgduplicatesclasson<img>when attributes are not hoisted; browsers keep one value, soportal-logois lost.Reproduction
portal_logopicture template.<img class="… portal-logo">(or equivalent).portal-logoon<img>.Context
Footnotes
portal_logotemplate +HeaderLogoPlugin↩