XF 2.1 xf:css folder location versus xf:js

Wutime

Well-known member
I'm trying to include an xf:css resource and not having much luck.

I've tried placing my stylesheet in /_files/css and /_files/styles but can't get my stylesheet to load with:

<xf:css addon="Wutime/MyPluginName" src="stylesheet.css" min="1"></xf:css>

For <xf:js> the above would work without a problem.

I see when viewing source that it is including stylesheet.css but the contents are empty.

Any ideas?
 
Oh, maybe this only works for named templates of the .less variety

Which makes me wonder how we include relative .PNG's in our CSS file
 
xf:css tags must reference the name of a template and cannot reference an external file.
 
xf:css tags must reference the name of a template and cannot reference an external file.

Okay,thank you. What if we need to link to the relative location of an image file? Where/how do we call on to a local object in the CSS styles to ensure the addon when loaded finds the proper location of the file (example, PNG map).

Example:

.my-sprite { background-image: url(mysprite.png); }
 
Back
Top Bottom