From 8c5473b1409ed489ea25c3f4d8d0f4ba45f797c0 Mon Sep 17 00:00:00 2001
From: Jonathan Miller
Date: Sat, 18 Apr 2026 17:34:59 -0500
Subject: [PATCH] Fix sync script :root parsing, add offline/editor/user to
minify. Bump 03.10.06
- Sync: compare against standard theme (not deleted custom starters)
- Sync: handle :root{ on same line (dark.standard.css format)
- Minify: added offline.css, editor.css, a11y-high-contrast.css,
user.css, user.js to minification list
Co-Authored-By: Claude Opus 4.6 (1M context)
---
README.md | 4 ++--
src/helper/minify.php | 5 +++++
src/joomla.asset.json | 2 +-
src/sync_custom_vars.php | 26 +++++++++++++-------------
src/templateDetails.xml | 4 ++--
updates.xml | 26 +++++++++++++-------------
6 files changed, 36 insertions(+), 31 deletions(-)
diff --git a/README.md b/README.md
index dcde61e..7d1635a 100644
--- a/README.md
+++ b/README.md
@@ -9,13 +9,13 @@
INGROUP: MokoCassiopeia.Documentation
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia
FILE: ./README.md
- VERSION: 03.10.05
+ VERSION: 03.10.06
BRIEF: Documentation for MokoCassiopeia template
-->
# MokoCassiopeia → MokoOnyx
-> **This template is being renamed to MokoOnyx.** Version 03.10.05 is the bridge release that automatically migrates your settings. After updating, MokoOnyx will be your active template and MokoCassiopeia can be safely uninstalled.
+> **This template is being renamed to MokoOnyx.** Version 03.10.06 is the bridge release that automatically migrates your settings. After updating, MokoOnyx will be your active template and MokoCassiopeia can be safely uninstalled.
**A Modern, Lightweight Joomla Template Based on Cassiopeia**
diff --git a/src/helper/minify.php b/src/helper/minify.php
index 0ea066a..760a851 100644
--- a/src/helper/minify.php
+++ b/src/helper/minify.php
@@ -22,14 +22,19 @@ class MokoMinifyHelper
*/
private const CSS_FILES = [
'css/template.css',
+ 'css/offline.css',
+ 'css/editor.css',
+ 'css/a11y-high-contrast.css',
'css/theme/light.standard.css',
'css/theme/dark.standard.css',
'css/theme/light.custom.css',
'css/theme/dark.custom.css',
+ 'css/user.css',
];
private const JS_FILES = [
'js/template.js',
+ 'js/user.js',
];
/**
diff --git a/src/joomla.asset.json b/src/joomla.asset.json
index 54f921b..3139954 100644
--- a/src/joomla.asset.json
+++ b/src/joomla.asset.json
@@ -17,7 +17,7 @@
"defgroup": "Joomla.Template.Site",
"ingroup": "MokoCassiopeia.Template.Assets",
"path": "./media/templates/site/mokocassiopeia/joomla.asset.json",
- "version": "03.10.05",
+ "version": "03.10.06",
"brief": "Joomla asset registry for MokoCassiopeia"
}
},
diff --git a/src/sync_custom_vars.php b/src/sync_custom_vars.php
index 2db9824..a7d3de3 100644
--- a/src/sync_custom_vars.php
+++ b/src/sync_custom_vars.php
@@ -34,11 +34,11 @@ final class MokoCssVarSync
*/
private const PALETTES = [
[
- 'starter' => 'templates/light.custom.css',
+ 'starter' => 'media/css/theme/light.standard.css',
'user' => 'media/templates/site/%s/css/theme/light.custom.css',
],
[
- 'starter' => 'templates/dark.custom.css',
+ 'starter' => 'media/css/theme/dark.standard.css',
'user' => 'media/templates/site/%s/css/theme/dark.custom.css',
],
];
@@ -141,27 +141,27 @@ final class MokoCssVarSync
$depth = 0;
foreach ($lines as $line) {
- // Track when we enter :root
+ // Track when we enter :root (brace may be on same line)
if (!$inRoot && preg_match('/:root/', $line)) {
$inRoot = true;
- continue;
+ // If { is on this same line, don't skip it — just continue processing
+ if (strpos($line, '{') === false) {
+ continue;
+ }
+ // Fall through to process the rest of this line
}
if (!$inRoot) {
continue;
}
- // Track braces
- if (strpos($line, '{') !== false) {
- $depth++;
+ // Track braces (skip lines that are ONLY a brace)
+ $trimmed = trim($line);
+ if ($trimmed === '{') {
continue;
}
- if (strpos($line, '}') !== false) {
- $depth--;
- if ($depth < 0) {
- break; // End of :root
- }
- continue;
+ if ($trimmed === '}') {
+ break; // End of :root
}
// Section comment headers — always include
diff --git a/src/templateDetails.xml b/src/templateDetails.xml
index 79844c1..8f5656d 100644
--- a/src/templateDetails.xml
+++ b/src/templateDetails.xml
@@ -39,13 +39,13 @@
MokoCassiopeia
- 03.10.05
+ 03.10.06
script.php
2026-04-15
Jonathan Miller || Moko Consulting
hello@mokoconsulting.tech
(C)GNU General Public License Version 3 - 2026 Moko Consulting
-

MokoCassiopeia Template Description
MokoCassiopeia continues Joomla's tradition of space-themed default templates— building on the legacy of Solarflare (Joomla 1.0), Milkyway (Joomla 1.5), and Protostar (Joomla 3.0).
This template is a customized fork of the Cassiopeia template introduced in Joomla 4, preserving its modern, accessible, and mobile-first foundation while introducing new stylistic enhancements and structural refinements specifically tailored for use by Moko Consulting.
Custom Colour Themes
Starter palette files are included with the template. To create a custom colour scheme, copy templates/mokocassiopeia/templates/light.custom.css to media/templates/site/mokocassiopeia/css/theme/light.custom.css, or templates/mokocassiopeia/templates/dark.custom.css to media/templates/site/mokocassiopeia/css/theme/dark.custom.css. Customise the CSS variables to match your brand, then activate your palette in System → Site Templates → MokoCassiopeia → Theme tab by selecting "Custom" for the Light or Dark Mode Palette. A full variable reference is available in the CSS Variables tab in template options.
Custom CSS & JavaScript
For site-specific styles and scripts that should survive template updates, create the following files:
media/templates/site/mokocassiopeia/css/user.css — loaded on every page for custom CSS overrides. media/templates/site/mokocassiopeia/js/user.js — loaded on every page for custom JavaScript.
These files are gitignored and will not be overwritten by template updates.
Code Attribution
This template is based on the original Cassiopeia template developed by the Joomla! Project and released under the GNU General Public License.
Modifications and enhancements have been made by Moko Consulting in accordance with open-source licensing standards.
It includes integration with Bootstrap TOC, an open-source table of contents generator by A. Feld, licensed under the MIT License.
All third-party libraries and assets remain the property of their respective authors and are credited within their source files where applicable.
]]>
+
MokoCassiopeia Template Description
MokoCassiopeia continues Joomla's tradition of space-themed default templates— building on the legacy of Solarflare (Joomla 1.0), Milkyway (Joomla 1.5), and Protostar (Joomla 3.0).
This template is a customized fork of the Cassiopeia template introduced in Joomla 4, preserving its modern, accessible, and mobile-first foundation while introducing new stylistic enhancements and structural refinements specifically tailored for use by Moko Consulting.
Custom Colour Themes
Starter palette files are included with the template. To create a custom colour scheme, copy templates/mokocassiopeia/templates/light.custom.css to media/templates/site/mokocassiopeia/css/theme/light.custom.css, or templates/mokocassiopeia/templates/dark.custom.css to media/templates/site/mokocassiopeia/css/theme/dark.custom.css. Customise the CSS variables to match your brand, then activate your palette in System → Site Templates → MokoCassiopeia → Theme tab by selecting "Custom" for the Light or Dark Mode Palette. A full variable reference is available in the CSS Variables tab in template options.
Custom CSS & JavaScript
For site-specific styles and scripts that should survive template updates, create the following files:
media/templates/site/mokocassiopeia/css/user.css — loaded on every page for custom CSS overrides. media/templates/site/mokocassiopeia/js/user.js — loaded on every page for custom JavaScript.
These files are gitignored and will not be overwritten by template updates.
Code Attribution
This template is based on the original Cassiopeia template developed by the Joomla! Project and released under the GNU General Public License.
Modifications and enhancements have been made by Moko Consulting in accordance with open-source licensing standards.
It includes integration with Bootstrap TOC, an open-source table of contents generator by A. Feld, licensed under the MIT License.
All third-party libraries and assets remain the property of their respective authors and are credited within their source files where applicable.
]]>
1
component.php
diff --git a/updates.xml b/updates.xml
index bebdc81..4328a53 100644
--- a/updates.xml
+++ b/updates.xml
@@ -1,7 +1,7 @@
@@ -13,11 +13,11 @@
mokocassiopeia
template
site
- 03.10.05
+ 03.10.06
2026-04-18
https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/development
- https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.05.zip
+ https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.06.zip
2dbc653e87b6d4cf6666ef13827295c9c432d959a0b693f19e2a8cd702cf2995
development
@@ -34,11 +34,11 @@
mokocassiopeia
template
site
- 03.10.05
+ 03.10.06
2026-04-18
https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/alpha
- https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.05.zip
+ https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.06.zip
2dbc653e87b6d4cf6666ef13827295c9c432d959a0b693f19e2a8cd702cf2995
alpha
@@ -55,11 +55,11 @@
mokocassiopeia
template
site
- 03.10.05
+ 03.10.06
2026-04-18
https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/beta
- https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.05.zip
+ https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.06.zip
2dbc653e87b6d4cf6666ef13827295c9c432d959a0b693f19e2a8cd702cf2995
beta
@@ -76,12 +76,12 @@
mokocassiopeia
template
site
- 03.10.05
+ 03.10.06
2026-04-18
https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/release-candidate
- https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.05.zip
- https://github.com/mokoconsulting-tech/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.05.zip
+ https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.06.zip
+ https://github.com/mokoconsulting-tech/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.06.zip
2dbc653e87b6d4cf6666ef13827295c9c432d959a0b693f19e2a8cd702cf2995
rc
@@ -98,12 +98,12 @@
mokocassiopeia
template
site
- 03.10.05
+ 03.10.06
2026-04-18
https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/tag/v03
- https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.05.zip
- https://github.com/mokoconsulting-tech/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.05.zip
+ https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.06.zip
+ https://github.com/mokoconsulting-tech/MokoCassiopeia/releases/download/v03/mokocassiopeia-03.10.06.zip
2dbc653e87b6d4cf6666ef13827295c9c432d959a0b693f19e2a8cd702cf2995
stable