Custom Devices

Device profiles drive the compile: each entry in the device map becomes a screen--{name} class with its dimensions, density, and color depth baked in. Configure $custom-devices to add your own profiles without touching framework source.

#

The device map

$devices in framework/config/_devices.scss defines every device profile the framework ships. The map is generated from the platform's device registry (db/data/framework_devices.yml), so it is not edited by hand.

Each entry becomes a screen--<name> class carrying the device's dimensions and rendering variables. Screen shows how the class is used in markup. Every profile carries the same schema:

Key What it sets
screen-w, screen-h Screen dimensions in CSS pixels.
pixel-ratio Physical-to-CSS pixel ratio of the display.
dither-pixel-ratio Ratio dither tiles render at, so patterns stay crisp on high-DPI panels.
ui-scale The device's native interface density factor.
color-depth The grayscale tier: 1, 2, or 4. Full-color profiles carry 12 or 24.
density-tier '1x' or '2x': picks the pixel-font or vector typography tier.
gap-scale Multiplier applied to the gap variables.
size 'sm', 'md', or 'lg': the size class the device extends.
#

Configure your own

Custom stacks add device profiles without touching framework source: configure $custom-devices where you load the framework. Every generator that walks the device set picks the profile up, so a configured device behaves exactly like a built-in one.

// my-build.scss
@use 'framework' with (
    $custom-devices: (
        'my-panel': (
            'screen-w': 1024px,
            'screen-h': 758px,
            'pixel-ratio': 1.0,
            'dither-pixel-ratio': 1.0,
            'ui-scale': 1.0,
            'color-depth': 2,
            'density-tier': '1x',
            'gap-scale': 1.0,
            'size': 'lg'
        )
    )
);
<div class="screen screen--my-panel">
  <div class="view view--full">...</div>
</div>
#

What a profile generates

The JavaScript runtime reads the same variables when it normalizes screen context at render time; see Framework Runtime .

#

The built-in byod profile

The map ships a generic byod_custom profile, so even a released build has a bring-your-own-device class. Apply screen--byod_custom for a quick start without compiling anything, then graduate to $custom-devices when you need your panel's exact dimensions and depth.