Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leader() length determination in ::after bug #1946

Closed
pmjdebruijn opened this issue Aug 28, 2023 · 4 comments
Closed

leader() length determination in ::after bug #1946

pmjdebruijn opened this issue Aug 28, 2023 · 4 comments
Labels
bug Existing features not working as expected
Milestone

Comments

@pmjdebruijn
Copy link
Contributor

It seems when leader() is used in ::after, combined with padding-left, something strange happens, as the page numbers fail to line up nicely:

toc-bug.zip

@pmjdebruijn
Copy link
Contributor Author

pmjdebruijn commented Aug 29, 2023

Result

Lorem Ipsum . . . . . . 1
  Lorem Ipsum . . . . . . 1
    Lorem Ipsum . . . . . . 1

Expected

Lorem Ipsum . . . . . . 1
  Lorem Ipsum . . . . . 1
    Lorem Ipsum . . . . 1

@pmjdebruijn
Copy link
Contributor Author

The following seems to offer workable solution for the time being:

#contentspage ul li a.h2::before { content: '    '; white-space: pre; }
#contentspage ul li a::after { content: ' ' leader(' . ') ' ' target-counter(attr(href), page); font-kerning: none; }

@liZe liZe closed this as completed in 7d45356 Aug 31, 2023
@liZe liZe added the bug Existing features not working as expected label Aug 31, 2023
@liZe
Copy link
Member

liZe commented Aug 31, 2023

Thanks a lot for the bug report! It should now be fixed.

@liZe liZe added this to the 60.0 milestone Aug 31, 2023
@pmjdebruijn
Copy link
Contributor Author

Excellent. Confirmed Fixed.

netbsd-srcmastr referenced this issue in NetBSD/pkgsrc Oct 15, 2023
Version 60.1
------------

Released on 2023-09-29.

Bug fixes:

* `#1973 <https://github.com/Kozea/WeasyPrint/issues/1973>`_:
  Fix crash caused by wrong UTF-8 indices


Version 60.0
------------

Released on 2023-09-25.

New features:

* `#1903 <https://github.com/Kozea/WeasyPrint/issues/1903>`_:
  Print form fields
* `#1922 <https://github.com/Kozea/WeasyPrint/pull/1922>`_:
  Add support for textLength and lengthAdjust in SVG text elements
* `#1965 <https://github.com/Kozea/WeasyPrint/issues/1965>`_:
  Handle <wbr> tag
* `#1970 <https://github.com/Kozea/WeasyPrint/pull/1970>`_:
  Handle y offset of glyphs
* `#1909 <https://github.com/Kozea/WeasyPrint/issues/1909>`_:
  Add a --timeout option

Bug fixes:

* `#1887 <https://github.com/Kozea/WeasyPrint/pull/1887>`_:
  Fix footnote-call displayed incorrectly for some fonts
* `#1890 <https://github.com/Kozea/WeasyPrint/pull/1890>`_:
  Fix page-margin boxes layout algorithm
* `#1908 <https://github.com/Kozea/WeasyPrint/pull/1908>`_:
  Fix IndexError when rendering PDF version 1.4
* `#1906 <https://github.com/Kozea/WeasyPrint/issues/1906>`_:
  Apply text transformations to first-letter pseudo elements
* `#1915 <https://github.com/Kozea/WeasyPrint/pull/1915>`_:
  Avoid footnote appearing before its call
* `#1934 <https://github.com/Kozea/WeasyPrint/pull/1934>`_:
  Fix balance before "column-span: all"
* `#1935 <https://github.com/Kozea/WeasyPrint/issues/1935>`_:
  Only draw required glyph with OpenType-SVG fonts
* `#1595 <https://github.com/Kozea/WeasyPrint/issues/1595>`_:
  Don’t draw clipPath when defined after reference
* `#1895 <https://github.com/Kozea/WeasyPrint/pull/1895>`_:
  Don’t ignore min-width when computing cell size
* `#1899 <https://github.com/Kozea/WeasyPrint/pull/1899>`_:
  Fix named pages inheritance
* `#1936 <https://github.com/Kozea/WeasyPrint/pull/1936>`_:
  Avoid page breaks caused by children of overflow hidden boxes
* `#1943 <https://github.com/Kozea/WeasyPrint/issues/1943>`_:
  Use bleed area for page’s painting area
* `#1946 <https://github.com/Kozea/WeasyPrint/issues/1946>`_:
  Use margin box of children to define available width for leaders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants