LNS web Draft · 27 November 2026

7. Content profile

The Names Browser has no web engine. It draws a fixed subset of HTML and CSS, called LNS Static Profile v1, with Qt Quick. Anything outside the subset is ignored: never run, never fetched.

Describes the profile as implemented in Names Browser core 0.3.6 (static_render.rs, sanitize.rs, cache.rs, lib.rs at 4a3c32a) and written up in STATIC-PROFILE.md. Where the two differ, this page follows the code and says so. The gateway's behaviour is from the round-3 sanitize.mjs.

7.1 Rules

A page is an HTML file: either a file from Logos Storage, verified as in section 6, or the name's on-chain page (section 6.8). The core parses it into a bounded tree, applies the page's CSS, and returns a render tree. The interface draws that tree with native Qt items: boxes, text, images, a canvas for SVG, rows, columns, grids and a scroll view.

The profile describes what the Names Browser draws. A client that draws more is still a client, but a page that uses more will look different in the Names Browser.

7.1.1 Rules every client keeps

A client MUST NOT run page scripts. <script>, inline on* handlers, javascript: URLs and CSS expression() are removed.

A client MUST NOT load a subresource from outside the site. http://, https:// and // URLs in <link>, <img>, @font-face and CSS url() are refused.

Browser: STRIP_CONTENT_TAGS and the URL checks in static_render.rs. Gateway: sanitizeHtml, sanitizeCss, sanitizeSvg and the CSP in sanitize.mjs.

The Names Browser also caps every input (section 7.9). A page over a cap is cut short or the item is dropped. Basecamp does not stall or crash.

7.2 Elements

GroupElements
Documenthtml head title meta link style body
Structureheader nav main section article aside footer div span
Texth1–h6 p a strong b em i small code pre blockquote br hr
Listsul ol li dl dt dd
Tablestable thead tbody tr th td
Mediaimg figure figcaption svg
Disclosuredetails (with open) summary

7.2.1 Attributes

7.2.2 Removed and ignored elements

Removed with their content: script iframe object embed textarea xmp noembed noframes noscript plaintext math template canvas audio video source track input select button.

Ignored, content kept: any other tag, such as form, label, u or a custom element. The tag has no effect, and the text inside it is drawn as ordinary text.

STATIC-PROFILE.md lists button as ignored. The code removes it with its content (STRIP_CONTENT_TAGS in static_render.rs).

7.2.3 Hidden content

The Names Browser drops content that CSS hides or moves out of sight: display: none, visibility: hidden or collapse, clip: rect(…), clip-path: inset(50%), a 1 × 1 box with overflow: hidden, and an absolute or fixed box moved off the top or left. It reads position, top, left, overflow, visibility, clip and clip-path only for this test. It does not position boxes, so a positioned box that stays visible is drawn in normal flow.

7.3 Links

Link targetNames Browser
lns://…Opens in the browser.
Site-relative pathResolved against the current page, opens in the browser.
https://… without credentialsShows a bar with Open in Browser and Copy Link. Never fetched by the Names Browser.
cid://…Parsed and kept as a link in markup, but opening it directly is refused in Names Browser 0.4.6 because nothing pins its SHA-256 and the CID multihash is not verified (sections 4.7 and 6.2.2).
Same-page anchor only, such as #topRemoved. The text is kept, without a link.
http: javascript: data: file: mailto: basecamp:, credentialed URLsRemoved.

A link with a download attribute adds a Save button (section 6.6). Link targets are capped at 1,024 bytes, and an address at 2,048 bytes.

7.4 Selectors

CSS comes from <style> blocks, from up to 16 <link rel="stylesheet"> files on the site, and from style="" attributes.

SelectorExampleSpecificity
Universal*0,0,0
Typeh10,0,1
Class.card0,1,0
ID#hero1,0,0
:root (matches html):root0,1,0
:hover on links and boxesa:hover0,1,0
Compounddiv.card#topsum of parts
Descendant and childnav a, ul > lisum of parts
Selector listh1, h2each on its own

Other pseudo-classes and pseudo-elements, such as ::before and :nth-child(), never match. Attribute selectors and sibling combinators are not in the profile.

7.4.1 Cascade

7.5 Properties

GroupPropertiesValues
Colour and backgroundcolor, background-color, backgroundHex (3, 4, 6, 8 digits), rgb(), rgba(), hsl(), hsla(), named colours, transparent, currentColor. background also takes linear-gradient() with an angle or to <side>.
Textfont-family, font-size, font-weight, font-style, line-height, letter-spacing, text-align, text-decoration, text-transformSite fonts and the generics sans-serif, serif, monospace, system-ui, ui-sans-serif, ui-serif, ui-monospace. Sizes in px, rem, em, %. Weights normal, bold, 100–900. underline, line-through, none.
Boxmargin, padding and their sides, border, border-width, -color, -style, each side, border-radiusOne to four values in px, rem, em. margin: 0 auto centres. Solid borders only. One radius for all corners.
Sizewidth, min-width, max-width, height, min-height, max-heightpx, rem, em, %, vw, auto
Layoutdisplay, flex-direction, flex-wrap, gap, row-gap, column-gap, justify-content, align-items, flexdisplay: block, inline, inline-block, flex, grid, none. flex: a number.
Gridgrid-template-columnspx, fr, auto, repeat(n, …), repeat(auto-fit or auto-fill, minmax(<px>, 1fr))
Effectsopacity, box-shadow0 to 1. One shadow: x, y, blur, spread, colour, or none.
Imagesobject-fitcontain, cover, fill, none, scale-down
Listslist-style, list-style-typenone, disc, circle, square, decimal

Any other property or value is ignored. list-style is handled by the code but is not in STATIC-PROFILE.md.

There are no CSS background images. A declaration whose value contains url( is dropped everywhere except in @font-face, even for a path on the same site. So is any value that contains http:// or https://.

A client MUST ignore CSS url() values that point outside the site, expression() and javascript:.

Browser: parse_css_declarations_capped in static_render.rs drops a declaration containing expression(, javascript:, http://, https://, @import, or (outside @font-face) url(. Gateway: sanitizeCss in sanitize.mjs rewrites url() to site paths or drops it.

7.6 Media queries

Rules inside @media apply only while the condition holds.

7.7 Fonts

A site can bring its own fonts. Without them, text uses the generic families in section 7.5.

@font-face takes font-family, src, font-weight and font-style. src must be a site-relative path or an inline base64 data: font URL of at most 512 KiB. Up to 16 fonts per page, 4 MiB per font file.

Although the CSS parser accepts data:font/ttf, otf, woff and woff2 prefixes (as well as application/x-font-ttf and application/font-woff), the core's font isolator (sanitize_and_isolate_font in cache.rs) only loads raw TrueType (.ttf) and OpenType (.otf) SFNT files. WOFF and WOFF2 are refused, as are fonts declaring reserved system or interface family names. Each loaded font's name table is rewritten to a private family name (section 6.4). The gateway serves .ttf, .otf, .woff and .woff2 to ordinary browsers.

7.8 Images and SVG

7.8.1 Images

An img source may be:

A cid:// source and any outside URL are not loaded. object-fit is supported (section 7.5).

Image limitValue
Raster file4 MiB
Width or height4,096 px
Pixels per image16,777,216 (16 × 1024 × 1024)
Pixels per page67,108,864 (64 × 1024 × 1024)
Inline data: image256 KiB

Page pixel budget. Images already in the interface's memory cache can be drawn before the core's own count is added, so a page can reach about twice the per-page budget. Each image is still capped. Finding N1, partly fixed in 0.4.6.

7.8.2 SVG

Inline <svg> and SVG image files are not drawn by an SVG engine. The core turns a small subset into drawing operations on a canvas.

SVG limitValue
One inline SVG or SVG file64 KiB
Drawing operations per SVG256
defs entries per SVG128
use expansions per SVG64
polygon tokens per element4,096
Path data per SVG64 KiB
Drawing operations per page1,024
Path data per page128 KiB
Canvas width or height2,048 px
viewBox aspect ratioat most 100 : 1

STATIC-PROFILE.md says "max 512 draw ops" per SVG. The code stops at 256 (MAX_SVG_OPS in sanitize.rs).

7.9 Caps

LimitValueWhen passed
HTML per page512 KiBCut short
Parsed nodes per page6,000Cut short
Nesting depth64Cut short
CSS per page, all sources256 KiBRest ignored
CSS rules4,096Rest ignored
CSS declarations16,384Rest ignored
Selectors per rule64Rest ignored
Parts per selector16Selector never matches
Linked stylesheets16Rest ignored
Fonts16 per page, 4 MiB each (raw TTF/OTF only)Not loaded
var() depth8Not resolved
CSS value nesting (calc, repeat, color-mix)8Dropped
Imagessection 7.8.1Not drawn
SVGsection 7.8.2Not drawn or cut short
Download buttons16 per pageNot shown
Title200 charactersCut short

Appendix B lists every limit across the browser, the gateway and the publisher.

7.10 Authoring advice

7.10.1 How the gateway differs

The gateway serves pages to ordinary web browsers. It does not enforce the profile. It removes what is dangerous and lets the visitor's browser draw the rest, so a page can look richer at the gateway than in the Names Browser.

TopicNames BrowserGateway
Who draws the pageQt Quick, profile onlyThe visitor's web browser, full HTML and CSS
Scripts and on* handlersRemovedRemoved, and blocked by script-src 'none'
Unsupported CSS (e.g. ::before, position, transitions)IgnoredPassed through
@importIgnoredKept only for a path on the same site
SVGSmall subset drawn on a canvasA wide allowlist of SVG elements; scripts, animation, foreignObject and outside loads removed
metacharset onlyA short allowlist of names; no http-equiv
FormsTag ignored, input, select, button removedCannot submit: form-action 'none' and a sandbox without forms
Outside linksConfirm barOrdinary links, with noopener noreferrer
Interface addedBadge and address bar outside the pageA banner inside the page that the page cannot hide

The gateway's page CSP is default-src 'none' with style-src 'self' 'unsafe-inline', img-src 'self' data:, font-src 'self' data:, media-src 'self', and 'none' for scripts, connections, objects, frames, form actions and base URIs. The HTTP header adds frame-ancestors 'none' and sandbox allow-downloads. Section 8 has the full list.

7.10.2 Pages that look the same in both

This specification's own pages follow this advice. Their stylesheet uses two declarations outside the profile, overflow-x and border-collapse, for ordinary browsers only.