Changed: DB Params

This commit is contained in:
2025-03-20 12:35:13 +01:00
parent 8640a12439
commit b71b3d12ca
822 changed files with 134218 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
package testcssexpression
const red = "#ff0000"

View File

@@ -0,0 +1,19 @@
package testcssexpression
import (
"testing"
"github.com/a-h/templ"
"github.com/google/go-cmp/cmp"
)
var expected = templ.ComponentCSSClass{
ID: "className_34fc0328",
Class: templ.SafeCSS(`.className_34fc0328{background-color:#ffffff;max-height:calc(100vh - 170px);color:#ff0000;}`),
}
func TestCSSExpression(t *testing.T) {
if diff := cmp.Diff(expected, className()); diff != "" {
t.Error(diff)
}
}

View File

@@ -0,0 +1,7 @@
package testcssexpression
css className() {
background-color: #ffffff;
max-height: calc(100vh - 170px);
color: { red };
}

View File

@@ -0,0 +1,23 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.833
package testcssexpression
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
func className() templ.CSSClass {
templ_7745c5c3_CSSBuilder := templruntime.GetBuilder()
templ_7745c5c3_CSSBuilder.WriteString(`background-color:#ffffff;`)
templ_7745c5c3_CSSBuilder.WriteString(`max-height:calc(100vh - 170px);`)
templ_7745c5c3_CSSBuilder.WriteString(string(templ.SanitizeCSS(`color`, red)))
templ_7745c5c3_CSSID := templ.CSSID(`className`, templ_7745c5c3_CSSBuilder.String())
return templ.ComponentCSSClass{
ID: templ_7745c5c3_CSSID,
Class: templ.SafeCSS(`.` + templ_7745c5c3_CSSID + `{` + templ_7745c5c3_CSSBuilder.String() + `}`),
}
}
var _ = templruntime.GeneratedTemplate