Layout demo: CSS Tailwinda daje 9 ostrzeżeń dompdf przy każdym renderze
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 77/100
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
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 = truelayout 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 --samplei szablon „Header and Footer” nie wypisują żadnychWARN. - 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mplodowski/dynamicpdf-plugin
-
code-review documentation low-priority
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
mplodowski/dynamicpdf-plugin#295 · 1 comment ·
Maintainers usually reply within 1 day
-
code-review enhancement low-priority
Difficulty 5/5 Over a week Newbie friendliness 30/100
mplodowski/dynamicpdf-plugin#301 · 1 comment ·
Maintainers usually reply within 1 day
-
code-review enhancement low-priority
Difficulty 5/5 Over a week Newbie friendliness 25/100
mplodowski/dynamicpdf-plugin#300 · 1 comment ·
Maintainers usually reply within 1 day
-
code-review enhancement low-priority
Difficulty 5/5 Over a week Newbie friendliness 38/100
mplodowski/dynamicpdf-plugin#299 · 1 comment ·
Maintainers usually reply within 1 day
-
code-review enhancement low-priority
Difficulty 5/5 Over a week Newbie friendliness 35/100
mplodowski/dynamicpdf-plugin#298 · 1 comment ·
Maintainers usually reply within 1 day
All issues in mplodowski/dynamicpdf-plugin
Similar issues
-
maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hawk-digital-environments/HAWKI#443 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
crazy-goat/rabbit-stream#799 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Code Quality
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/safe-publish#708 ·
Maintainers usually reply within 1 day