{} / about

About

CSS for 3D scenes.

GSS, GPU Style Sheets, is a language for 3D scenes that reads like CSS. Its compiler turns a style sheet into one shader, and the GPU draws the scene.

What it is

A scene declares its shapes in @scene, then styles them with selectors, the cascade, var(), calc(), :hover, transitions and @keyframes. Where CSS has a notion, GSS takes its syntax and its behavior; what is new is the vocabulary of 3D: shapes, materials, lights, the camera. The compiler writes a single raymarching fragment shader, in GLSL for WebGL2 and in WGSL for WebGPU. There is no Three.js and no mesh: every shape is a distance function.

Who it is for

Designers and front-end developers who know CSS and want 3D on a page without learning a graphics engine first, and language models, which already write CSS well. GSS is also a readable way into shaders: the code it writes can be read next to the scene.

Who makes it

GSS is made by Lucas Bonomi (@LukyVj on GitHub), with the contributors whose pull requests are in it. The code is open source, under the Apache 2.0 license, on GitHub.

Where it stands

GSS is at version 0.0.8, before 1.0: the language still grows, and what changes from one version to the next is in the changelog. It ships as the npm package gss-lang, with a Vite plugin, a browser module to load from a CDN, and an extension for VS Code and the editors of Open VSX.

Where to start

The docs explain every feature with an example to edit live, the playground compiles a scene as you type, and the showcase gathers scenes made with GSS. For language models, the docs are also in Markdown, listed in llms.txt.