Skip to content

Commit

Permalink
Restore more Ada accordion styling
Browse files Browse the repository at this point in the history
  • Loading branch information
jacbn committed Feb 11, 2025
1 parent 337935b commit 605b191
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/app/components/elements/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ export const Accordion = withRouter(({id, trustedTitle, index, children, startOp

return <div className={classNames("accordion", {"active-border": isPhy && !page && isOpen})}>
<button
className={classNames("accordion-header d-flex w-100 p-0 align-items-stretch", {"de-emphasised": deEmphasised || disabled, "active": isOpen})}
className={classNames(
"accordion-header d-flex w-100 p-0 align-items-stretch",
{"de-emphasised": deEmphasised || disabled, "active": isOpen, "btn btn-link": isAda}
)}
id={anchorId || ""} type="button"
tabIndex={disabled ? -1 : 0}
onFocus={(e) => {
Expand Down Expand Up @@ -182,7 +185,7 @@ export const Accordion = withRouter(({id, trustedTitle, index, children, startOp
</>
)}
</span>}
<div className="d-flex ps-3 align-items-center flex-grow-1">
<div className={classNames("d-flex align-items-center flex-grow-1", siteSpecific("ps-3", "ps-1"))}>
{/* FIXME Revisit this maybe? https://github.com/isaacphysics/isaac-react-app/pull/473#discussion_r841556455 */}
<span className="accordion-part p-3 text-theme text-nowrap">Part {ALPHABET[(index as number) % ALPHABET.length]} {" "}</span>
{trustedTitle && <div className="accordion-title p-3 ps-1">
Expand Down
2 changes: 1 addition & 1 deletion src/scss/common/accordions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
}
}

.accordion-title {
.accordion-part, .accordion-title {
line-height: 1.5;
}

Expand Down
1 change: 0 additions & 1 deletion src/scss/cs/accordions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
}

.accordion button.accordion-header {
background: none;
span, button, button:hover {
color: black !important;

Expand Down

0 comments on commit 605b191

Please sign in to comment.