Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

"usemin" is not compiling images in css #605

Open
noortotah opened this issue Nov 16, 2015 · 3 comments
Open

"usemin" is not compiling images in css #605

noortotah opened this issue Nov 16, 2015 · 3 comments

Comments

@noortotah
Copy link

in my index.html

<!-- build:css({.tmp,client}) app/app.css -->
<!-- injector:css -->
<link rel="stylesheet" ng-if="!landing_page" type="text/css" href="assets/css/app.css">
 <link rel="stylesheet" ng-if="!landing_page" type="text/css" href="assets/css/icons.css">  
  <!-- endinjector -->
<!-- endbuild -->


<!-- build:css({.tmp,client}) app/landing.css -->
  <!-- injector:css -->
<link rel="stylesheet" ng-if="landing_page" type="text/css"  href="assets/css/landing.css">   
 <!-- endinjector -->
<!-- endbuild -->
  1. I can't find a way to add the ng-if to the compiled version ,
  2. also the usemin is not compiling the images inside the css files
@stephanebachelier
Copy link
Collaborator

@noortotah could you try the dev branch ?
We have move to an HTML parser so it should not remove attributes.

@eddiemonge
Copy link
Member

Thats probably not the best way to do that as you are loading the css after the JS has already run which means the css wont load until after your site is loaded and running. Your users will probably get FOUT which might not be a fast flash.

@stephanebachelier
Copy link
Collaborator

@eddiemonge good catch :)

@noortotah you should probably try another approach. There are other options to lazy load CSS files like filamentgroup/loadCSS or any other alternatives. In your case you need to have at least Angular to be injected in your page before applying the CSS file.

It might be helpful to have a third CSS file with all fonts and text styles to be loaded at first.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants