Repository navigation
Fix weird spacing on Start Session button in empty console - #14445
Conversation
The Button component renders a native <button> element which has
browser UA default padding (1px 6px). When used inline within a
text sentence ("There is no session running. Use [Start Session]
to start one."), this padding creates unwanted vertical and
horizontal whitespace around the button text.
This was introduced in #12795 which replaced PositronButton (a
<div role='button'> with no default browser padding) with the
Button component (a native <button>).
Fix by adding padding: 0 and vertical-align: baseline to the
.link class in emptyConsole.css, which resets the browser
default button padding and keeps the button text aligned with
the surrounding text.
Fixes #14155
|
E2E Tests 🚀 |
PETE's assessment 🧪Verdict: 🟡 Not applicable -- the change is a 2-line CSS tweak ( What changed
Tests in this PR
Existing coverage
Suggested additionsNone. PETE (Positron Extreme Test Experiment) - LLM-based test-coverage advisor, in pilot. Triggers on PR open and on |
This is a non-fork PR applying the commits from #14381 by @PGupta-Git because of the problems outlined in #14155.
Fixes #14155
Description
Fixes the weird spacing around the Start Session button in the Console when no session is running.
Root Cause
This was introduced in #12795 which replaced
PositronButton(a<div role="button">with zero browser-default padding) with theButtoncomponent (a native<button>element).Native
<button>elements have browser UA stylesheet default padding (1px 6px). When used inline within a text sentence — "There is no session running. Use [Start Session] to start one." — this padding creates unwanted vertical and horizontal whitespace around the button text, making it look like a hyperlink with extra internal spacing.Fix
Added two CSS properties to the
.linkrule inemptyConsole.css:This resets the UA default padding for the button in this specific inline-text context only (scoped to
.empty-console .title .link), without affecting theButtoncomponent globally.Release Notes
New Features
Bug Fixes
Validation Steps
@:console
@:sessions
emptyConsole.vitest.tsxcontinue to pass — they verify the text content and click behavior, which are unaffected.