Skip to content

UI Skinning and Mobile View

Heisenbug edited this page Mar 5, 2026 · 1 revision

Home · Start Here · Reference Map

At a glance

  • CSF UI supports limited customization via injected header/body/footer fragments.
  • Additional <html> / <body> tag injection points exist (Webmin-only behavior).
  • Mobile view uses a ~600px breakpoint and remembers preference with session cookies.

Related guide: Integrations-Guide

Supported customization files

Create these files if you need small UI customizations:

  • /etc/csf/csf.header → injected before </head>
  • /etc/csf/csf.body → injected after <body> (Webmin-only)
  • /etc/csf/csf.footer → injected before </body>

Optional tag-attribute injections:

  • /etc/csf/csf.htmltag
  • /etc/csf/csf.bodytag (Webmin-only)

For csf.htmltag / csf.bodytag, only a single line at the top of the file is parsed.

Minimal safe example (add custom CSS)

cat > /etc/csf/csf.header <<'EOF'
<style>
  .navbar { font-size: 14px; }
  .table td, .table th { vertical-align: middle; }
</style>
EOF

This keeps customization limited to presentation and avoids changing core UI logic.

Mobile view behavior

  • Mobile mode activates at roughly 600px viewport width.
  • Some control panel/frame integrations may switch to full browser view.
  • The chosen Desktop/Mobile mode is tracked in session cookies and resets in new browser sessions.

STYLE_* compatibility

CSF has STYLE_* options in csf.conf that influence rendering behavior.

If you add custom CSS/JS, validate that your changes still behave correctly under the configured STYLE_* mode.

Common pitfalls

  • Heavy re-theming: deep layout rewrites are fragile across CSF updates.
  • Logic in skin files: keep to style-level changes; avoid workflow/DOM assumptions.
  • Ignoring panel differences: Webmin-only hooks do not apply to every control panel.
  • Multi-line tag injections: csf.htmltag and csf.bodytag parse only a single top line.

Recommended practice

  • Keep patches small and reversible.
  • Comment custom snippets with date/purpose.
  • Re-test after every CSF upgrade.

Last reviewed: 2026-02-25


← Previous: Exim SMTP AUTH Restriction · Next: CloudFlare

Clone this wiki locally