relativeToStylesheet() — tailwindcss Function Reference
Architecture documentation for the relativeToStylesheet() function in migrate-config.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 83dc9d6e_6632_c926_0c80_4208283dda7e["relativeToStylesheet()"] 3429a735_792d_b47b_671d_373ee445fc14["migrateConfig()"] 3429a735_792d_b47b_671d_373ee445fc14 -->|calls| 83dc9d6e_6632_c926_0c80_4208283dda7e fafe253f_5b0a_82ac_9823_6d2c3e638dbd["normalizePath()"] 83dc9d6e_6632_c926_0c80_4208283dda7e -->|calls| fafe253f_5b0a_82ac_9823_6d2c3e638dbd style 83dc9d6e_6632_c926_0c80_4208283dda7e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-upgrade/src/codemods/css/migrate-config.ts lines 94–106
function relativeToStylesheet(sheet: Stylesheet, absolute: string) {
if (!sheet.file) throw new Error('Can not find a path for the stylesheet')
let sheetPath = sheet.file
let relative = path.relative(path.dirname(sheetPath), absolute)
if (relative[0] !== '.') {
relative = `./${relative}`
}
// Ensure relative is a POSIX style path since we will merge it with the
// glob.
return normalizePath(relative)
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does relativeToStylesheet() do?
relativeToStylesheet() is a function in the tailwindcss codebase.
What does relativeToStylesheet() call?
relativeToStylesheet() calls 1 function(s): normalizePath.
What calls relativeToStylesheet()?
relativeToStylesheet() is called by 1 function(s): migrateConfig.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free