Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

go.ufukty.com/gss

Package Overview
Dependencies
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

go.ufukty.com/gss

Go Modules
Version
v0.0.0-20260208123523-df361bbd93f9
Version published
Created
Source

GSS - Go Style Sheets

GSS features a DSL and a program. The DSL can be used to specify CSS like layout and styling rules for individual elements of a canvas. The program can be used to render the an image file of the canvas out of individual elements and GSS rules. In a broad sense GSS is a very basic implementation of CSS. GSS enables Go developers to offer their users dynamic asset creation features using familiar interface without spanning browser like processes during execution.

Writing GSS

User provide two files. One is for the hierarchy of elements:

<div id="main">
  <div id="title">Do we really need to span a browser to render some HTML and CSS?</div>
  <img srcset="bugs@2x.png 2x, bugs@3x 3x" />
  <div id="author">Bugs Bunny</div>
</div>

The other is for styling and layout of elements:

#main {
  width: 400px;
  height: 300px;
  padding: 20px;
}

.title {
  font-family: "Helvetica Neue", sans-serif;
  font-size: 12pt;
}

img {
}

GSS supports plenty of the fundamental CSS selector operators and CSS properties. GSS properties posses very similar behavior to CSS properties.

Rendering GSS

package main

import "go.ufukty.com/gss/pkg/render"

viewport = render.ViewportOptions{
  Width:   "400px",
  Height:  "300px",
  Density: "2x",
}
err := render.Gss(writer, "elements.html", "styles.css", "#main", viewport)

FAQs

Package last updated on 08 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts