v1.2.0 (molique 2026)

Getting Started

Meet molique - an ultra-lightweight, rigorously optimized B2B CSS framework. Built on native cascade layers (@layer), free of specificity wars, and with a smart JS autoloader.

Theme Editor

Pick colors, typography, radii and the sidebar live, then copy the finished :root block into your project.

1. Starter Template (Boilerplate)

Copy the HTML below to get started. It includes optimized font loading (Variable Fonts) and the main core file.

Important notes:

  • The molique-script.js file must have the defer attribute so it doesn't block page rendering.
  • <link rel="preload"> tags prevent text jumps (FOUT/FOIT) while custom fonts load.
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My molique Project</title>

  <!-- Preload Variable Fonts -->
  <link rel="preload" href="fonts/inter-variable.woff2" as="font" type="font/woff2" crossorigin>
  <link rel="preload" href="fonts/poppins-variable.woff2" as="font" type="font/woff2" crossorigin>

  <!-- Core framework styles -->
  <link rel="stylesheet" href="css/molique-style.css?v=1.7.49">
  <!-- Your overrides (optional) -->
  <link rel="stylesheet" href="css/custom.css">
</head>
<body>

  <h1 class="text-9 fw-black">Welcome to molique!</h1>

  <!-- Main script (autoloader) -->
  <script src="js/molique-script.js" defer></script>
</body>
</html>

2. File Structure and the JS Autoloader

The framework was designed for extreme performance. We don't load code you don't use.

How does DOM-based lazy loading work?

Your HTML links to only one JavaScript file: molique-script.js. This file scans the page structure. If it detects that you've used, say, the .carousel class, it automatically and asynchronously fetches js/modules/molique-carousel.js. That way every page loads only the bytes it actually needs.

3. Configuring Variables

The entire framework is built on CSS custom properties. To match your brand, just override the :root block in your own custom.css. No need to recompile Sass!

/* Your custom.css file */
:root {
  /* Main brand colors */
  --primary: #f97316;
  --primary-hover: #ea580c;
  --primary-rgb: 249, 115, 22;

  /* Border radius for all components */
  --border-radius: 8px;

  /* Enforce B2B accessibility (click target) */
  --target-size-min: 44px;
}

4. Layer Architecture (@layer)

The framework uses native CSS layers. That means utility classes always win over components, without resorting to toxic !important.

A card's default background is --bg-surface

But the .bg-dark class wins thanks to the @layer utilities layer!

<!-- The .bg-dark class overrides the card background without !important -->
<div class="card p-4 bg-dark text-white">
  <h3>A card's default background is --bg-surface</h3>
</div>

5. Choosing CSS Modules

Molique is modular. You always load the core styles, but advanced components (Shop, Blog, Admin Panel) have their own, independent CSS files.

<head>
  <!-- 1. Framework core (required) -->
  <link rel="stylesheet" href="css/molique-style.css?v=1.7.49">

  <!-- 2. Optional modules (load only where you need them) -->
  <link rel="stylesheet" href="css/molique-style-admin.css?v=1.7.49">
  <link rel="stylesheet" href="css/molique-style-shop.css?v=1.7.49">
  <link rel="stylesheet" href="css/molique-style-blog.css?v=1.7.49">
</head>

6. Requirements and Compatibility

The framework uses the latest W3C standards. We do not support Internet Explorer.

Minimum: Chrome/Edge 125+, Firefox 147+, Safari 26+ (with molique-script.js). CSS only, no JS: Chrome/Edge 133+. The difference comes from one thing - the implicit popover anchor, described below. Everything else degrades gracefully and works far lower.

Technologies in use:

  • CSS Cascade Layers (@layer): Full support in Chrome 99+, Safari 15.4+, Firefox 97+.
  • The relational selector (:has()): Full support in Chrome 105+, Safari 15.4+, Firefox 121+.
  • Scroll-Driven Animations: (e.g. parallax) Run natively in Chrome 115+. In older browsers the framework automatically falls back to a lightweight JavaScript polyfill.
  • Native modals (<dialog>): Full support in all modern browsers.
  • CSS Anchor Positioning + the implicit popover anchor: this sets the floor Chrome/Edge 133+, Firefox 147+, Safari 26+. Four components anchor themselves to the button that opens them: .dropdown-menu[popover], .popover-context, .select-search-menu, .custom-select-dropdown. Anchor positioning itself is older (Chrome 125) and the two are separate things: in the Chrome/Edge 125-132 band anchor() parses correctly, so the @supports not (top: anchor(bottom)) fallback does not fire, yet there is no implicit anchor. No CSS feature query can detect this, which is why the band is closed by molique-popover-anchor.js (loaded automatically): it gives the trigger an explicit anchor-name and points the menu's position-anchor at it. Without the JS the floor stays at 133+. Below the anchor-positioning threshold the fallback works normally (a centred panel). Not affected: .mega-menu (explicit anchor-name) and .tour-tooltip (anchor assigned by JS) - those work from Chrome 125.