Skip to content

fix(css): repair invalid rules and remove unused ones - #437

Merged
TheWitness merged 1 commit into
Cacti:developfrom
somethingwithproof:fix/css-cleanup
Oct 26, 2026
Merged

TheWitness merged 1 commit into
Cacti:developfrom
somethingwithproof:fix/css-cleanup

Conversation

@somethingwithproof

Copy link
Copy Markdown
Member

Description

Replaces the // comments before the two @media blocks in css/common.css with /* */ comments so the blocks are parsed. Also removes scroll: auto (not a CSS property), the shadowed second .rpad rule, and rules for classes and ids that nothing in the PHP or JavaScript emits (.header_link, .db_href, .db_href_active, .href_disabled, .texalirig, .red, .panel-link, #detail_in, #block, #generated).

Related Issue

Fixes #436

Motivation and Context

The responsive panel widths have never applied. At a 400 px viewport the panels stay 340, 460 and 580 px wide.

How Has This Been Tested?

Stylelint 17.16.0 with stylelint-config-recommended and no-duplicate-selectors: 4 problems before, 0 after.

Computed styles of 44 probe elements, in and outside the plugin wrappers, were recorded in headless Chrome for common.css alone and with each of the 12 themes at 1200, 600 and 400 px, before and after. At 1200 px nothing differs. The only differences are the panel width, min-width and overflow at 600 and 400 px, which now follow the media rules. The removed rules had no effect on any probe.

The 600 px rules were not checked on a live dashboard, only on probe elements.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

The // comments before the two @media blocks made the browser drop both, so
the responsive panel widths never applied.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@TheWitness
TheWitness merged commit fb6a1c7 into Cacti:develop Oct 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Responsive panel widths never apply because of // comments in common.css

2 participants