Wireframe

Wireframe mode is a visual debugging tool built into flexocss. It highlights your grid structure with colored outlines, backgrounds, and info labels so you can spot layout issues at a glance.

Activation

Add id="wireframe" to your <body> tag to enable wireframe mode:

HTML
<body id="wireframe">
  ...
</body>

Wireframe mode is only available when $env is set to 'dev' (the default). In production builds it is excluded entirely.

Display modes

Wireframe supports several display modes that can be combined using classes on the body tag:

Outline mode (default)

With just id="wireframe", each grid element gets a colored outline:

HTML
<body id="wireframe">
  <div class="container">
    <div class="row">
      <div class="fl-box fl-8">...</div>
      <div class="fl-box fl-8">...</div>
    </div>
  </div>
</body>
  • .container — dark outline (#1f2640)
  • .row — purple outline (#aa41c8)
  • .fl-box — blue outline (#3f4b80) with light background

Live example

.fl-box .fl-8
.fl-box .fl-8
.fl-box .fl-5
.fl-box .fl-6
.fl-box .fl-5

Fill mode

Add class="fill" to replace outlines with solid background colors:

HTML
<body id="wireframe" class="fill">
  ...
</body>

Each nesting level gets a distinct color:

  • .container — dark background (#1f2640)
  • .row — purple background (#aa41c8)
  • .fl-box — blue background (#7d96ff)

Live example

.fl-box .fl-8
.fl-box .fl-8
.fl-box .fl-5
.fl-box .fl-6
.fl-box .fl-5

Border mode

Add class="border-{n}" (1 to 5) to add visible borders on top of fill mode. Useful for seeing exact boundaries between adjacent elements.

HTML
<body id="wireframe" class="fill border-2">
  ...
</body>

Live example

.fl-box .fl-8
.fl-box .fl-8
.fl-box .fl-5
.fl-box .fl-6
.fl-box .fl-5

Info mode

Add class="info" to display breakpoint and size labels on each column:

HTML
<body id="wireframe" class="fill border-1 info">
  ...
</body>

Each .fl-box shows a label like *sm 8/16 indicating the current breakpoint and column size. Labels update automatically as the viewport changes.

Live example

*sm 8/16 .fl-box .fl-8
*sm 8/16 .fl-box .fl-8
*sm 5/16 .fl-box .fl-5
*sm 6/16 .fl-box .fl-6
*sm 5/16 .fl-box .fl-5

Combining modes

Modes can be combined freely. Here are the most common combinations:

HTML
<!-- Outline only -->
<body id="wireframe">

<!-- Filled backgrounds -->
<body id="wireframe" class="fill">

<!-- Filled + 2px borders -->
<body id="wireframe" class="fill border-2">

<!-- Full debug: fill + borders + info labels -->
<body id="wireframe" class="fill border-1 info">

Scaffold example

Here is how wireframe mode looks applied to a complete page structure: navigation, hero, three-column features, two-column content, and footer.

logo
nav links
cta
.fl-16 — hero
.fl-sm-16 .fl-lg-5
.fl-sm-16 .fl-lg-5
.fl-sm-16 .fl-lg-6
.fl-sm-16 .fl-lg-10
.fl-sm-16 .fl-lg-6

Environment control

The wireframe module is conditionally compiled based on the $env variable:

SCSS
// Wireframe enabled (default)
@use "@daveaki/flexocss/scss/config" with ($env: 'dev');

// Wireframe disabled for production
@use "@daveaki/flexocss/scss/config" with ($env: 'prod');

When $env is 'prod', all wireframe CSS is excluded from the output, keeping your production bundle clean.

Customization

All wireframe colors and styles are configurable via SCSS variables:

Variable Default Role
$wireframeOutlineContainer#1f2640Container outline color
$wireframeOutlineRow#aa41c8Row outline color
$wireframeOutlineBox#3f4b80Box outline color
$wireframeBgColorContainer#1f2640Container fill color
$wireframeBgColorRow#aa41c8Row fill color
$wireframeBgColorBox#7d96ffBox fill color
$wireframeBgColorInfo#1f2640Info label background
$wireframeColorInfo#e9eeffInfo label text color
← Previous Utilities
Next → Customization