Required.svg should be a relative URL

Created on 19 July 2023, over 1 year ago
Updated 12 October 2023, about 1 year ago

Problem/Motivation

In css/components/form.css there is:

form-required::after {
  content: '';
  vertical-align: super;
  display: inline-block;
  background-image: url(/themes/bootstrap_barrio/images/required.svg);
  background-repeat: no-repeat;
  background-size: 7px 7px;
  width: 7px;
  height: 7px;
  margin: 0 0.3em;
}

Which on most systems probably works, but in our case we have a different folder structure.

Steps to reproduce

Change the folder structure for your themes and required.svg will create a 404 issue

Proposed resolution

Change the code to:

form-required::after {
  content: '';
  vertical-align: super;
  display: inline-block;
  background-image: url(../../images/required.svg);
  background-repeat: no-repeat;
  background-size: 7px 7px;
  width: 7px;
  height: 7px;
  margin: 0 0.3em;
}

This creates a relative path to the existing path and then doesn't rely on the hard-coded folder structure. Maybe we need to check elsewhere to see if this is a similar situation.

🐛 Bug report
Status

Fixed

Version

5.5

Component

Code

Created by

🇨🇦Canada ShaneOnABike

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

Comments & Activities

Production build 0.71.5 2024