1
0
mirror of https://github.com/axzilla/templui.git synced 2025-02-21 00:32:58 +00:00

fix: remove .sr-only class and replace with .hidden in toggle component

This commit is contained in:
axzilla 2024-11-27 19:32:42 +07:00
parent 2418abcd63
commit 3c28884765
4 changed files with 2 additions and 26 deletions

View File

@ -629,18 +629,6 @@ body {
}
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
.pointer-events-none {
pointer-events: none;
}

View File

@ -49,7 +49,7 @@ templ Toggle(props ToggleProps) {
id={ props.ID }
type="checkbox"
name={ props.Name }
class="peer sr-only"
class="peer hidden"
role="switch"
{ props.Attributes... }
/>

View File

@ -111,7 +111,7 @@ func Toggle(props ToggleProps) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"peer sr-only\" role=\"switch\"")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" class=\"peer hidden\" role=\"switch\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@ -629,18 +629,6 @@ body {
}
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
.pointer-events-none {
pointer-events: none;
}