Skip to content

Commit

Permalink
chore(components): add the utility style for visually hidden elements
Browse files Browse the repository at this point in the history
  • Loading branch information
desmondinho committed Jul 3, 2024
1 parent 56d60eb commit e8fb98f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/LumexUI/Components/Checkbox/LumexCheckbox.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
data-checked="@_checked"
tabindex="1"
@attributes="@AdditionalAttributes">
<span class="sr-only">
<span class="@Utils.VisuallyHidden">
<input type="checkbox"
value="@true"
checked="@_checked"
Expand Down
4 changes: 4 additions & 0 deletions src/LumexUI/Styles/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ namespace LumexUI.Styles;

internal class Utils
{
public readonly static string VisuallyHidden = ElementClass.Empty()
.Add( "sr-only" )
.ToString();

public readonly static string GroupFocusVisible = ElementClass.Empty()
.Add( "outline-none" )
.Add( "group-focus-visible:z-10" )
Expand Down

0 comments on commit e8fb98f

Please sign in to comment.