Skip to main content

PurgeCSS logo

npm npm NPM

info

PurgeTSS is a toolkit for building mobile apps with the Titanium framework. It adds practical utilities for styling and setup work.

It includes utility classes, icon font support, an Animation module, a simple grid system, and the shades command for generating custom colors.

If you build UI-heavy screens, PurgeTSS keeps you from hand-writing long TSS files.

What it does:

  • 23,300+ utility classes for colors, spacing, typography, layout, and more.
  • Parses XML files and writes an app.tss with only the classes you use.
  • Customizable through config.cjs, with arbitrary values for one-off sizes and colors.
  • Icon fonts for Buttons and Labels: Font Awesome, Material Icons, Material Symbols, and Framework7-Icons.
  • build-fonts command generates fonts.tss with class definitions and fontFamily selectors for any font you drop in.
  • shades command generates color palettes from a hex value.
  • Animation module with 2D transforms, draggable views with collision detection, sequential animations, and position utilities.
  • Grid system for aligning and distributing elements in rows and columns.

Table of Contents


Changelog

v7.13.2

  • purgetss brand --help advertised padding defaults the command does not use: 19 for the adaptive icon and 20 for both splash sets, where the pipeline applies 18, 26 and 26. The seven padding descriptions are now interpolated from the piece table instead of being hand-typed in a second place, with a new test that compares the real --help output against that table. The values documented on this site were already the correct ones.

v7.13.1

  • Four vulnerable transitive dependencies patched, all of which shipped inside v7.13.0: postcss, nanoid, brace-expansion and uuid. Patch bumps within the same major, so package.json is untouched and only the lockfile moves. npm audit reports zero vulnerabilities afterwards.

v7.13.0

  • purgetss brand now covers every image the Titanium template ships. A run on a fresh Alloy project used to leave 28 files wearing the grey Alloy logo: the 16 iPhone launch images, the 11 per-qualifier Android splashes, and appicon.png. The rule is now explicit: if the template ships the file, brand updates it.
  • The brand: config is organized by piece. Each of the 14 pieces takes the same four keys where they apply (logo, padding, background, enabled), and an older block is rewritten to that structure on the next run, carrying over every value you had customized. Unknown keys abort the run instead of being ignored.
  • Breaking: one name per thing across config, flags, --only and the purgetss/brand/ files. --splash--splash-icon, --notification--notification-icon, --feature-logo--feature-graphic-logo, --legacy-splash removed. No aliases were kept.
  • New --only <pieces> filter to regenerate one piece or a group, and logo-launch.* to put your logotype on the iOS launch screen through LaunchLogo.png.
  • New brand.optimize / --optimize: quantizes the generated PNGs to a palette. Off by default because it is lossy: 1.6 MB to 476 KB on the reference set, indistinguishable on flat artwork.
  • shades and semantic no longer strip every comment from config.cjs; they rewrite only the theme: section.

→ See the full changelog for older releases (v7.12.1 and earlier).