Skip to content

Commit 34cf173

Browse files
committed
fix: move theme generation to css
1 parent 002cdcd commit 34cf173

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Sources/WebUI/Core/Theme.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,16 @@ public struct Theme {
208208
logger.debug("CSS generation completed with \(propertyCount) properties")
209209
return css
210210
}
211+
212+
public func generateFile() -> String {
213+
"""
214+
@theme {
215+
--breakpoint-xs: 30rem;
216+
--breakpoint-3xl: 120rem;
217+
--breakpoint-4xl: 160rem;
218+
\(self.generateCSS() ?? "")
219+
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
220+
}
221+
"""
222+
}
211223
}

0 commit comments

Comments
 (0)