speedata / publisher

speedata Publisher - a professional database Publishing system
https://www.speedata.de/
GNU Affero General Public License v3.0
302 stars 36 forks source link

Documentation of Stylesheet usage/support #41

Closed MDeutschmann-Imperia closed 10 years ago

MDeutschmann-Imperia commented 10 years ago

Is there any documentation of Stylesheet definitions supported by elements using the "class" attribute like "Absatz"? Maybe i missed something in the reference/documentation section. (Even a shortcode to the related source-code in repo may help.)

Best regards M. Deutschmann

pgundlach commented 10 years ago

This currently not documented and perhaps a bit experimental, but I expect it to stay and extend in the future.

See: https://github.com/speedata/publisher/blob/develop/src/lua/publisher/commands.lua#L1507-L1508

Example: style.css:

.hello {
    color: red;    
}

and the layout.xml:

<Layout xmlns:sd="urn:speedata:2009/publisher/functions/de"
  xmlns="urn:speedata.de:2009/publisher/de">

  <Stylesheet dateiname="style.css"/>
  <DefiniereFarbe name="red" wert="#F00"/>

  <Datensatz element="data">
    <ObjektAusgeben>
      <Textblock>
        <Absatz class="hello">
          <Wert>Hallo Welt</Wert>
        </Absatz>
      </Textblock>
    </ObjektAusgeben>    
  </Datensatz>
</Layout>
MDeutschmann-Imperia commented 10 years ago

Thanks a lot for the example and the sourcecode deeplink!

pgundlach commented 10 years ago

This feature is not finished (obviously) - it was primarily a proof of concept. a) it should have more css features and b) some attributes need renaming / mapping to css names.