Skip to content

Commit cf0e94d

Browse files
committed
fix broken variables
1 parent 0107a41 commit cf0e94d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

lib/ruby_ui/sidebar/collapsiable_sidebar.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def sidebar_attrs
3939
def gap_element_attrs
4040
{
4141
class: [
42-
"relative w-[--sidebar-width] bg-transparent transition-[width]",
42+
"relative w-[var(--sidebar-width)] bg-transparent transition-[width]",
4343
"duration-200 ease-linear",
4444
"group-data-[collapsible=offcanvas]:w-0",
4545
"group-data-[side=right]:rotate-180",
@@ -51,7 +51,7 @@ def gap_element_attrs
5151
def content_wrapper_attrs
5252
{
5353
class: [
54-
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width]",
54+
"fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)]",
5555
"transition-[left,right,width] duration-200 ease-linear md:flex",
5656
content_wrapper_side_classes,
5757
content_wrapper_variant_classes
@@ -78,7 +78,7 @@ def variant_classes
7878
if %i[floating inset].include?(@variant)
7979
"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]"
8080
else
81-
"group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
81+
"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]"
8282
end
8383
end
8484

@@ -92,7 +92,7 @@ def content_wrapper_variant_classes
9292
if %i[floating inset].include?(@variant)
9393
"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]"
9494
else
95-
"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l"
95+
"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l"
9696
end
9797
end
9898
end

lib/ruby_ui/sidebar/mobile_sidebar.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def view_template(&)
1313
Sheet(**attrs) do
1414
SheetContent(
1515
side: @side,
16-
class: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
16+
class: "w-[var(--sidebar-width)] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
1717
style: {
1818
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
1919
},

lib/ruby_ui/sidebar/non_collapsible_sidebar.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def view_template(&)
1010

1111
def default_attrs
1212
{
13-
class: "flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground"
13+
class: "flex h-full w-[var(--sidebar-width)] flex-col bg-sidebar text-sidebar-foreground"
1414
}
1515
end
1616
end

lib/ruby_ui/sidebar/sidebar_menu_skeleton.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def view_template(&)
1111
div(**attrs) do
1212
Skeleton(class: "size-4 rounded-md", data: {sidebar: "menu-skeleton-icon"}) if @show_icon
1313
Skeleton(
14-
class: "h-4 max-w-[--skeleton-width] flex-1",
14+
class: "h-4 max-w-[var(--skeleton-width)] flex-1",
1515
data: {sidebar: "menu-skeleton-text"},
1616
style: {"--skeleton-width" => "#{skeleton_width}%"}
1717
)

0 commit comments

Comments
 (0)