I am trying to develop a minimal theme, where all styling is done through CSS. I have created a file
custom.css and a file
rules.xml, the latter having the following content:
<?xml version="1.0" encoding="UTF-8"?> <rules xmlns="http://namespaces.plone.org/diazo" xmlns:css="http://namespaces.plone.org/diazo/css" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <rules css:if-content="#visual-portal-wrapper"> <after css:content-children="head"> <link rel="stylesheet" type="text/css" href="custom.css" /> </after> </rules> </rules>
The problem is that the
link element is inserted into the resulting HTML verbatim. As a result, the path of the CSS file is considered to be the path of the web page, which is wrong. When using relative paths in a theme (HTML) file, the correct paths are generated by Plone, but apparently, this does not happen when relative paths are used in the rules file like in the above example. How can I make Plone generate the correct path?