Skip to content

Commit 2ca0e68

Browse files
committed
Set the width in only one place.
1 parent adadfd8 commit 2ca0e68

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

browser-extension/src/styles/popup-frame.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/* Popup window frame styles */
2+
:root {
3+
--popup-width: 311px;
4+
}
5+
26
body {
3-
width: 311px;
7+
width: var(--popup-width);
48
padding: 15px;
59
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
610
font-size: 14px;

browser-extension/tests/playground/playground.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ root.render(
99
<div className='container px-6 py-8'>
1010
<div className='bg-white p-6 rounded-lg shadow-sm border border-slate-200 mb-6'>
1111
<h1 className='text-2xl font-bold text-slate-900 mb-2'>Popup Simulator</h1>
12-
<p className='text-slate-600'>
13-
This shows exactly how the table appears in the browser popup (311px width).
14-
</p>
1512
</div>
1613

1714
<div className='popup-frame'>
@@ -21,12 +18,7 @@ root.render(
2118
<div className='bg-slate-50 p-4 rounded-lg border border-slate-200 mt-6 max-w-2xl mx-auto'>
2219
<h3 className='font-medium text-slate-900 mb-2'>Development Notes</h3>
2320
<ul className='text-sm text-slate-600 space-y-1'>
24-
<li>
25-
The popup frame above matches the exact 311px width of the browser extension popup
26-
</li>
27-
<li>
28-
Any changes to <code>popup/style.css</code> will automatically update here
29-
</li>
21+
<li>The popup frame above matches the exact browser extension popup.</li>
3022
<li>Hot reload is active for instant updates</li>
3123
</ul>
3224
</div>

browser-extension/tests/playground/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ body {
1616

1717
/* Popup simulator frame */
1818
.popup-frame {
19-
width: 311px;
19+
width: var(--popup-width);
2020
padding: 15px;
2121
font-size: 14px;
2222
line-height: 1.4;

0 commit comments

Comments
 (0)