Skip to content

Commit b29f69d

Browse files
author
DavidQ
committed
Remove the remaining targeted inline style="" attributes and move the rules into shared CSS.
Prefer reuse of higher-level existing CSS when the rules already match or are close enough. Create new shared CSS classes/selectors only when necessary. PR: BUILD_PR_STYLE_INLINE_ATTR_CLEANUP_FINAL
1 parent d8949ac commit b29f69d

8 files changed

Lines changed: 101 additions & 28 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Inline style-attribute cleanup strategy
2+
3+
Priority:
4+
1. Reuse existing higher-level shared CSS when the inline rules already match or are close enough.
5+
2. Create new shared CSS classes/selectors only when reuse would be incorrect.
6+
3. Preserve visual behavior/layout as closely as possible.
7+
8+
This PR is intentionally surgical and limited to the remaining known inline style="" occurrences.

docs/operations/dev/codex_commands.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,36 @@ MODEL: GPT-5.4-codex
22
REASONING: high
33

44
COMMAND:
5-
Create BUILD_PR_STYLE_INLINE_CLEANUP_REUSE_HIGHER_LEVEL_CSS
5+
Create BUILD_PR_STYLE_INLINE_ATTR_CLEANUP_FINAL
66

77
Rules:
88
- output ONLY the final zip to:
9-
<project folder>/tmp/BUILD_PR_STYLE_INLINE_CLEANUP_REUSE_HIGHER_LEVEL_CSS.zip
9+
<project folder>/tmp/BUILD_PR_STYLE_INLINE_ATTR_CLEANUP_FINAL.zip
1010
- do NOT create staging folders in <project folder>/tmp
1111
- do NOT modify roadmap in the PR bundle
1212
- Codex updates roadmap during execution only if this PR touches an existing STYLE item execution-backed
13-
- remove all targeted inline <style> blocks
14-
- if the inline styles match or are close to a higher-level existing CSS path, reuse it
13+
- remove all targeted inline style="" attributes
14+
- if the rules match or are close to a higher-level existing CSS path, reuse it
1515
- create new shared CSS only when necessary
1616
- do NOT introduce inline style=""
17+
- do NOT introduce embedded <style> blocks
1718
- do NOT introduce JS-generated styling
1819
- preserve behavior/layout as closely as possible
1920

2021
Targets:
21-
- games/Breakout/index.html
22-
- samples/phase-13/1316/index.html
23-
- samples/phase-13/1316/server/networkSampleADashboardServer.mjs
24-
- samples/phase-13/1317/index.html
25-
- samples/phase-13/1318/index.html
26-
- samples/phase-13/1319/index.html
27-
- samples/phase-13/1319/server/realNetworkDashboard.mjs
28-
- samples/shared/runtimePreviewCapture.html
29-
- tests/index.html
30-
- tests/testRunner.html
31-
- tools/preview/preview_svg_generator.html
32-
- tools/shared/preview/generate-list-previews.html
33-
- tools/shared/preview/generate-previews.html
22+
- tools/Tool Host/index.html
23+
- tools/Vector Map Editor/how_to_use.html
24+
25+
Confirmed inline style targets:
26+
- label.field width:100%
27+
- textarea width:100%
28+
- data-tool-host-mount-container min-height/border/radius/overflow/background
29+
- .callout margin-top:16px
3430

3531
Required work:
36-
1. Audit each inline <style> block.
32+
1. Audit the remaining inline style="" attributes in the targeted files.
3733
2. Reuse higher-level existing CSS when the rules already match or are close enough.
38-
3. Create new shared CSS only if reuse would be incorrect.
39-
4. Remove the inline <style> blocks.
40-
5. Add/adjust stylesheet links accordingly.
34+
3. Create new shared CSS classes/selectors only if reuse would be incorrect.
35+
4. Remove the inline style="" attributes.
36+
5. Update markup to use classes or existing selectors accordingly.
4137
6. Keep the change narrow, testable, and free of inline/embedded styling in the targeted files.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Remove the remaining targeted inline <style> blocks and move the styles into shared CSS.
1+
Remove the remaining targeted inline style="" attributes and move the rules into shared CSS.
22

33
Prefer reuse of higher-level existing CSS when the rules already match or are close enough.
4-
Create new shared CSS only when necessary.
4+
Create new shared CSS classes/selectors only when necessary.
55

6-
PR: BUILD_PR_STYLE_INLINE_CLEANUP_REUSE_HIGHER_LEVEL_CSS
6+
PR: BUILD_PR_STYLE_INLINE_ATTR_CLEANUP_FINAL
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# BUILD_PR_STYLE_INLINE_ATTR_CLEANUP_FINAL
2+
3+
## Purpose
4+
Remove the remaining inline `style=""` attributes and move them into shared CSS using the same reuse-first rule as the inline `<style>` cleanup.
5+
6+
## Single PR Purpose
7+
Eliminate the last known inline style-attribute violations without redesigning layout.
8+
9+
## Targeted Files
10+
- `tools/Tool Host/index.html`
11+
- `tools/Vector Map Editor/how_to_use.html`
12+
13+
## Confirmed Remaining Inline Style Targets
14+
### `tools/Tool Host/index.html`
15+
- `<label class="field" style="width:100%;">`
16+
- `<textarea ... style="width:100%;">`
17+
- `<div data-tool-host-mount-container ... style="min-height: 420px; border: 1px solid rgba(148, 163, 184, 0.35); border-radius: 10px; overflow: hidden; background: rgba(15, 23, 42, 0.45);"></div>`
18+
19+
### `tools/Vector Map Editor/how_to_use.html`
20+
- `<div class="callout" style="margin-top: 16px;">`
21+
22+
## Required Rule
23+
If an inline style attribute matches or is close to rules already appropriate in a higher-level shared CSS path, reuse that CSS destination instead of creating a new file.
24+
25+
## Reuse-First CSS Destination Rules
26+
1. Reuse an existing higher-level CSS file when the rules are already represented or close enough to belong there.
27+
2. Prefer the highest reasonable shared destination that fits the file’s role.
28+
3. Only create a new shared CSS rule/class when reuse would be incorrect.
29+
4. Preserve current visual behavior as closely as possible.
30+
31+
## Required Work
32+
1. Remove all remaining inline `style=""` attributes from the targeted files.
33+
2. Move the rules into reused higher-level CSS where appropriate.
34+
3. Create new shared CSS classes/selectors only when reuse would be wrong.
35+
4. Update markup to use classes or existing selectors instead of inline styles.
36+
5. Do not introduce new inline `style=""`.
37+
6. Do not introduce embedded `<style>` blocks.
38+
7. Do not introduce JS-generated styling.
39+
8. Preserve behavior/layout as closely as possible.
40+
41+
## Acceptance
42+
- targeted files no longer contain inline `style=""`
43+
- higher-level shared CSS is reused whenever close enough
44+
- new CSS classes/selectors are created only when necessary
45+
- visual behavior is preserved closely
46+
- no inline `style=""` introduced
47+
- no embedded `<style>` blocks introduced
48+
- no JS-generated styling introduced
49+
- change is testable

tools/Tool Host/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ <h2>Tool Host Foundation</h2>
2020
</label>
2121
</div>
2222
<div class="meta tools-platform-control-row">
23-
<label class="field" style="width:100%;">
23+
<label class="field tools-platform-field-full">
2424
Optional State JSON
25-
<textarea data-tool-host-state-input rows="5" style="width:100%;" placeholder='{"example":"value"}'></textarea>
25+
<textarea data-tool-host-state-input rows="5" placeholder='{"example":"value"}'></textarea>
2626
</label>
2727
</div>
2828
<div class="meta tools-platform-control-row">
@@ -38,7 +38,7 @@ <h2>Tool Host Foundation</h2>
3838

3939
<section class="panel">
4040
<h3 data-tool-host-current-label>No tool mounted.</h3>
41-
<div data-tool-host-mount-container class="tools-platform-dock-panel" style="min-height: 420px; border: 1px solid rgba(148, 163, 184, 0.35); border-radius: 10px; overflow: hidden; background: rgba(15, 23, 42, 0.45);"></div>
41+
<div data-tool-host-mount-container class="tools-platform-dock-panel tools-platform-mount-container"></div>
4242
</section>
4343
</div>
4444
<div data-tools-platform-status></div>

tools/Vector Map Editor/how_to_use.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ <h3>Notes</h3>
336336
<p>You stay inside the intended scope of the editor and can jump back to the right files quickly.</p>
337337
</div>
338338
</div>
339-
<div class="callout" style="margin-top: 16px;">
339+
<div class="callout callout--spaced">
340340
<div class="path">tools/Vector Map Editor/index.html</div>
341341
<div class="path">tools/Vector Map Editor/README.md</div>
342342
</div>

tools/Vector Map Editor/vectorMapEditor.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,10 @@ body.vector-editor-page {
384384
line-height: 1.45;
385385
}
386386

387+
.vector-map-help-page .callout.callout--spaced {
388+
margin-top: 16px;
389+
}
390+
387391
.vector-editor-page .muted {
388392
color: var(--muted);
389393
}

tools/shared/platformShell.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,22 @@ body.tools-platform-surface .tools-platform-dock-panel {
318318
overflow: auto;
319319
}
320320

321+
body.tools-platform-surface .tools-platform-field-full {
322+
width: 100%;
323+
}
324+
325+
body.tools-platform-surface .tools-platform-field-full textarea {
326+
width: 100%;
327+
}
328+
329+
body.tools-platform-surface .tools-platform-mount-container {
330+
min-height: 420px;
331+
border: 1px solid rgba(148, 163, 184, 0.35);
332+
border-radius: 10px;
333+
overflow: hidden;
334+
background: rgba(15, 23, 42, 0.45);
335+
}
336+
321337
@media (min-width: 1201px) {
322338
body.tools-platform-surface .tools-platform-resize-panel {
323339
min-width: 220px;

0 commit comments

Comments
 (0)