From 809bc6252a12557fc18c8f3a730a54677d2cc606 Mon Sep 17 00:00:00 2001
From: treastrain / Tanaka Ryoga
Date: Thu, 6 Nov 2025 04:03:12 +0900
Subject: [PATCH] Fix: `Style` class name generation produces invalid
identifiers, breaking style application
Fix #851
---
Sources/Ignite/Styles/Style.swift | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/Ignite/Styles/Style.swift b/Sources/Ignite/Styles/Style.swift
index 4d4e63b8..4e695346 100644
--- a/Sources/Ignite/Styles/Style.swift
+++ b/Sources/Ignite/Styles/Style.swift
@@ -35,7 +35,7 @@ extension Style {
/// The name of the CSS class this `Style` generates,
/// derived from the type name minus the "Style" suffix, if present.
var className: String {
- let typeName = String(describing: type(of: style))
+ let typeName = String(describing: type(of: self))
let baseName = typeName.hasSuffix("Style") ? typeName : typeName + "Style"
let className = baseName.kebabCased()
return className