Skip to content

Commit c497245

Browse files
fix: Replace AI hallucination with proper RTL fix (#80)
* fix: proper RTL support as previous was AI hallucination (lol) * docs: changeset * refactor: use global directive to make the llm code reviewer happy
1 parent a616a8e commit c497245

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.changeset/nice-pens-do.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"starlight-sidebar-topics-dropdown": patch
3+
---
4+
5+
Fixed bug introduced by AI hallucination while trying to add RTL layout support

packages/starlight-sidebar-topics-dropdown/components/TopicsDropdown.astro

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ const currentTopic = topics.find((topic) => topic.isCurrent);
106106
padding: 0.3rem 0.5rem;
107107
cursor: pointer;
108108
width: 100%;
109+
--starlight-sidebar-topics-dropdown-gradient-direction: to right;
110+
}
111+
112+
:global(html[dir="rtl"]) .starlight-sidebar-topics-dropdown-button {
113+
--starlight-sidebar-topics-dropdown-gradient-direction: to left;
109114
}
110115

111116
.starlight-sidebar-topics-dropdown-button::before {
@@ -122,7 +127,7 @@ const currentTopic = topics.find((topic) => topic.isCurrent);
122127
)::before {
123128
content: "";
124129
background-image: linear-gradient(
125-
to inline-end,
130+
var(--starlight-sidebar-topics-dropdown-gradient-direction),
126131
var(--sl-color-text-accent) calc(1.4rem + 16px + 2px),
127132
var(--sl-color-gray-5) 0
128133
);
@@ -132,7 +137,7 @@ const currentTopic = topics.find((topic) => topic.isCurrent);
132137
.starlight-sidebar-topics-dropdown-button-icon
133138
) {
134139
background: linear-gradient(
135-
to inline-end,
140+
var(--starlight-sidebar-topics-dropdown-gradient-direction),
136141
var(--sl-color-text-accent) calc(1.4rem + 16px),
137142
var(--sl-color-gray-6) 0
138143
);

0 commit comments

Comments
 (0)