restructure theme css
This commit is contained in:
@@ -78,17 +78,10 @@ func compileCSSBundle(label string, twSources []string, outName string) (bundleS
|
||||
kitCands := tw.Scan(uikitDir(), []string{"**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"})
|
||||
candidates = dedupStrings(append(candidates, kitCands...))
|
||||
|
||||
// Prepend the shared @theme scaffold (kjol jsruntime/styles/theme.css) ahead of the
|
||||
// app's brand style.css so its tokens/vars are in scope. Absent in single-tree
|
||||
// mode (the app's style.css is already complete).
|
||||
input := string(src)
|
||||
if tp := themeCSSPath(); tp != "" {
|
||||
if theme, e := os.ReadFile(tp); e == nil {
|
||||
input = string(theme) + "\n" + input
|
||||
}
|
||||
}
|
||||
|
||||
compiled, count, err := tw.Compile(input, cssDir, candidates)
|
||||
// CompileApp prepends kjol's shared extension layer (tokens, the class-based dark
|
||||
// variant, the chart palette) ahead of the app's brand style.css, so the app
|
||||
// stylesheet carries only brand: base Tailwind → kjol extensions → app brand.
|
||||
compiled, count, err := tw.CompileApp(string(src), cssDir, candidates)
|
||||
if err != nil {
|
||||
return bundleStats{}, fmt.Errorf("tailwind compile (%s): %w", label, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user