Modules and capabilities·/docs/styling-and-lpcss

Styling, CSS engine, and Tailwind plugin

Write ordinary stylesheets or scoped CSS modules. Web uses the browser's CSS engine. iOS, Android, macOS, Windows and Linux share Lakeport's native CSS and layout engine.

Native CSS coverage

The native engine has conformance fixtures for these feature families. Support can depend on the specific value, interaction, or platform control.

•
Layout covers flexbox, grid, subgrid, tables, multicolumn layout, vertical writing modes and ruby.
•
Selectors and containment cover container queries, @scope, :has(), :lang() and registered custom properties.
•
Motion covers anchor positioning, scroll-driven animations and same-document view transitions.
•
Paint and type cover OKLCH, image sets, in-document SVG paint references, font palettes and language-aware hyphenation.

The visual suites compare selected Linux, Windows and Apple renders against Chrome. The milestone reports record per-fixture differences and thresholds. Android coverage includes separate NDK, JNI and host checks.

CSS milestones, fixtures and open checks

Using Tailwind CSS

Install the Tailwind version used by the Lakeport fixtures in your project:

sh
npm install -D tailwindcss@4.3.5 @tailwindcss/cli@4.3.5

Add @import "tailwindcss"; to the entry stylesheet. The Lakeport CLI detects that import, scans .lp and .lean files, and caches the Tailwind output by content. It bundles the resulting CSS for Web and compiles the supported rules for native targets. lakeport check reports invalid static class references.

Standard CSS & scoped modules (import_css)

Point lakeport.json (or lakefile.toml) at your entry stylesheet (src/app.css). Lakeport bundles recursive @import graphs with cycle detection, resolves custom fonts and content-hashed url(...) assets, validates static class references in .lp at compile time, and compiles stylesheets for both Web and native targets.

For component-scoped styles beside global CSS, use import_css:

lean
import_css Card from "./Card.css"

Advanced: inspecting compiled native stylesheets (.lpcss)

For native targets, Lakeport compiles standard .css into a compact binary stylesheet format (.lpcss) at build time. You never author .lpcss by hand, though the CLI exposes commands to compile and inspect it when debugging:

sh
lakeport compile-lpcss src/app.css /path/to/output.lpcss
lakeport inspect-lpcss /path/to/output.lpcss