Creating a New Theme from Scratch
The default theme in the framework is mizoon, but you can easily create your own custom themes with different colors, fonts, and components.
1. Create Your Theme Folder #
Inside the themes/ directory, make a new folder for your theme, for example:
Path
themes/your-theme/
2. Copy the Config Folder #
Take the whole config folder from the mizoon theme and paste it into your new theme:
Path
themes/your-theme/config/
Then open the files inside and adjust things like colors, fonts, or spacing to match your themeβs style.
3. Important Note About Colors and Fonts #
When you define new colors or fonts for your theme, make sure you merge them with the main frameworkβs settings. This keeps your theme compatible with the base system.
Example β Colors:
SCSS
$light-color-palette-theme: (
primary: #ff6b6b,
secondary: #ffe66d
);
$light-color-palette: map.merge($light-color-palette, $light-color-palette-theme);
Example β Fonts:
SCSS
$fonts-theme: (
"tektur": (
"defaults": "'Brush Script MT', cursive",
"folder": "Tektur",
"font-types": (
"bold": ("Tektur-Bold.ttf"),
"regular": ("Tektur-Regular.ttf")
)
)
);
$fonts: map.merge($fonts, $fonts-theme);
π‘ Tip: Merging ensures your theme and the main system work together smoothly.
4. Enable or Disable the Theme #
Open config.js and set your theme name to activate it:
JS
export const config = {
theme: 'your-theme',
output: 'public/assets/js/mizchin.min.js'
};
To disable themes completely:
JS
export const config = {
theme: null,
output: 'public/assets/js/mizchin.min.js'
};
5. Create the Components Folder #
Inside your theme folder, add a new folder called components:
Path
themes/your-theme/components/
In there, create _index.scss to connect all components:
SCSS
@forward 'button';
@forward 'card';
Each component you make should have its own folder, like this:
Structure
button/
βββ index.html
βββ script.js
βββ _index.scss
- index.html: the component's HTML structure
- _index.scss: all related styles
- script.js: JavaScript behavior for that component
6. Connect Components to the Theme #
SCSS
@forward 'config/_index';
@forward 'components/_index';
β Final Structure #
Folder Tree
themes/
βββ mizoon/
βββ your-theme/
βββ _index.scss
βββ config/
β βββ _colors.scss
β βββ _component.scss
β βββ _dims.scss
β βββ _index.scss
β βββ _responsive.scss
β βββ _typography.scss
βββ components/
βββ _index.scss
βββ button/
β βββ index.html
β βββ _index.scss
β βββ script.js
βββ card/
βββ index.html
βββ _index.scss
βββ script.js