Skip to content

Printing page with annotation includes list marker and annotation number #8204

@joapuiib

Description

@joapuiib

Context

No response

Bug description

Both ::marker and ::before are shown in annotations when printing a page using pymdownx.fancylists extension.

markdown_extensions:
  - attr_list
  - pymdownx.fancylists

Printed content:
Image


This is due because pymdownx.fancylists sets lists type. The current CSS rule for handling these overrides the annotation styles.

.md-typeset ol[type], .md-typeset ul[type] {
    list-style-type: revert-layer;
}

.md-typeset .md-annotation-list {
    counter-reset: xxx;
    list-style: none;
}

Possible fix:

.md-typeset .md-annotation-list {
    counter-reset: xxx;
    list-style: none !important;
}

Related links

Reproduction

9.6.12-annotations-number-print.zip

Steps to reproduce

  1. Print the landing page.

    Also, window.dispatchEvent(new Event("beforeprint")); shows the issue.

  2. Check that the annotation has both ::marker and ::before.

Browser

Chrome

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions