Path to mime-type .png's is incorrect

Created on 14 September 2024, 4 days ago
Updated 17 September 2024, 1 day ago

Problem/Motivation

I found this in CSS, but my files are located at /mysite/web/themes/contrib/bootstrap/images/icons/application-pdf.png

Path is incorrect:

.file--application-pdf {
    background-image: url(/themes/contrib/bootstrap/images/icons/application-pdf.png);
}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs work

Version

5.0

Component

Code

Created by

🇩🇪Germany marc.bau

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @marc.bau
  • 🇩🇪Germany marc.bau

    Replacing /themes/contrib/bootstrap/images/ with ../../images/ works in both uncompressed and compressed CSS.

  • 🇩🇪Germany marc.bau

    I also suspect (not tested) that the SASS subtheme also has a bug about this as ../../contrib/bootstrap/ looks incorrect to me.

  • 🇩🇪Germany marc.bau

    Still broken

  • Status changed to Closed: works as designed 1 day ago
  • 🇵🇪Peru hatuhay Lima

    For css subtheme there is no 100% working definition as it will depend os specific folder structures.
    On scss subthemes a variable is set to allow customizations.
    In your case and any other folder structures different from theme's "standard" path should be customized on subtheme's css

  • Status changed to Needs work 1 day ago
  • 🇩🇪Germany marc.bau

    I'm sorry, but this is not correct.

    In the bootstrap theme you need to replace /themes/contrib/bootstrap/images/icons/application-pdf.png with ../../images/icons/application-pdf.png (relative to the CSS files that references the images) and it works all times with both css aggregation and without.

Production build 0.71.5 2024