Jump to content

This is the support site for Andrews & Arnold Ltd, a UK Internet provider. Information on these pages is generally for our customers but may be useful to others, enjoy!

FireBrick Custom CSS: Difference between revisions

m
Headers added
m (Wording)
m (Headers added)
</syntaxhighlight>
 
== Internal inline CSS - using data URIs ==
To avoid having to use an external website, you can employ a "data:" uri. Be aware that there may be a limit on the length of URIs however. The following example greatly reduces the font sizes in use in the Firebrick's web pages -
 
To avoid having to use an external website to store your custom CSS, you can employ a "data:" uri. Be aware that there may be a limit on the length of URIs however. The following example greatly reduces the font sizes in use in the Firebrick's web pages -
 
<syntaxhighlight><http css-url="data:text/css,@media screen{div.main,div.sidemenu div.menu a{font-size:x-small}}" />
</syntaxhighlight>
 
=== 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. 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, a line-break has been added for readability. This must be removed and the whole string entered as a single line.
 
252

edits