If you whan to use FontAwesome 5 in pseudo elements, for example in a CSS like:

ul > li::before {
  font-family: "Font Awesome 5 Regular";
  content: "\f0da";
}

You need to enable pseudo elements because is disabled by default:

window.FontAwesomeConfig.searchPseudoElements = true;

Ideally we can add a new checkbox in settings to enable pseudo-elements (admin/config/content/fontawesome).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oriol_e9g created an issue. See original summary.

Daniel.Moberly’s picture

Title: Add the searchPseudoElements: true/false setting » CSS with Webfonts doesn't allow pseudo elements
Status: Active » Needs review
FileSize
3.5 KB

Attaching patch to allow pseudo elements in CSS. This adds a setting to the config form.

  • Daniel.Moberly committed 1d92c7c on 8.x-2.x
    Issue #2942653 by Daniel.Moberly: CSS with Webfonts doesn't allow pseudo...
Daniel.Moberly’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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