Move inline styles into the stylesheet
Templates without inline CSS, styles cached.
Life cycle: Migrate, example 29 of 34. Worked out on the Fit & Healthy site of Exponential 6.0.15+.
Contents
In the Layouts editor
- Blocks with typed styles in HTML snippets: replace them too.
With templates
- Replace each
style=""by a class; add the rules tomysite.css; list the file in your extension'sdesign.ini([StylesheetSettings] FrontendCSSFileList[]=mysite.css).
Which to choose
One stylesheet, no inline CSS.
Check
- No
style=left in your templates.
Related pages
- Styling your blocks
- Migrate examples, every page
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.