==========
Attributes
==========
There are possible scenarios when a transformation into another format will require new attribute values. [#]_
.. highlight:: html
::
.. code-block:: json
:caption: JSON
{
"selector": "link[rel=alternate]",
"type": "css",
"filename": "prod.css",
"download": true, // Required when rel="alternate"
"hash": "md5", // prod-8ba5cde2c04d6628dd6b0d62b0a3cac9.css
"attributes": {
"rel": "stylesheet",
"type": "text/css",
"title": "",
"disabled": null,
/* SRI */
"integrity": "sha512", // CORS required (sha256 | sha384 | sha512)
"crossorigin": "anonymous"
},
"process": ["compile"]
}
.. code-block::
:caption: Inline
.. code-block::
:caption: Output
You can also use the workspace feature in `squared-express `_ to precompile any text format and stream the transformed output directly into the source.
.. [#] Setting an attribute to "undefined" will remove it from the HTML output.
.. [#] Tags that are not well-formed may fail to be replaced. (e.g. CSS properties with embedded "}")