A well-tested CSS minifier providing fast and efficient CSS optimization and minification.
93
Quality
Pending
Does it follow best practices?
Impact
93%
1.17xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
A utility that processes CSS files and normalizes all asset paths (URLs in url() functions) to be relative to a target output directory, handling cross-platform path differences.
background: url('../images/logo.png') located at src/styles/main.css, when rebasing to output directory dist/, the URL becomes url('images/logo.png') @testbackground: url('../../fonts/icon.woff') located at src/components/button/style.css, when rebasing to dist/css/, the URL becomes url('../fonts/icon.woff') @testbackground: url('https://cdn.example.com/bg.jpg'), the URL remains unchanged after rebasing @testbackground: url('/assets/logo.png'), the URL remains unchanged after rebasing @testbackground: url('data:image/png;base64,iVBORw0KG...'), the data URI remains unchanged after rebasing @test@generates
/**
* Normalizes CSS asset paths relative to a target output directory.
*
* @param {string} cssFilePath - Path to the CSS file being processed
* @param {string} cssContent - The CSS content as a string
* @param {string} targetDir - The target output directory path
* @returns {string} CSS content with normalized asset paths
*/
function normalizeAssetPaths(cssFilePath, cssContent, targetDir) {
// IMPLEMENTATION HERE
}
module.exports = { normalizeAssetPaths };Provides CSS minification and URL rebasing support.
@satisfied-by
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10