Multiple CSS files

Support Ticket

+status
answered
 
+issue

It would be fantastic if you could create additional css files (aside from *css) to use.

A "CSS" card type would do the trick nicely: if wagn allowed .css extensions (which it currently doesn't), just set the card type to 'css', and have no layout applied to it at all - just the css.

 

 
expand_less +discussion

You can actually add additional css files as is.

 

The reason wagn doesn't allow .css extensions in cardnames is because it does support the CSS format.  You can append formats to cardnames to have them render in that format.

 

For example, take the *css.  Notice how it behaves for each of these:

The .css version looks a lot like the text version, but it renders with the correct mime type.
 
At present, if you want to use another card as a css card, the natural way to do it is to create an HTML card (I know that's odd, but the point is that HTML cards don't get filtered at all) and then include it directly from your layout.  Out of the box, the head tag in the default layout looks like this:
  <head>
    {{*head}}
  </head>

You can add tags to include any additional css that you want there.

 

None of this is to say that we shouldn't go with your idea to create a CSS type.  It would be great to have CSS parsers and less geeky ways to add stylesheets to a given format.  We're hoping to make it much easier to add skins and tweak existing CSS very soon.

 

But if you're willing to go the geeky way, I hope this will get you unstuck.

 


note: CSS cards can now also be PlainText -- this leads to cleaner rendering.

  --Ethan McCutchen.....Fri Mar 23 21:48:13 +0000 2012