Skip to content

Commit

Permalink
chore: add test for style element output
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h committed Sep 30, 2023
1 parent 359009f commit fa536dd
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
5 changes: 5 additions & 0 deletions generator/test-css-usage/expected.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<style>
.test {
color: #ff0000;
}
</style>
<style type="text/css">
.className_f179{background-color:#ffffff;color:#ff0000;}
</style>
Expand Down
5 changes: 5 additions & 0 deletions generator/test-css-usage/template.templ
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ templ PsuedoAttributes() {
}

templ ThreeButtons() {
<style>
.test {
color: #ff0000;
}
</style>
{! Button("A") }
{! Button("B") }
<button class={ templ.Classes(green) } type="button">{ "Green" }</button>
Expand Down
27 changes: 22 additions & 5 deletions generator/test-css-usage/template_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fa536dd

Please sign in to comment.