MAXCOM, theme author guide, contract 1

How to make a theme for the musalla TV display

This guide is for people who know CSS but not MAXCOM. Every table in it is generated straight from the MAXCOM code, so what is written here is what the MAXCOM box really does. The example in this guide is a real theme that the box validator has already checked.

1. What a theme is

A theme is one file named theme-name.maxtheme. It changes how the musalla TV display looks: colours, layout and background pictures. It does not change what is shown. Prayer times, the clock, the countdowns, the next-prayer chip and the musalla logo are on every screen at all times, because the congregation relies on them.

There are two ways to change the look. The first is the Customise menu in the app, which is safe and needs no CSS. The second is a theme file, which gives full freedom to anyone who can write CSS. This guide is about the second way.

Every theme is installed on top of one built-in theme, called its base. Anything your theme does not style falls back to that base, so you only write the differences.

The value of a style is decided by layers, from the lowest to the highest:

  1. MAXCOM base styles, including the protected rules (section 10).
  2. The built-in theme named as base.
  3. Your theme files: theme.css, then screens/<id>.css, then arabic.css.
  4. The defaults in theme.json.
  5. The musalla's choice in the Customise menu for all screens of the theme.
  6. The musalla's choice in the Customise menu for one screen only.

The musalla's choices are written straight onto the stage as style variables, so they always override your theme files. That is intended: a musalla has the right to change the colour or text size of a theme it installed.

The eight built-in themes, any of which can be a base, are:

Default
Default (default)
Colourful
Colourful (colourful)
Creative
Creative (creative)
Old School
Old School (oldschool)
Minimal
Minimal (minimal)
Arabic Art
Arabic Art (arabic)
Bar
Bar (bar)
Flipboard
Flipboard (flipboard)

The theme name is the same in every language. An uploaded theme is shown with its title exactly as written in theme.json.

The two newer themes. On bar the highlighted prayer is a tab that drops below the bar and carries a tag line (.pcell-tag). On flipboard the digits of the clock and of the next-prayer countdown are cells (.fd), coloured through --hair, --text, --accent and --ink. The cells do not flip while an uploaded theme is on the screen. On both themes the clock, the dates, the countdown and the prayer times stay on every screen.

2. Start by downloading

The easiest start is to download a theme that already exists. In the app: Configuration, Display template, pick a theme, then Download theme. A built-in theme downloads as a starting pack. The checkbox Include my changes (on by default) bakes the musalla's own choices into defaults, so the file reproduces what the musalla sees now.

Open the file as a zip, edit theme.css, change name and title in theme.json, zip it again and upload it through Configuration, Display template, Upload theme. The box checks the file and shows a preview. Press Install, then Use now.

Below is the sample theme Hijau Siti, a real theme built from this source and accepted by the box validator with no errors and no warnings. The comments in the files are written in BM for the readers of the Malay guide. The finished file, hijau-siti.maxtheme, comes with this guide.

theme.json

{
  "name": "hijau-siti",
  "title": "Hijau Siti",
  "version": 1,
  "contract": 1,
  "base": "creative",
  "defaults": {
    "semua": { "accent": "#7fdc9a" },
    "skrin": { "kuliah": { "align": "tengah" } }
  }
}

theme.css

/* Hijau Siti: tema contoh untuk panduan pembuat tema MAXCOM.
   Fail ini terpakai pada semua skrin. Ia hanya menyentuh kelas kawasan dan pemboleh ubah
   yang diterbitkan dalam kontrak 1. Tiada gaya yang lebih baharu daripada Chrome 91. */

/* Warna asas. .stage[data-screen] sentiasa ada pada pentas, dan kerana fail ini dimuatkan
   selepas tema asas, nilai di sini menang. Nilai yang surau pilih dalam menu Ubah suai
   diletakkan terus pada pentas dan tetap mengatasi semua ini. */
.stage[data-screen] {
  --accent: #7fdc9a;
  --accent-rgb: 127 220 154;
  --pack-emas: #f3e27a; /* pemboleh ubah kita sendiri, namanya bermula dengan --pack-, dipakai di bawah */
  --text: #eef8f1;
}

/* Jenama: nama surau berwarna hijau muda. */
.region-brand {
  color: var(--accent);
}

/* Jam: angka kuning lembut. Jam sentiasa dipaparkan oleh peraturan terlindung. */
.region-clock {
  color: var(--pack-emas);
}

/* Waktu solat: panel hijau tua dengan garis halus. Saiz dan kedudukan tidak diubah,
   kerana waktu solat mesti kekal jelas dari jauh. */
.region-prayers {
  background-color: rgb(10 34 25 / 0.82);
  border: 0.15rem solid rgb(var(--accent-rgb) / 0.45);
}

/* Cip waktu solat seterusnya. */
.region-next {
  background-color: rgb(10 34 25 / 0.9);
  border: 0.15rem solid #f3e27a;
}

/* Ticker di bawah. */
.region-ticker {
  background-color: rgb(8 28 20 / 0.9);
  border-top: 0.2rem solid #7fdc9a;
}

/* Tulisan Arab dan terjemahannya. */
.arab {
  color: var(--pack-emas);
}
.arab-tarjamah {
  color: var(--text);
}

screens/kuliah.css

/* Skrin kuliah sahaja. Fail ini dipasang dengan skop skrin kuliah, jadi tidak perlu
   menulis [data-screen='kuliah']. Gambar datang daripada images/kuliah.png dalam tema ini. */
.region-main {
  background-image: linear-gradient(rgb(8 30 20 / 0.5), rgb(8 30 20 / 0.5)), url(../images/kuliah.png);
  background-size: cover;
  background-position: center;
}

screens/poster.css

/* Skrin poster sahaja. Bingkai poster berwarna kuning lembut supaya poster nampak dibingkai. */
.region-main {
  border: 0.4rem solid #f3e27a;
}

3. Inside a .maxtheme file

A .maxtheme file is an ordinary zip. The file name is the theme name in lowercase letters, digits and hyphens, at most 32 characters, followed by .maxtheme, for example hijau-siti.maxtheme. Only the fixed paths below are allowed. Any other file, nested folders, a zip inside a zip and symbolic links are refused.

theme-name.maxtheme            (zip)
  theme.json             required
  theme.css              required, for every screen
  arabic.css             optional, Arabic text
  screens/<id>.css       optional, one screen; id from the screens list
  images/<id>.jpg        optional, background of one screen (jpg or png)
  images/semua.jpg       optional, background of every screen without its own picture
  (no fonts/ in this version: the font is chosen in the Customise menu)
LimitValue
Size of the .maxtheme file15 MB
Number of files in the zip60
Total size once unpacked40 MB
Each CSS file512 KB
All CSS files together1 MB
Highest z-index in theme CSS30
Theme installs an hour on one box10 (1 hour)
theme.json64 KB
Each picture8 MB, longest side 4096 px, 16 million pixels
Theme name^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$, at most 32
Reserved names (built-in themes)default colourful creative oldschool minimal arabic bar flipboard
theme.json fieldRule
nameThe same as the file name; see the name rule above.
title1 to 60 plain characters, without < or >.
versionA whole number 1 to 999999. Raise it each time you upload again.
contractA whole number, at least 1. This MAXCOM supports up to 1.
baseOne of the built-in themes: default colourful creative oldschool minimal arabic bar flipboard
defaultsOptional, an object with semua and skrin. Known keys: bgFit bgPos shade accent text font scale align arFont arScale harakat arLineHeight tarjamah goldOutline.

A theme file holds no fonts in this version of MAXCOM: a folder fonts/ and any @font-face are refused. The font is the musalla's choice in the Customise menu, from the fonts MAXCOM already carries. A picture is referred to as url(../images/kuliah.png) or url(images/kuliah.png). Any other address is refused. Pictures are PNG or JPEG only (WebP is refused). The box does not keep the bytes you send: it reads each picture and draws it again as a plain PNG or JPEG of the same size, and only that copy is ever shown on a display.

Every rule in your CSS is placed under your own theme's stage when the theme is installed (.stage[data-theme='your-name']), whether it is in theme.css, arabic.css or screens/<id>.css. A rule can only reach the elements inside your stage, never another theme, the page around it or the MAXCOM screens for setup, pairing, recovery, stopped box and network check, which never load your theme at all. Because of this, html, body, #root and :root cannot be styled; a :root rule that sets only --variables is allowed and applies to your stage. An attribute selector on class is allowed only as [class~='name'] with one plain class name. A rule that reaches the elements next to the stage (.stage + x, .stage ~ x) is refused.

In this version a theme is a re-skin of one of the built-in themes, not a new layout. The box reads your CSS with an allow-list: what is not listed is refused. Selectors may only be classes (for example .region-clock), the data attributes of the contract (data-screen, data-kind, data-phase, data-card, data-live, data-live-layout, data-harakat, data-align, data-lang, data-dim, data-pic, data-role, data-theme, data-template), and :first-child, :last-child, :nth-child() and :not(). Type selectors, *, #id, pseudo-elements (::before, ::after, ::marker, ::selection), :has(), :is(), and every class of the box's own overlays (.host-exit, .netcheck, .preview-ribbon) are refused.

The properties you may use are: color, background-color, background and background-image (your own pictures and gradients only), background-size, background-position, background-repeat, border (width up to 0.5rem), border-radius, outline (up to 0.3rem), box-shadow and text-shadow (blur up to 2rem, spread up to 0.5rem, offsets up to 1rem), padding, margin, gap, font-weight, font-style, text-transform, letter-spacing (0 to 0.3em), word-spacing, line-height (1 or more), text-align, size properties (width, height, min-*, max-*, never on the clock, the prayer times, the next-prayer chip or the logo), and variables: your own --pack-name variables (colours, gradients, your pictures, numbers and small lengths) and the base colours --accent, --accent-2, --text, --ink, --muted, --paper, --hair, --rule, --mint, --green, --sunset, --harakat, --accent-rgb and --glass-rgb (colours only). Every other theme variable is refused, because the built-in themes use them for fonts, sizes and angles. A property with a bound does not accept var() or calc(): write the number. Everything else is refused, including transform, scale, rotate, zoom, opacity, visibility, display, position, top and the other offsets, z-index, overflow, clip, mask, filter, mix-blend-mode, font-family, font-size (the menu's text size controls do that), direction, text-indent, text-decoration, list-style, content, animation, transition, cursor and pointer-events, with or without a vendor prefix. !important, a string inside a custom property (--name) and a var() inside image-set() are refused too. Any at-rule other than @media, @supports, @layer, @container and @charset is refused.

4. theme.json

theme.json is the identity card of the theme. The field name is the file name and the identifier of the theme. It cannot change later, because the same theme is recognised by that name. The field title is the name the musalla sees in the gallery, shown exactly as you write it. The field version is a whole number that you raise each time you upload a new version. The field contract is the contract number your theme was made for. The field base is the built-in theme that it extends.

The field defaults holds the menu choices that the theme ships with, in the same shape as the musalla's own choices: semua for all screens and skrin for single screens by id. The known keys are listed in the table in section 7. An unknown key is refused, and the message names it. A background picture cannot be in defaults; put the picture in images/.

The table in section 3 lists the limit of every field.

5. Screens

The display stage (.stage) carries a few attributes you can select in CSS. These six are the contract promise:

AttributeValuesOnMeaning
data-screenbiasa azan masuk-waktu iqamah solat jumaat tiada-data live poster kuliah program hadis zikir tilawah pengumuman takwim tabung ayat arab-ayat arab-hadis arab-zikir
Four phases without a catalog screen of their own: syuruk isyraq dhuha tarawih
.stageThe screen on show. The ids are fixed and never renamed.
data-phasenormal azanCountdown masukWaktu iqamah solat khutbah syuruk isyraq dhuha tarawih noData.stageThe prayer-time phase.
data-cardkuliahCard pengumuman posters videos programKhas takwim hadis worldTimes tugasan ayatCard tabungCarda card inside the main regionThe content card on show. A card name is not a screen id.
data-livenone blur clear.stageThe live state: none, blur (the prayer screen with the video blurred), or clear (the live screen).
data-alignleft center right.stageThe content alignment of the musalla choice. In the menu: Left, Centre, Right (kiri, tengah, kanan in defaults).
data-langms en.stageThe display language.
data-kindfull hero content live.stageHow much of the stage the screen takes: the main layout (full), a prayer state (hero), the content shell (content), or the live broadcast (live).
data-live-layoutfull framed.stageHow the live screen is drawn: full-screen video with brand, clock, chip and strip over it (full), or a framed video with the side column (framed).
data-harakaton.stagePresent only when the mark colour (harakat) of the musalla is on for Arabic text.

The box's own screens (setup, pair, recovery, locked, netcheck) also use data-screen, but a theme cannot style them.

The stage also carries data-template, data-theme, data-pack and data-bg. They exist, but they are not part of the contract promise, so do not depend on them in a theme that should last.

Each screen has one fixed id that will never be renamed. Select a screen with .stage[data-screen='poster'], or put that screen's CSS in screens/poster.css. In a screens/<id>.css file every selector is scoped to that screen automatically, so you do not write [data-screen] yourself. The background picture of one screen goes in images/<id>.jpg or .png. A picture images/semua.* is used on every screen that has no picture of its own.

The background picture that shows is chosen in this order, highest first: the musalla's picture for that screen, the musalla's picture for all screens, the picture in your theme, the musalla's background list, and last the MAXCOM default pictures.

The table below lists every screen, with a picture in the Creative theme and what must stay visible there. A screen without a picture yet is marked in the table.

IdGroupName in the appMust stay visiblePicture (Creative)
biasaPrayer timesNormalthe clock, the prayer times, the next-prayer chip; the musalla logo (when the musalla has set one)Normal
azanPrayer timesAzanthe clock, the prayer times, the countdown; the musalla logo (when the musalla has set one)Azan
masuk-waktuPrayer timesPrayer timethe clock, the prayer times; the musalla logo (when the musalla has set one)Prayer time
iqamahPrayer timesIqamahthe clock, the prayer times, the countdown; the musalla logo (when the musalla has set one)Iqamah
solatPrayer timesPrayerthe clock, the prayer times; the musalla logo (when the musalla has set one)Prayer
jumaatPrayer timesFridaythe clock, the prayer times; the musalla logo (when the musalla has set one)Friday
tiada-dataPrayer timesNo datathe clock; the musalla logo (when the musalla has set one)No data
liveContentLivethe clock, the next-prayer chip; the musalla logo (when the musalla has set one)No picture yet.
posterContentPosterthe clock, the next-prayer chip; the musalla logo (when the musalla has set one)Poster
kuliahContentLecturethe clock, the next-prayer chip; the musalla logo (when the musalla has set one)Lecture
programContentProgrammethe clock, the next-prayer chip; the musalla logo (when the musalla has set one)Programme
hadisContentHadiththe clock, the next-prayer chip; the musalla logo (when the musalla has set one)Hadith
zikirContentZikirthe clock, the next-prayer chip; the musalla logo (when the musalla has set one)No picture yet.
tilawahContentRecitationthe clock, the next-prayer chip; the musalla logo (when the musalla has set one)No picture yet.
pengumumanContentAnnouncementthe clock, the next-prayer chip; the musalla logo (when the musalla has set one)Announcement
takwimContentCalendarthe clock, the next-prayer chip; the musalla logo (when the musalla has set one)Calendar
tabungContentFundthe clock, the next-prayer chip; the musalla logo (when the musalla has set one)Fund
ayatContentVersethe clock, the next-prayer chip; the musalla logo (when the musalla has set one)Verse
arab-ayatArabicArabic versethe clock, the next-prayer chip; the musalla logo (when the musalla has set one)No picture yet.
arab-hadisArabicArabic hadiththe clock, the next-prayer chip; the musalla logo (when the musalla has set one)No picture yet.
arab-zikirArabicArabic zikirthe clock, the next-prayer chip; the musalla logo (when the musalla has set one)No picture yet.
The Dhuha screen
The Dhuha screen in the Creative theme. It has no catalog id of its own; select it with .stage[data-screen="dhuha"].

6. Regions

Every screen is divided into regions with fixed class names. Use them to restyle parts of a screen (colours, borders, spacing). Not every region exists on every screen, so write CSS that does not break when a region is missing.

ClassWhat is in it
.region-mainThe main body of the screen: the content card, poster, zikir, the centre of a phase screen, or the live frame.
.region-prayersThe prayer times bar. Carries data-role="prayers".
.region-clockThe clock. Carries data-role="clock".
.region-brandThe musalla name and its logo. The logo carries data-role="logo".
.region-tickerThe ticker along the bottom.
.region-live-stripThe small strip that shows a live broadcast is waiting or on air.
.region-nextThe next-prayer chip. Carries data-role="next".
The lecture screen with the regions marked
The lecture screen in the Creative theme, with each region marked by its class name.

The attribute data-align on the stage (left, center or right, following the musalla's choice) sets the text alignment inside .region-main. If your theme rearranges that region, read the same attribute in your CSS.

Content screens. The screens whose data-kind is content (the poster, the lecture, the programme, the hadith, the zikir, the announcements, the calendar, the donation box, the verse and the three Arabic-led screens arab-ayat, arab-hadis and arab-zikir) fill the whole stage with a shell, .screen--shell. Its top row holds the musalla logo left of the musalla name in .region-brand (the MAXCOM mark stands in when the musalla has no logo of its own), the date line under the name (.shell-date: the Gregorian date, and the Hijri date when the musalla shows it), and the next-prayer chip in line with the compact clock in .shell-top. The chip names the next prayer and its time, then a small hourglass and the time left as hours and minutes (.chip-cd, minutes rounded up, so the last minute reads 00:01; the seconds alone in the last minute when the musalla shows seconds); for three minutes after a prayer time it says "Masuk waktu" instead (.next--chip.is-now). The card fills .region-main. The compact prayer strip (.region-prayers) shows on the kuliah, hadis, ayat, zikir, takwim and tilawah screens and the Arabic-led ones, and on no other content screen: the poster, announcements, programme and donation box screens give that room to the card, and the poster's frame starts below the top row and runs to the bottom edge. The main layout of the prayer screen is .screen--main; the two never share a rule of the built-in themes, so write for the one you mean. On a content screen the compact clock and the next-prayer chip are protected like their large forms (section 10); the strip, where it shows, is not a protected element there. In data-live-layout the stage says how the live screen is drawn, and data-harakat is present when the musalla's mark colour is on for Arabic text (section 8). data-picture is present while a background picture is under the text (the contract then lays a scrim in your --glass-rgb over it, a plate under the card region, the strip and the ticker, and a soft glow on the text), and data-gold carries the Customise switch "Gold outline on headings" (on or off; Default, Old School and Arabic Art draw a thin gold outline on their large text unless it is off).

7. Style variables

Every control in the Customise menu writes one CSS variable or one attribute on the stage. Your theme CSS reads the same variables, so a menu choice and a theme file never fight. If you set --accent in your CSS, the musalla can still change it in the menu, and the musalla's value wins.

Menu controlKey in defaultsValuesVariable or attributeDefault
BackgroundbgImage (not allowed in defaults)one picture, or follow the theme--bg-image and data-bg="image"the theme picture, then the musalla background list
Picture displaybgFitpenuh regang sederhana kecil--bg-fit: cover, fill, contain, contain
--bg-size: cover, 100% 100%, 70% auto, 45% auto
penuh
Picture positionbgPoskiri tengah kanan--bg-pos: left center, center, right centertengah
Layer darknessshadea whole number 0 to 80 (percent)--shade: 0 to 0.8the theme's value, else 35; on the Default theme with a picture, never below 25
Main colouraccenta colour #rrggbb; menu swatches: #2fd1b0 #f9b544 #ff7a98 #f0c97a #7fdc9a #5aa7ff #ffffff--accent and --accent-rgb (the same colour as three numbers)the theme colour
Text colourtexta colour #rrggbb, or auto (measured from the picture)--textauto
Fontfontjakarta or amiri--font (and --serif on Old School)the theme font
Text sizescaleS M L XL--scale: S = 1, M = 1.1, L = 1.2, XL = 1.3S, today's size; there is no smaller size
Content alignmentalignkiri tengah kanandata-align: left, center, rightthe theme alignment

Any control can be left out, and out means follow the theme. A musalla choice overrides defaults, and a choice for one screen overrides a choice for all screens. Other musalla settings (for example whether a translation shows) always win.

Values in defaults are written with the Malay words of the Malay menu (for example "align": "tengah"), while the attributes on the stage carry English words (data-align="center"). The table above shows both.

8. Arabic text

Arabic text on the verse, hadith and zikir cards carries the class .arab, and its translation carries .arab-tarjamah. Write your Arabic typography in arabic.css (optional) or in theme.css. Right to left is used only inside Arabic text blocks; the layout of the stage stays left to right.

ClassWhat
.arabAn Arabic text block (dir="rtl", lang="ar").
.arab-tarjamahThe translation below or beside the Arabic text.
Menu controlKey in defaultsValuesVariable or attribute
Arabic fontarFonthafs amiri-quran amiridata-arfont and --font-arabic
Arabic sizearScalea whole number 100 to 160 (percent)--ar-scale: 1 to 1.6
Mark colour (harakat)harakata colour #rrggbb--harakat
Line spacingarLineHeighta whole number 16 to 24 (tenths)--ar-lh: 1.6 to 2.4
Translationtarjamahbawah sisi sembunyidata-tarjamah: below, beside, hidden

The harakat rule: the mark colour works only with the Amiri and Amiri Quran fonts. With the Uthmani Hafs font the control is switched off in the app, because the licence of that font forbids modification. The translation value sembunyi (hidden) applies only to the screens arab-ayat, arab-hadis and arab-zikir. Where Configuration already decides whether a translation shows, Configuration wins.

The stage carries the attributes and variables above when the musalla picks them. Your arabic.css decides how they are used.

9. What is refused, and warnings

When you upload a file the box checks everything and collects all the problems into one report, not only the first. There are two kinds. An error blocks the install. A warning does not; it tells you that a style will not show on the T95 box (section 11).

The CSS is read by a real CSS parser, not searched with text patterns. A name disguised with CSS escapes is read like the plain name. The table below lists every refusal with the sentence the musalla will see, in Malay and in English.

CodeWhenSentence in MalaySentence in English
too_bigThe file is larger than the size limit.Fail tema melebihi 15 MB.The theme file is larger than 15 MB.
not_zipThe file is not a zip.Fail ini bukan fail .maxtheme yang sah.This is not a valid .maxtheme file.
too_many_filesMore files than the limit.Fail tema mengandungi lebih daripada 60 fail.The theme file holds more than 60 files.
bad_pathA file outside the fixed paths, a zip inside a zip, a link, or two pictures for one screen.Fail tidak dibenarkan dalam tema: notes.txt.A file that is not allowed in a theme: notes.txt.
missing_filetheme.json or theme.css is missing.theme.json tiada dalam fail tema.theme.json is missing from the theme file.
bad_theme_jsontheme.json is broken or a field is wrong, including an unknown defaults key.theme.json tidak sah: bukan JSON yang sah.theme.json is not valid: not valid JSON.
reserved_nameThe theme name is a built-in theme name, or a Windows device name (con, prn, aux, nul, com1 to com9, lpt1 to lpt9).Nama tema creative dikhaskan untuk tema bawaan MAXCOM. Pilih nama lain.The theme name creative is reserved for a built-in theme. Choose another name.
needs_newerThe contract number is higher than the box supports.Tema ini memerlukan MAXCOM yang lebih baharu. Tema dibuat untuk kontrak 2; MAXCOM di surau ini menyokong kontrak 1.This theme needs a newer MAXCOM. It was made for contract 2; this MAXCOM supports contract 1.
version_not_higherThe name is installed and the version is not higher.Versi sama atau lebih rendah. Hijau Siti versi 3 sudah dipasang. Naikkan nombor versi dalam theme.json.Same or lower version. Hijau Siti version 3 is already installed. Raise the version number in theme.json.
css_parseThe CSS cannot be read, or a block, string or comment is not closed.theme.css baris 1: CSS tidak dapat dibaca.theme.css line 1: the CSS cannot be read.
css_import@import or @namespace.theme.css baris 1: @import tidak dibenarkan.theme.css line 1: @import is not allowed.
css_urlA url() or image-set() that points outside images/ of the theme, to a file that is not there, or to a variable (var()) inside image-set(), src() or cross-fade().Alamat luar tidak dibenarkan. theme.css baris 1 memuat fail dari luar tema. Letak gambar dalam folder images/.Outside addresses are not allowed. theme.css line 1 loads a file from outside the theme. Put pictures in images/.
css_scriptexpression(), behavior, -moz-binding, or a javascript: or vbscript: address.theme.css baris 1: skrip tidak dibenarkan dalam tema.theme.css line 1: scripts are not allowed in a theme.
css_box_screenA selector that reaches the box's own setup screens, or an attribute selector on [class] other than [class~="name"].theme.css baris 1: skrin tetapan kotak MAXCOM tidak boleh digayakan.theme.css line 1: the MAXCOM box's own screens cannot be styled.
css_font@font-face (a theme carries no fonts in this version).theme.css baris 1: @font-face tidak dibenarkan dalam tema (MAXCOM versi ini). Fon dipilih dalam menu Ubah suai.theme.css line 1: @font-face is not allowed in a theme (this MAXCOM version). The font is chosen in the Customise menu.
css_propertyA CSS property outside the allowed list (only colours, the pack pictures and gradients, borders, radii, bounded shadows, spacing and font weight are allowed), a value outside its range (var() and calc() are refused in a bounded property), a theme variable other than --pack-* and the base colours, !important, or an at-rule that is not allowed.theme.css baris 1: animation tidak dibenarkan dalam tema, kerana boleh menyembunyikan jam atau waktu solat.theme.css line 1: animation is not allowed in a theme, because it can hide the clock or the prayer times.
css_scopeA style outside the theme stage: html, body, #root, :root (other than --name variables), or .stage + x / .stage ~ x.theme.css baris 1: gaya tema hanya boleh mengenai pentas (.stage). html, body, #root dan :root (selain pemboleh ubah --nama) tidak dibenarkan.theme.css line 1: a theme may only style the stage (.stage). html, body, #root and :root (other than --name variables) are not allowed.
css_stringText (a string) inside a --name variable value.theme.css baris 1: teks dalam nilai pemboleh ubah (--nama) tidak dibenarkan.theme.css line 1: text inside a custom property (--name) value is not allowed.
css_selectorA selector outside what is allowed: only classes, the contract data-* attributes, and :first-child, :last-child, :nth-child() and :not(). Type selectors, *, #id, pseudo-elements and :has() are refused.theme.css baris 1: pemilih ::before tidak dibenarkan dalam tema (hanya kelas, atribut data-* kontrak, dan :first-child/:last-child/:nth-child/:not).theme.css line 1: the selector ::before is not allowed in a theme (only classes, the contract's data-* attributes, and :first-child/:last-child/:nth-child/:not).
bad_imageThe picture cannot be read (PNG or JPEG only; WebP is refused), its type does not match its name, or it is too large.Gambar images/kuliah.png tidak sah atau terlalu besar.The picture images/kuliah.png is not valid or too large.
bad_fontA file under fonts/ (a theme carries no fonts in this version).Fon tidak dibenarkan dalam tema (MAXCOM versi ini): fonts/naskh.ttf. Fon dipilih dalam menu Ubah suai.Fonts are not allowed in a theme (this MAXCOM version): fonts/naskh.ttf. The font is chosen in the Customise menu.
too_many_themes30 uploaded themes are already installed.Had 30 tema dimuat naik telah dicapai. Padam tema yang tidak digunakan.The limit of 30 uploaded themes is reached. Delete a theme that is not used.
storage_fullThe musalla storage or the theme space is full.Ruang simpanan penuh. Padam fail yang tidak digunakan.Storage is full. Delete files that are not used.
storage_fullThe musalla storage or the theme space is full.Ruang tema penuh. Padam tema yang tidak digunakan.The theme space is full. Delete a theme that is not used.
too_many_installsMore than 10 theme installs in an hour on one box.Terlalu banyak pemasangan tema. Had 10 sejam. Cuba lagi dalam sejam.Too many theme installs. The limit is 10 an hour. Try again in an hour.

The box screens that cannot be styled are setup, pair, recovery, locked, netcheck. A selector that could reach them (the class .box-screen, .screen--<id>, or [data-screen] with those values) is refused, also inside :not(). A bare [data-screen] is allowed.

10. Protected elements

Prayer times, the clock, the countdowns, the next-prayer chip and the musalla logo cannot be lost. No theme can hide them, and the rules below are added last so that they win.

ElementAttributeScreens that require it
the clockdata-role="clock"biasa azan masuk-waktu iqamah solat jumaat tiada-data live poster kuliah program hadis zikir tilawah pengumuman takwim tabung ayat arab-ayat arab-hadis arab-zikir
the prayer timesdata-role="prayers"biasa azan masuk-waktu iqamah solat jumaat
the countdowndata-role="countdown"azan iqamah
the next-prayer chipdata-role="next"biasa live poster kuliah program hadis zikir tilawah pengumuman takwim tabung ayat arab-ayat arab-hadis arab-zikir
the musalla logo (when the musalla has set one)data-role="logo"every screen

The protected rule

While an uploaded theme is on the stage, each element above, and everything inside it (including ::before, ::after and ::marker), always gets visibility: visible, opacity: 1, filter: none, mix-blend-mode: normal, transform: none, zoom: 1, animation: none, transition: none, clip-path: none, mask-image: none, -webkit-text-fill-color: currentColor, -webkit-text-security: none, -webkit-text-stroke: 0, text-decoration: none and unicode-bidi: normal, all with !important, and content: none on ::before, ::after and ::marker. The element gets z-index: 35 (a theme may not go above 30), and position: relative when it is not positioned. The text parts that must show (the hour and minute, the name and time of each prayer, the countdown digits, the next prayer's name) carry data-must and always read left to right. The box's own overlays (the way out to the box, the preview ribbon, the network check) are pinned with !important so they cannot be moved, resized, recoloured or hidden. On top of this the CSS of a theme is checked against an allow-list (section 3 above), so most of the properties above cannot be written at all.

The health check

After a theme loads, and after every screen change, the display waits 600 milliseconds so that the layout settles, then looks at every element the screen requires as the browser really draws it. The check repeats every 60 seconds while the theme is on the stage, when a data-* attribute of the stage changes (phase, dim, live), and again when an animation or a transition ends and things have been quiet for 700 milliseconds. One failure alone does not reject a theme: it is rejected only when the check fails again at least 3 seconds later. A rejected theme is tried again after 30 minutes. An element passes when all of these are true:

If one element fails twice, the display switches to the base theme and reports Theme not valid to the app and to Semak MAXCOM. When any display reports a problem in the last 24 hours, the theme counts as bad even when another display is fine. The safe way: change colours, borders, bounded shadows, pictures and spacing, but do not hide these elements, do not fade them, and do not try to cover them with another layer.

11. Chrome 91 limits

The T95 box runs the Chrome 91 browser. Newer CSS does not work there, and the box will not show those styles. The validator gives a warning (not an error) when it finds any of the following. Prayer times and the clock are not affected, but your theme will look different from what you see on a computer.

FeatureExampleWarning message
@container@container (min-width: 10px) { .region-main { color: red; } }T95 box (Chrome 91). theme.css line 1 uses @container. This style will not show on that box. Prayer times and the clock are not affected.
@layer@layer base { .region-main { color: red; } }T95 box (Chrome 91). theme.css line 1 uses @layer. This style will not show on that box. Prayer times and the clock are not affected.
color-mix().region-main { color: color-mix(in srgb, red, blue); }T95 box (Chrome 91). theme.css line 1 uses color-mix(). This style will not show on that box. Prayer times and the clock are not affected.
CSS nesting.region-main { &:first-child { color: red; } }T95 box (Chrome 91). theme.css line 1 uses CSS nesting. This style will not show on that box. Prayer times and the clock are not affected.

The safe way: test your theme on a real T95 box, or in a browser of the same version, before sharing it.

12. Uploading and versions

A theme is uploaded by a Surau Administrator, with the same permission as the other screen settings. The box checks the file, keeps it aside and shows a preview before you press Install. An uploaded theme is not used until the musalla chooses it with Use now.

A box accepts at most 10 theme installs in an hour. The same name with a higher version number updates the installed theme. The same or a lower version is refused with a clear message. A different name installs a new theme. Up to 30 uploaded themes can be installed. The musalla's own menu choices stay after an update. Values for screens or variables that the new version no longer uses are kept but ignored, so a later version can use them again.

An installed theme is stored on the box and copied to the cloud within the musalla's storage limit, so a replacement box and editing away from the musalla do not lose it. Only a theme that is not in use can be deleted, and built-in themes cannot be deleted.

The app offers an uploaded theme only when every box of the musalla reports a contract equal to or higher than the contract of that theme. A box older than your contract would not accept it, so the theme does not appear until that box is updated.

An installed theme is stored once: when a theme is updated or deleted, the file of the old version is removed from the box. The address of a theme's files contains a short code taken from the file itself, so a new version always has a new address.

After a theme loads, the display checks the protected elements on every screen by itself, again every minute, and again after any animation or transition ends. If something is lost, the display goes back to the base theme, the theme card in the app shows Theme not valid, and Semak MAXCOM reports it. The viewers are never left without prayer times.

13. The contract promise

Everything listed in this guide (screen ids, attributes, region classes, Arabic classes, style variables, file paths and limits) is contract 1.

The contract number goes up only on a breaking change. Older themes keep working on their contract version for at least a year.

New things that break nothing are added without raising the contract number. If you write "contract": 2 while the box supports only contract 1, the box says that this theme needs a newer MAXCOM.

14. Sharing a theme

A .maxtheme file is small and can be sent through a phone messaging app or e-mail like any file. The receiver uploads it in their MAXCOM app with the steps in section 2.

Choose a name that other people are unlikely to use, so that your theme is not mistaken for an update of another theme with the same name. Raise version each time you hand out a new version. A theme file carries no secrets and no musalla data; it is only a look.

The pictures in the file are the responsibility of the theme author. Make sure you have the right to use them and to let others use them, and do not include a picture that you may not distribute.

This guide exists as a web page and as a PDF, in Malay, English and Arabic. The PDF can be sent through a messaging app like any other file.