Skip to content

Commit

Permalink
Stretch Only the Last Cell in Candidate List
Browse files Browse the repository at this point in the history
  • Loading branch information
graphemecluster committed May 28, 2024
1 parent 44e9e78 commit 977dd30
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Candidate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ export default function Candidate({ isHighlighted, info, selectCandidate, delete
return definitions.length ? [<td key={index} className={commentStyle400}>{definitions}</td>] : [];
})
: !!labelColSpan && <td className={commentStyle400} colSpan={labelColSpan}>{entry.formattedLabels?.join(" ")}</td>}
<td className={`font-geometric text-[11pt] ${commentStyle200} align-middle`}>{!index && info.hasDictionaryEntry(prefs) && "ⓘ"}</td>
<td className={`font-geometric text-[11pt] ${commentStyle200} align-middle text-right w-full`}>{!index && info.hasDictionaryEntry(prefs) && "ⓘ"}</td>
</tr>
) || <tr>
<td className={`font-geometric text-[11pt] ${commentStyle200}`}>{info.label}</td>
<td className={`${prefs.isHeiTypeface ? "font-hei" : "font-sung"} text-[13pt]${isHighlighted ? " bg-primary text-primary-content" : ""}`}>{info.text}</td>
<td className={commentStyle400} colSpan={labelColSpan + 2}>{(!info.isReverseLookup || prefs.showReverseCode) && info.note}</td>
<td className={`${commentStyle400} w-full`} colSpan={labelColSpan + 2}>{(!info.isReverseLookup || prefs.showReverseCode) && info.note}</td>
</tr>}
</button>
</tbody>;
Expand Down
2 changes: 1 addition & 1 deletion src/CandidatePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default function CandidatePanel({ runAsyncTask, textArea, prefs, deploySt
</button>
</div>
</div>
<table ref={candidateList} className="candidates w-full">
<table ref={candidateList} className="candidates">
{inputState.candidates.map((candidate, index) =>
<Candidate
key={index}
Expand Down
8 changes: 4 additions & 4 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@
}
.candidates button {
tr:first-child td:first-child {
@apply rounded-ss-md;
@apply rounded-ss-md min-w-1.5;
}
tr:first-child td:last-child {
@apply rounded-se-md;
@apply rounded-se-md min-w-1.5;
}
tr:last-child td:first-child {
@apply rounded-es-md;
@apply rounded-es-md min-w-1.5;
}
tr:last-child td:last-child {
@apply rounded-ee-md;
@apply rounded-ee-md min-w-1.5;
}
}
@supports selector(:has(*)) {
Expand Down

0 comments on commit 977dd30

Please sign in to comment.