# GSS — GPU Style Sheets

## Style sheets for the GPU.

If you can write CSS, you can write GSS. Your 3D scene is a style sheet, and the GPU draws it.

- [Open the playground](https://www.gss-lang.dev/playground)
- [Read the docs](https://www.gss-lang.dev/docs) (also [as Markdown](https://www.gss-lang.dev/llms.txt))

## Your selectors

Classes, ids, `:last-child` and the cascade pick the objects, like the elements of a page.

```css
@scene { cube.key * 4; }
.key:last-child { color: #ff5a36; }
```

## Your animations

`:hover`, `transition` and `@keyframes` move the scene the way they move a page.

```css
.key { transition: 0.2s ease-out; }
.key:hover { translate: 0 0.2 0; }
```

## Your variables

`var()`, `calc()`, `@media` and `light-dark()` fit the scene to the page around it.

```css
scene { --accent: #ff5a36; }
cube { color: var(--accent); }
```

## Edit it. It compiles as you type.

The home page runs a live scene next to its code: edit the code and the scene compiles again. Drag to orbit, scroll to zoom. The same in the [playground](https://www.gss-lang.dev/playground).

## GSS in numbers

15 shapes, 86 properties, 20 selectors, 1 shader.

## npm package

Compile and render GSS in your application, with TypeScript types included.

```sh
npm install gss-lang@0.0.8
```

[Package setup](https://www.gss-lang.dev/docs#install-package)

## Vite plugin

Included in gss-lang. Import .gss files and ship the runtime with the compiled scene.

```js
import gss from "gss-lang/vite";
```

[Vite setup](https://www.gss-lang.dev/docs#install-vite)

## CDN

Load the versioned browser module, then add a `<gss-scene>` to your page.

```html
<script type="module" src="https://cdn.jsdelivr.net/npm/gss-lang@0.0.8/lib/embed.js"></script>
```

[CDN setup](https://www.gss-lang.dev/docs#install-cdn)

## Thank you to everyone whose work is in GSS

Want to be on this list? Read the [contributing guide](https://github.com/LukyVj/GSS/blob/main/CONTRIBUTING.md), then open a pull request.

## Contact

Questions, ideas, a scene to show? Say hi on X, [@GSS_lang](https://x.com/GSS_lang), or [open an issue](https://github.com/LukyVj/GSS/issues) on GitHub.
