Skip to content

Commit 99f3657

Browse files
committed
Remove !important from default CSS font-weight selectors
Updated the CSS selectors in the asset copying logic to match rules without the !important flag by default. This allows custom font-weight values to be injected with !important only when configured, improving CSS override flexibility.
1 parent ef5ae92 commit 99f3657

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sphinx_proof/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ def copy_asset_files(app: Sphinx, exc: Union[bool, Exception]):
8686
css_content = f.read()
8787
if app.config.proof_number_weight:
8888
css_content = css_content.replace(
89-
"div.proof > p.admonition-title > span.caption-number {\n font-weight: var(--pst-admonition-font-weight-heading) !important;\n}", # noqa: E501
89+
"div.proof > p.admonition-title > span.caption-number {\n font-weight: var(--pst-admonition-font-weight-heading);\n}", # noqa: E501
9090
f"div.proof > p.admonition-title > span.caption-number {{\n font-weight: {app.config.proof_number_weight} !important;\n}}", # noqa: E501
9191
)
9292
if app.config.proof_title_weight:
9393
css_content = css_content.replace(
94-
"div.proof > p.admonition-title {\n font-weight: var(--pst-admonition-font-weight-heading) !important;\n}", # noqa: E501
94+
"div.proof > p.admonition-title {\n font-weight: var(--pst-admonition-font-weight-heading);\n}", # noqa: E501
9595
f"div.proof > p.admonition-title {{\n font-weight: {app.config.proof_title_weight} !important;\n}}", # noqa: E501
9696
)
9797
out_path = Path(app.outdir).joinpath("_static", os.path.basename(path))

0 commit comments

Comments
 (0)