Skip to content

Commit

Permalink
Add "kv-" prefix to internal CSS classes with !important flag (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjaros committed Dec 1, 2024
1 parent 47978ae commit adf3ad3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/jsTest/kotlin/test/io/kvision/html/CustomTagSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CustomTagSpec : DomSpec {
root.add(tag)
val element = document.getElementById("test")
assertEqualsHtml(
"<custom-element class=\"text-center\">This is &lt;b&gt;custom element&lt;/b&gt;</custom-element>",
"<custom-element class=\"kv-text-center\">This is &lt;b&gt;custom element&lt;/b&gt;</custom-element>",
element?.innerHTML,
"Should render correct custom html tag"
)
Expand Down
6 changes: 3 additions & 3 deletions src/jsTest/kotlin/test/io/kvision/html/TagSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TagSpec : DomSpec {
root.add(tag)
val element = document.getElementById("test")
assertEqualsHtml(
"<h1 class=\"text-center\">This is &lt;b&gt;h1&lt;/b&gt;</h1>",
"<h1 class=\"kv-text-center\">This is &lt;b&gt;h1&lt;/b&gt;</h1>",
element?.innerHTML,
"Should render correct html tag"
)
Expand All @@ -55,7 +55,7 @@ class TagSpec : DomSpec {
root.add(tag)
val element = document.getElementById("test")
assertEqualsHtml(
"<h1 class=\"text-end\"><span style=\"display: contents;\">This is <b>h1</b></span></h1>",
"<h1 class=\"kv-text-right\"><span style=\"display: contents;\">This is <b>h1</b></span></h1>",
element?.innerHTML,
"Should render correct html tag"
)
Expand All @@ -72,7 +72,7 @@ class TagSpec : DomSpec {
root.add(tag)
val element = document.getElementById("test")
assertEqualsHtml(
"<p class=\"text-end\"><del>This is test</del><a href=\"/x\">abc</a></p>",
"<p class=\"kv-text-right\"><del>This is test</del><a href=\"/x\">abc</a></p>",
element?.innerHTML,
"Should render correct html tag with children"
)
Expand Down

0 comments on commit adf3ad3

Please sign in to comment.