I think it might be more flexible to avoid selectors like div.site-alert in preference of .site-alert. This allows more flexibility in the choice of element in custom templates and lowers the specificity of the module's base styling. I haven't supplied a patch, but happy to do so if there's interest.

Thanks!

CommentFileSizeAuthor
#4 element_selector-3154945-4.patch1020 byteslisotton

Comments

AndyF created an issue. See original summary.

jwilson3’s picture

100% agree. This in theory is an easy thing to fix in the CSS with minimal impact.

pcate’s picture

Yes, the extra specificity of the element selector is not needed and makes it harder to customize the styling. I'm happy to make a patch if the module maintainers are open to the change.

lisotton’s picture

Status: Active » Needs review
StatusFileSize
new1020 bytes

Hi, here is a patch for that.

pcate’s picture

Patch applied and updated CSS as described. Did not see any visual changes.

pcate’s picture

Status: Needs review » Reviewed & tested by the community

  • pfrenssen committed f46e1ef on 8.x-1.x authored by lisotton
    Issue #3154945 by lisotton, PCate: Avoid element CSS selectors
    
pfrenssen’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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