FireBrick Custom CSS: Difference between revisions
Appearance
Content deleted Content added
m Example split off, for greater visibility |
m →Base64-encoded data: line breaks - wording |
||
| Line 64: | Line 64: | ||
=== Base64-encoded data === |
=== Base64-encoded data === |
||
You may use base64-encoded data: URIs for safety and complete flexibility, as you will otherwise have to be aware of the risk of your inline CSS containing characters that are either prohibited in data URIs, illegal in quoted strings or in XML attributes. Just some examples are ", %, &, >, newlines and probably various others, but base64-encoding removes this problem completely. |
You may use base64-encoded data: URIs for safety and complete flexibility, as you will otherwise have to be aware of the risk of your inline CSS containing characters that are either prohibited in data URIs, illegal in quoted strings or in XML attributes. Just some examples are ", %, &, >, newlines and probably various others, but base64-encoding removes this problem completely. Note the presence of the comma after the keyword base64. This is essential in a data URI, even if base64 is not used. |
||
If you are using any non-ASCII characters in your CSS, you should use Unicode text and first UTF-8-encode your text into a byte stream, before then base64-encoding those bytes. You ''must'' then also declare that your original CSS text was UTF-8 as in the example below. In the following example, line-breaks may be included for readability. These must be removed and the whole string must be entered as a single line. |
|||
| ⚫ | |||
ZGl2Lm1lbnUgYXtmb250LXNpemU6eC1zbWFsbH19" |
|||
| ⚫ | |||
XYubWFpbixkaXYuc2lkZW1lbnUgZGl2Lm1lbnUgYXtmb250LXNpemU6eC1zbWFsbH19" |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
[[Category:FireBrick|Custom]] |
[[Category:FireBrick|Custom]] |
||