Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Layout demo: CSS Tailwinda daje 9 ostrzeżeń dompdf przy każdym renderze

Closed Beginner friendly
#336 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
77/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php, tailwindcss
Domain
backend

Research direction

Start with assets/css/tailwind.css and the demo layout views/pdf/layouts/default.htm, where the stylesheet is included via |pdfasset. Render the invoice and “Header and Footer” demos with php artisan dynamicpdf:render and compare the PDF appearance before and after. Done when both render without WARN, retain their appearance, and still render with dompdf.show_warnings = true.

Written by the indexing model from the issue text.

Description

frontend low-priority

Problem

Render faktury demo z layoutem demo daje 9 ostrzeżeń dompdf. php artisan dynamicpdf:render (#297, PR #335) wypisuje je jako WARN:

'box_sizing' is not a recognized CSS property.
'_moz_tab_size' is not a recognized CSS property.
'tab_size' is not a recognized CSS property.
'_webkit_text_size_adjust' is not a recognized CSS property.
'_webkit_appearance' is not a recognized CSS property.
'resize' is not a recognized CSS property.
Unable to parse CSS that starts with: .
The CSS selector 'input::placeholder' is not valid.
The CSS selector 'textarea::placeholder' is not valid.

Źródłem jest assets/css/tailwind.css (Tailwind 2.2.19 z modern-normalize, ok. 12 KB), dołączany w views/pdf/layouts/default.htm przez |pdfasset. To reguły pod przeglądarkę (formularze, ::placeholder, prefiksy -webkit-/-moz-), których dompdf nie obsługuje i których PDF nie potrzebuje.

Skutek

  • Ktoś, kto zaczyna od demo i sprawdza szablon komendą dynamicpdf:render, widzi 9 ostrzeżeń, które nie dotyczą jego szablonu. Prawdziwy problem, np. nieznaleziony obraz, ginie w szumie.
  • Ten sam szum trafia do logu dompdf i do $GLOBALS['_dompdf_warnings'] przy każdym renderze z layoutem demo.
  • Przy dompdf.show_warnings = true layout demo przerywa render wyjątkiem.

Proponowane rozwiązanie

Odchudzić assets/css/tailwind.css do reguł, które dompdf rozumie i których używa demo: usunąć z preflight reguły formularzy, ::placeholder, tab-size, -webkit-text-size-adjust, -webkit-appearance i resize, oraz znaleźć źródło „Unable to parse CSS that starts with: .” (pusty albo ucięty selektor). Najprościej ręcznie, bo plik jest statyczny i nie ma do niego builda w repo. Do sprawdzenia, czy box-sizing usunąć, czy zostawić: dompdf go nie zna, ale reguła jest nieszkodliwa.

Kryteria akceptacji

  • php artisan dynamicpdf:render renatio.dynamicpdf::pdf.invoice --sample i szablon „Header and Footer” nie wypisują żadnych WARN.
  • Wygląd PDF-ów demo bez zmian (porównanie przed i po).
  • Layout demo nie przerywa renderu przy dompdf.show_warnings = true.

Powiązane issues

#297 (PR #335), #183, #182.

Dominant language
PHP
Stars
30
Forks
22
Avg merge
2h 23m
Merged PRs (30d)
77

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mplodowski/dynamicpdf-plugin

All issues in mplodowski/dynamicpdf-plugin

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.