Adobe-Marketing-Cloud / aem-guides-wknd

Steps to create a website with Adobe Experience Manager (AEM)
https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-wknd-tutorial-develop.html
76 stars 68 forks source link

Google font @import not loaded at the top #25

Closed godanny86 closed 6 years ago

godanny86 commented 6 years ago

The @import is not loaded at the top of clientlib-base.css thus not requesting the google fonts. Need to re-work the order of how the client libraries are loaded.

Thanks @justinedelson for reporting!

justinedelson commented 6 years ago

Here's how I worked around this problem:

  1. Create a separate clientlib at /apps/wknd/clientlibs/clientlib-font with the category wknd.font

  2. Create a css file in this clientlib with just these two lines:

    @charset "UTF-8"; @import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600|Asar');

  3. Remove those lines from /apps/wknd/clientlibs/clientlib-site/main.less

  4. add wknd.font as the first embed in /apps/wknd/clientlibs/clientlib-base

Not sure this is the best thing to do as it is a little awkward.

godanny86 commented 6 years ago

Fixed with https://github.com/Adobe-Marketing-Cloud/aem-guides-wknd/pull/26/files