Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| blocks:custom_styling [2023-03-16 13:47] – [Custom Styling with CSS] mattias | blocks:custom_styling [2026-01-19 09:47] (current) – Added note on non-latin fonts admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Custom Styling with CSS ====== | ====== Custom Styling with CSS ====== | ||
| - | As everything in Blocks is based on standard HTML5 web technologies, | + | As everything in Blocks is based on standard HTML5 web technologies, |
| + | |||
| + | There’s | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Find some mode examples of ready-made styles, fonts and associated test blocks found om our [[https:// | ||
| To apply custom styling, first create a CSS file, placing it under the //public// directory mentioned above under “Server Configuration”. CSS may be referenced and loaded in three different ways: | To apply custom styling, first create a CSS file, placing it under the //public// directory mentioned above under “Server Configuration”. CSS may be referenced and loaded in three different ways: | ||
| Line 8: | Line 16: | ||
| * Global CSS, automatically loaded onto all Spots in a system using the // | * Global CSS, automatically loaded onto all Spots in a system using the // | ||
| - | General and global CSS can be placed anywhere under the //public// directory. Avoid using a word processor or similar program to create this file, as it must be a plain text file. On MacOS you may want to use the free version of [[https:// | + | General and global CSS can be placed anywhere under the //public// directory. Avoid using a word processor or similar program to create this file, as it must be a plain text file. On MacOS you may want to use the free version of [[https:// |
| Block-specific CSS is placed inside a block' | Block-specific CSS is placed inside a block' | ||
| Line 154: | Line 162: | ||
| You can only apply a single style file to a block. This is specified at the root level of the block. To use styles from multiple sources, combine them all into a single CSS file. You can also apply a CSS file globally, making it available to all blocks without any additional effort. This is done using the // | You can only apply a single style file to a block. This is specified at the root level of the block. To use styles from multiple sources, combine them all into a single CSS file. You can also apply a CSS file globally, making it available to all blocks without any additional effort. This is done using the // | ||
| + | ==== Using non-Latin Fonts ==== | ||
| + | If your target audience speaks a language using non-latin characters, such as japanes or korean, you need to provide the relevant fonts containing those character sets. [[blocks: | ||
| ===== Globally Applied Classes ===== | ===== Globally Applied Classes ===== | ||