DEV: Add alternative to `asset-uri` and `image-uri` in SCSS (PR #12664)

Rails’ asset pipeline appends a hash to files in /app/assets, including images. To use these images in SCSS, we need to add special functions to the SCSS compiler for asset-uri and image-uri so that the SCSS compiler can correctly reference the files. The problem is that this forces us to use a SCSS compiler that supports custom functions. Currently, it ties us to SassC.

This PR adds a new function, absolute-image-url that allows us to safely reference images in /public/images in SCSS. If the site uses CDNs for assets or is on a subfolder, a public_image_path SCSS variable is injected before compilation, so that the correct URL is used. If that variable is missing, the SCSS still compiles (which is helpful for compiling SCSS without loading the app).

This PR also:

  • deletes some old files in favicons (assets used by select2, which was removed in 2018)
  • updates spec references to /assets/favicons/wikipedia.png (no longer in repo)
  • adds deprecation notices for asset-uri and image-uri

GitHub

Great stuff! :heart: