15 Repos
Plugins and loaders for minifying, extracting, and purging unused CSS styles.
Explore 15 awesome GitHub repositories matching part of an awesome list · CSS Optimization. Refine with filters or upvote what's useful.
Layui is a web UI component library, frontend layout framework, and CSS asset optimizer. It provides a collection of pre-styled visual elements and layout patterns used to build browser-native web interfaces. The framework enables the composition of structured web pages through standardized design assets and CSS components. It includes tools for compressing stylesheets and resolving imports to improve loading speeds across different web browsers. The library covers web UI development and frontend layout composition, facilitating rapid interface prototyping by assembling functional frontends
Includes tools for minifying and optimizing CSS to improve page load times and rendering.
PostCSS is a CSS post-processor and abstract syntax tree transformation tool that parses stylesheets into a structured tree for programmatic analysis and modification. It functions as a plugin-driven pipeline where JavaScript plugins can modify, insert, or delete nodes to transform styles. The project provides a framework for building a custom plugin ecosystem to extend the CSS language with non-standard features such as loops, conditionals, and shorthand properties. It supports multi-syntax parsing through pluggable parsers and stringifiers, allowing it to process various style formats and c
Implements a pipeline for minifying and purging unused CSS styles to optimize website performance.
Linaria is a zero-runtime CSS-in-JS library and static CSS generator. It evaluates JavaScript expressions at build time to extract styles from tagged template literals into standalone, static CSS files, removing the need for a runtime style injection engine. The library distinguishes itself by mapping component props to CSS custom properties, enabling dynamic styling and runtime property updates without regenerating stylesheets. It utilizes a build-time evaluation engine to resolve interpolations and a hashing system to generate scoped class names that prevent style collisions. The project c
Zero-runtime CSS-in-JS library using build-time transformations.
Critical is a tool for extracting and inlining the minimum CSS required to render above-the-fold content. It identifies the styles necessary for the initial visible portion of a page to reduce render-blocking requests and improve page load speed. The project generates resolution-specific stylesheets to optimize the initial paint across different device dimensions. It includes a utility to rebase asset URLs within extracted styles, ensuring that images and fonts load correctly when stylesheets are moved to different directories or content delivery networks. The tool provides a command-line in
Generates tailored stylesheets for different screen dimensions to ensure optimal above-the-fold rendering across various devices.
PurifyCSS is a CSS unused style remover and payload optimizer that analyzes HTML and templates to identify and delete unused CSS selectors from stylesheets. It functions as a frontend build automation tool that integrates into development pipelines to automatically strip redundant styles and minify assets during the compilation phase. The tool provides specific optimization for single page applications, identifying and removing redundant CSS while ensuring necessary styles are preserved across dynamic views and states. The utility covers a range of capabilities including static content analy
Remove unused CSS selectors from stylesheets.
Uncss is a build pipeline CSS optimizer and optimization tool designed to remove unused styles from stylesheets. It analyzes HTML files to identify and strip selectors that do not match any elements in the markup, reducing the final stylesheet size and overall web page weight. The tool functions as a DOM-based CSS analyzer that can simulate runtime document states. It provides mechanisms to preserve required selectors through the use of literal names, regular expressions, and specialized CSS comment markers to ensure styles triggered by user interactions are not deleted. The project supports
Provides a utility for purging unused CSS styles to optimize stylesheet size.
StyleX is a type-safe CSS-in-JS library and atomic CSS compiler that transforms JavaScript style definitions into optimized static CSS and type-safe class names. It functions as a multi-framework styling tool, generating standard CSS assets compatible with various JavaScript UI frameworks and server components. The system includes a CSS design token system and theme engine for managing shared constants and composing visual schemes. It allows for the creation of light, dark, and custom themes through variable overrides and token inheritance. The project covers component styling through object
Optimizes style definitions into minified and efficient CSS to improve loading speeds.
PurgeCSS ist ein CSS-Purger und -Optimierer für Build-Pipelines, der darauf ausgelegt ist, die endgültige Größe von Stylesheets zu reduzieren. Es fungiert als Tree-Shaking-Tool, das HTML- und JavaScript-Dateien scannt, um ungenutzte Selektoren aus dem CSS zu identifizieren und zu entfernen. Das Tool optimiert CSS-Payloads durch statische Inhaltsanalyse, um zu erkennen, welche Styles tatsächlich im Markup verwendet werden. Es nutzt Regex-basiertes Pattern-Matching, um potenzielle Klassennamen zu finden, ohne Code auszuführen, und verwendet eine PostCSS-basierte AST-Transformation, um ungenutzte Regeln sicher zu löschen. Das Projekt bietet Funktionen für die Frontend-Build-Automatisierung, wodurch das Entfernen ungenutzter Styles direkt in Modul-Bundler und Task-Runner integriert werden kann. Es enthält zudem einen benutzerdefinierten Whitelist-Filter, um essenzielle Selektoren unabhängig vom Scan-Ergebnis zu bewahren.
Remove unused CSS to reduce file size.
loadCSS ist ein asynchroner CSS-Loader und ein nicht-blockierender Stylesheet-Injektor. Er bietet eine technische Implementierung zum Laden von Stylesheets, ohne den Rendering-Prozess des Browsers zu blockieren, um eine reaktionsschnelle Benutzeroberfläche zu erhalten. Das Projekt implementiert ein spezifisches CSS-Lademuster, um zu erkennen, wann asynchrone Stylesheets in verschiedenen Webbrowsern vollständig geladen wurden. Dies ermöglicht die Ausführung von Callback-Funktionen erst nach dem vollständigen Laden eines Stylesheets, um ein konsistentes visuelles Verhalten sicherzustellen. Das Tool deckt programmatisches Einfügen von Stylesheets, dynamische Injektion basierend auf Anwendungslogik und die Erkennung des Stylesheet-Ladevorgangs ab. Es steuert, wie Styles angefordert werden, um die Frontend-Performance zu optimieren.
Asynchronously load CSS files to prevent render-blocking.
cssnano ist ein CSS-Komprimierungs- und Minifizierungstool, das die Dateigröße und den Gzip-Footprint von Stylesheets reduziert. Es fungiert als Optimierer für Build-Pipelines und Code-Transformator, der Leerzeichen und Kommentare entfernt sowie Farben und Verläufe auf ihre kleinstmögliche Repräsentation verkürzt. Das Tool verwendet eine modulare Plugin-Architektur und preset-basierte Optimierungsstufen, um ein Gleichgewicht zwischen Komprimierungsintensität und Browserkompatibilität zu finden. Es ermöglicht die Anpassung der Ausgabe basierend auf einer Zielliste unterstützter Browser, um sicherzustellen, dass minifizierte Styles in verschiedenen Umgebungen kompatibel bleiben. Das Projekt lässt sich in PostCSS-Pipelines und Modul-Bundler integrieren und bietet sowohl ein Command-Line-Interface als auch Automatisierungsmöglichkeiten für die Integration in Build-Prozesse. Dies ermöglicht die Reduzierung der Gesamt-Byte-Größe und der Netzwerklatenz durch automatisierte CSS-Minifizierungs-Workflows.
Provides advanced CSS optimization by minifying styles and shortening colors and gradients for improved page performance.
North ist eine Methodik für responsives Webdesign und eine Sass-basierte CSS-Architektur. Es bietet ein System für den Aufbau von Mobile-First-Benutzeroberflächen unter Verwendung von fluiden Grids und Progressive-Enhancement-Techniken, um eine konsistente Erfahrung über verschiedene Browser-Fähigkeiten und Bildschirmgrößen hinweg zu gewährleisten. Das Projekt bietet ein standardisiertes CSS-Namenssystem, das Sass-Mixins verwendet, um Klassennamen programmatisch zu generieren und zwischen Komponenten, Layouts und Zuständen zu unterscheiden. Es fungiert zudem als Frontend-Projekt-Scaffolding-Tool und bietet einen Generator, um neue Umgebungen mit vorkonfigurierten Stylesheets und Task-Runnern aufzusetzen. Über das Styling hinaus deckt das Framework ein breites Spektrum an Webentwicklungsstandards ab, einschließlich semantischer HTML-Implementierung mit RDFa-Metadaten und Auditing für Web-Barrierefreiheit. Es integriert eine Content-First-Designstrategie und einen agilen Frontend-Workflow, um den Übergang von Informationsarchitektur und User Personas zu produktionsreifen Komponenten zu koordinieren. Das System enthält Tools zur Automatisierung der CSS-Benennung und zum Scaffolding von Projekt-Templates, um das initiale Setup zu beschleunigen.
Reduces stylesheet bloat by preventing the duplication of properties across selectors.
This is a Webpack extension used to extract CSS from JavaScript files into separate, standalone stylesheets for production builds. It functions as a CSS bundler and asset optimizer that separates styles from script bundles to enable parallel loading and prevent flashes of unstyled content. The project provides utilities for generating JavaScript module exports that map local style definitions to application components. It also implements dynamic theme management by conditionally loading different CSS variants via resource queries and supports long-term browser caching through the use of conte
Optimizes CSS delivery by extracting styles from JS to enable parallel loading and prevent FOUC.
This project is a cross-platform mobile project template and TypeScript boilerplate designed for bootstrapping React Native applications using the Expo ecosystem. It provides a pre-configured architecture with a standardized folder structure to accelerate initial development. The template distinguishes itself through a feature-based project architecture and a comprehensive automation suite. It integrates file-based routing for navigation, a utility-first mobile UI kit for styling, and a server state management layer for fetching and caching remote API data. The setup includes a mobile CI/CD p
Scans styles to prevent unknown classes and unnecessary whitespace in utility-first CSS implementations.
astroturf lets you write CSS in your JavaScript files without adding any runtime layer, and with your existing CSS processing pipeline.
Zero-runtime CSS-in-JS library that extracts styles to CSS files.
analyze-css
Analyze CSS complexity and identify performance bottlenecks.