CSS and Tailwind coverage#
leptoskit implements a defined subset of CSS through built-in Tailwind utilities and typed layout properties. It does not implement a general CSS stylesheet parser or a browser engine. Full CSS includes document formatting, selectors, painting, typography, interaction, and media output beyond Yoga layout.
This audit groups behavior by the modules in the W3C CSS Snapshot 2026, published on 22 June 2026. Module names identify the relevant specification. No row claims complete module conformance. The shared utility compiler accepts the same subset on native and web, even when a browser supports additional CSS.
Modules and properties outside the listed subset have no shared CSS support contract.
Defaults and units#
Built-in components use React Native-style layout defaults on both renderers:
| Setting | Default |
|---|---|
| Layout | Flex, column direction, no wrap, stretched children |
| Flex growth and shrink | 0 growth and 0 shrink |
| Sizing box | Border box |
| Position | Relative |
| Text | System font, 14 logical pixels, regular weight |
| Root | A View or ScrollView fills the viewport's width |
| Utility spacing | One scale unit is 0.25rem, or 4 logical pixels on native |
rem | 16 logical pixels on native; the document root font size in a browser |
A root View or ScrollView fills the window's width, less its margins and within its maximum width, and grows with its content, as a div fills a web page: add min-h-screen to fill the height too. Text or a control at the root, such as a Button, keeps its own size, as inline content and form controls do on the web.
The 14-pixel text default does not change rem resolution on native. text-base sets a 16-pixel font. Named text size utilities set font size only. They do not add Tailwind's usual line height.
| Variant | Minimum width | CSS width |
|---|---|---|
sm | 640 logical pixels | 40rem |
md | 768 logical pixels | 48rem |
lg | 1024 logical pixels | 64rem |
xl | 1280 logical pixels | 80rem |
2xl | 1536 logical pixels | 96rem |
Arbitrary pixel widths work the same way: min-[968px]:flex from 968 logical pixels, and max-[968px]:hidden below them. Minimum widths are inclusive. max-* widths are exclusive. Browser media queries resolve rem against the browser's initial font size, so user font settings can produce different physical breakpoint widths from native. dark uses the browser's prefers-color-scheme query or the native host's set_dark_mode value.
active applies while a Button or Pressable is held down: CSS :active in a browser, and the platform's own pressed state on native. It is valid only on those two controls. While they apply, active rules override responsive and dark-mode rules, as the extra specificity of :active does in CSS. A control without active rules dims to 70 percent of its opacity while held, unless it is a Button that keeps its native chrome. Style the pressed state covers when each platform starts and ends a press.
Supported length values are px, rem, %, vw, vh, and unitless zero. Percentages are available where the property has a percentage representation. Font sizes, border widths, and radii require absolute or viewport lengths. Margin and inset utilities accept negative values. Padding and gaps reject negative values.
Padding also accepts safe and safe-offset-* values, such as pt-safe and pb-safe-offset-4. They resolve to the native host's safe-area inset for each edge, plus an absolute offset, and to env(safe-area-inset-*) in CSS. Margins, insets, and negative safe-area padding are not supported.
Parsed numeric magnitudes are bounded to one million, including computed fractions; overflowing conversions are errors. Native viewport-length calculations use wider intermediates and cap their results at one billion logical pixels. max-w-none and max-h-none remove a maximum; automatic min/max content sizing is outside the utility subset.
Layout modules#
| Specification | Implemented behavior and evidence | Unsupported or partial behavior |
|---|---|---|
| Box Model | Padding, margins, auto margins, borders in layout, percentage edges, and signed margins. | Margin collapsing and block formatting contexts. Logical-edge utilities such as ps-* and ms-*. |
| Sizing | Width, height, minimums, maximums, percentages, aspect ratio, border-box, and content-box. | min-content, max-content, and fit-content utility values. Native measurement has intrinsic-size inputs, but that is not general CSS intrinsic sizing. |
| Flexible Box Layout | Direction, reversal, wrapping, grow, shrink, basis, auto margins, gaps, main-axis distribution, and cross-axis alignment. | order, baseline alignment, safe and unsafe alignment, and complete browser automatic minimum-size rules. |
| Grid Layout | Explicit and implicit tracks, fixed and percentage tracks, fr, minmax, integer repeat, gaps, spans, signed line indices, auto flow, and item alignment. grid-cols-N produces repeat(N,minmax(0,1fr)). Flexible tracks use Blink-style binary32 leftover-carry into 1/64 CSS-pixel layout units so Yoga frames match Chrome for the grid parity fixtures (0 mismatches at 0.01px). | Subgrid, named lines and areas, auto-fit, auto-fill, masonry, and general intrinsic track keywords. The compiler limits templates to 256 tracks and line indices to nonzero values between -10000 and 10000. Sticky positioning stays unsupported. |
| Positioned Layout | Relative offsets and absolute positioning with physical insets. | Static, fixed, and sticky utility positioning. The low-level PositionType::Fixed currently behaves as absolute on native and is not a portable fixed-position contract. Stacking contexts and z-index utilities. |
| Display | flex, grid, and hidden. contents flattens children for layout. | Block and inline formatting, inline-flex, tables, list-item layout, floats, and clearing. contents does not establish full CSS painting or accessibility behavior. |
| Box Alignment | Start, end, center, stretch, selected space distribution, and grid placement alignment. | First and last baselines, baseline participation, and safe and unsafe modifiers. |
| Overflow | Visible overflow, clipping, ScrollView, and overflow-scroll lowering on a View. | Per-axis overflow utilities, overflow-auto, overflow clip margins, text ellipsis, and fragmentation. Native scroll callbacks are not delivered. |
| Writing Modes | Typed left-to-right and right-to-left row direction, with tested reverse-direction interaction. | Vertical writing, text orientation, full bidi layout, and logical-property utilities. Native TextAlign::End maps to the right edge, so RTL text-end parity is not implemented. |
| Multi-column Layout | None. | Columns, column balancing, and column spanning. |
| Fragmentation and Paged Media | None. | Break rules, page boxes, running headers, and printed-page layout. |
Text, painting, and images#
| Specification | Implemented behavior and evidence | Unsupported or partial behavior |
|---|---|---|
| Fonts | Font size, italic and not-italic, and regular 400, medium 500, semibold 600, and bold 700 weights. Native measurement and AppKit drawing share TextStyle. Italic draws on the web, in the terminal, on Linux (GTK), on Android, and on experimental HarmonyOS (ArkUI). | Other weights, font-family utilities, italic on AppKit, UIKit, and Win32 (those backends still draw upright), @font-face, variable-font axes, and OpenType controls. |
| Text and Text Decoration | Inherited foreground color, font size, font weight, and text alignment. Native labels wrap at word boundaries. text-start, text-center, and text-end map to the available alignment props. | Line height, letter spacing, word spacing, text transform, text decoration, hyphenation, detailed whitespace controls, and full inline formatting. TextRun is a native label, not an inline attributed span. |
| Color | The built-in default palette, black, white, transparent, hex colors, alpha modifiers, and element opacity. | Arbitrary rgb(), hsl(), oklch(), relative colors, and color mixing. Palette values are 8-bit sRGB conversions with out-of-gamut clipping. |
| Backgrounds and Borders | Solid and translucent backgrounds, solid border width and color, per-edge border widths (border-t, border-l-2, border-x), and uniform radii. Border classes set both layout metrics and paint props. Per-edge borders paint on the web, in the terminal, on Linux (GTK), on Android, and on experimental HarmonyOS (ArkUI). | Per-edge border paint on AppKit, UIKit, and Win32, which leave a per-edge border undrawn; per-corner radii, border images, background images, gradients, multiple background layers, and shadows. Use overflow-hidden for explicit portable clipping of rounded children. |
| Images and replaced elements | Image(source), explicit box sizing, and aspect ratio. AppKit scales images proportionally within their bounds. Browser images use object-fit:contain. | object-fit and object-position utilities, image-set, CSS image functions, and a shared remote image loader. AppKit accepts local paths and file:// URLs only. |
| Transforms | None. | Translate, rotate, scale, transform origins, and 3D transforms. |
| Compositing and Blending | Element opacity. | Blend modes, isolation, and configurable compositing. |
| Filter Effects and Masking | Rectangular overflow clipping and native rounded-bound clipping. | Filters, backdrop filters, masks, and arbitrary clip paths. |
| SVG styling | No shared SVG component or SVG styling compiler. | SVG geometry, fill and stroke utilities, SVG filters, markers, and SVG text layout. A platform image decoder's SVG support is not a shared SVG API. |
Stylesheets, queries, and interaction#
| Specification | Implemented behavior and evidence | Unsupported or partial behavior |
|---|---|---|
| Syntax and Values and Units | Tailwind tokens compile into typed declarations. Supported arbitrary values use the units above, hex colors, and restricted grid functions. | General CSS source, arbitrary properties, arbitrary selectors, CSS escapes as input syntax, calc, min, max, clamp, em, physical units, container units, and dynamic viewport units. |
| Cascade and Inheritance | Classes override typed base properties. Repeated class calls append. Rules have deterministic ordering, important modifiers, and inherited text props. Web rules use component scopes. | Complete CSS origin and layer ordering, revert, revert-layer, and general initial, inherit, or unset utilities. Equal-rank conflicting utilities are not guaranteed to match upstream Tailwind's ordering. |
| Selectors and Namespaces | The browser adapter generates escaped, scoped class selectors internally. The active variant styles a held Button or Pressable on every renderer. | User selectors, hover, focus, disabled, group (including group-active), peer, attribute, structural, and pseudo-element variants, and active on any other element. HarmonyOS does not apply active yet. |
| Custom Properties | Arbitrary color and length values may be var(--name) or var(--name, fallback) (one nested var() fallback). Color vars also take /opacity. Web keeps the CSS function (or color-mix for opacity) and prepends Theme::css(). Native resolves through Theme. [theme.colors] / [theme.lengths] in leptoskit.toml install with Theme::install_maps. | Deeper nested var(), @theme / tailwind.config files, and loading plugins. |
| Media Queries and Conditional Rules | Default and arbitrary-pixel (min-[968px], max-[968px]) minimum and maximum width variants, ranges, and dark mode. The browser receives real media queries. | Arbitrary media queries, print variants, reduced-motion variants, @supports, container queries, and style queries. |
| Containment | None. | contain, content visibility, and containment-dependent layout. |
| Transitions, Animations, and Easing | No utilities. motion writes keyframes, scroll-driven animation timelines, and easing for elements on the web. | Transitions, and keyframe, timeline, and easing utilities. |
| Scroll Snap and Scrollbars Styling | Platform scrolling through ScrollView; AppKit scrollers automatically hide when unnecessary. | Scroll snapping, smooth-scroll utilities, overscroll behavior, scroll padding and margins, and scrollbar styling. |
| Basic User Interface | Shared buttons and text inputs, enabled state, accessibility labels, and the platform-neutral event vocabulary. Web rendering uses semantic controls. | Cursor, outline, caret, resize, selection-style, and pointer-events utilities. Event and accessibility behavior still depends on the backend. |
| Generated Content, Lists, and Counter Styles | None. | Generated content, list markers, counters, and quote rules. |
| Speech | None. | Aural CSS and speech presentation. Accessibility labels are separate widget semantics. |
Diagnostics#
.try_class and Tailwind::parse return ClassError { class, reason }. .class panics with the same diagnostic. Unsupported tokens are errors on both renderers, including tokens inside inactive variants. Typed low-level fields can expose behavior outside the portable utility subset. Their presence is not a CSS parity guarantee.