CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-tailwindcss--node

Node.js-specific utilities and runtime functionality for Tailwind CSS v4, providing compilation tools, module dependency analysis, source map handling, path normalization, and optimization utilities.

43%

Overall

Evaluation43%

1.16x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-6/

Asset URL Normalizer

Transforms CSS asset references to absolute paths rooted at a provided project base while keeping external/data references intact. Relative URLs are resolved against the directory containing the provided source path before the project root prefix is applied.

Capabilities

Rewrite relative URL references

  • Given CSS background:url("../images/hero.png") from a stylesheet at /styles/home.css with project root /static, rewrite to background:url("/static/images/hero.png") without altering other declarations. @test

Leave external and data URLs untouched

  • URLs starting with /, http, https, protocol-relative //, or data: remain unchanged while adjacent relative URLs still rewrite. @test

Rewrite image-set entries

  • image-set(url("./sprite-1x.png") 1x, url("./sprite-2x.png") 2x) from /styles/icons.css with project root /assets rewrites to /assets/sprite-1x.png and /assets/sprite-2x.png. @test

Preserve quoting and escaping

  • Single-quoted, double-quoted, and unquoted URLs preserve their quoting/escaping after rewriting (e.g., url("./fonts/my font.woff2") -> url("/static/fonts/my font.woff2")). @test

Implementation

@generates

API

export interface RewriteOptions {
  projectRoot: string; // target root prefix for rewritten asset paths
  sourcePath: string; // absolute path to the stylesheet containing the CSS
}

export function rewriteAssetUrls(css: string, options: RewriteOptions): string;

Dependencies { .dependencies }

@tailwindcss/node { .dependency }

Provides CSS URL parsing and rewriting utilities to normalize asset references.

tessl i tessl/npm-tailwindcss--node@4.1.0

tile.json