Skip to content

Reformat lmfdb/templates/style.css for readability#7008

Open
roed-math wants to merge 1 commit into
LMFDB:mainfrom
roed-math:claude/gallant-wright-1078f0
Open

Reformat lmfdb/templates/style.css for readability#7008
roed-math wants to merge 1 commit into
LMFDB:mainfrom
roed-math:claude/gallant-wright-1078f0

Conversation

@roed-math
Copy link
Copy Markdown

@roed-math roed-math commented May 14, 2026

Summary

Pure formatting cleanup of lmfdb/templates/style.css. No selector, declaration, value, comment, or rule order is changed — the rendered output should be byte-identical.

Standardized:

  • 4-space indentation throughout (was a mix of 2/4 spaces)
  • Opening brace on the same line as the selector, single space before
  • Comma-separated selector lists split onto their own lines
  • One declaration per line, single space after the colon
  • Consistent blank-line spacing between rules
  • Section banner comments grouping related rules (base, header, sidebar, properties box, forms, tables, knowls, front-page boxes, scroll wrappers, raw type-set, etc.)

Verified that, before and after the change, the multisets of:

  • selectors (427)
  • property declarations (1004)
  • Jinja {{ ... }} expressions (244)

are identical.

A separate follow-up PR will address the actual bugs and dead code surfaced while reading the file (missing commas in a multi-selector rule, invalid CSS values like vertical-align: center and align-items: top, duplicated span.chargp/span.normgp/span.activesubgp rules, etc.) so this PR stays trivially reviewable.

Test plan

  • git diff --word-diff shows only whitespace, brace, and newline changes
  • Spot-check a few pages locally (homepage, a number field page, a modular form page, the knowls index) to confirm visual output is unchanged

🤖 Generated with Claude Code

Pure formatting cleanup of lmfdb/templates/style.css with no
intended change to rendered output. Standardized:

- 4-space indentation throughout (was a mix of 2/4 spaces)
- Opening brace on same line as selector with a single space before
- Comma-separated selectors split onto their own lines
- One declaration per line, single space after the colon
- Consistent blank-line spacing between rules
- Section banner comments grouping related rules

No selectors, declarations, values, comments, or rule order were
changed. Verified that the multisets of selectors (427), property
declarations (1004), and Jinja `{{...}}` expressions (244) are
identical before and after.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@havarddj
Copy link
Copy Markdown
Contributor

havarddj commented May 15, 2026

While we're cleaning up, it might make sense to fix inconsistencies in whitespace with jinja templates in this file:

{{foo}} vs
{{ foo}} vs
{{ foo }} 

see e.g. line 2474 in the new file.

@edgarcosta
Copy link
Copy Markdown
Member

We should just write what style we want for Jinja and create a STYLE.md so we can try to follow it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants