madskristensen / LessCompiler

A Visual Studio extension
Other
15 stars 8 forks source link

'page-break-inside' outputs incorrectly if followed by break-inside #2

Open hobwell opened 7 years ago

hobwell commented 7 years ago

Installed product versions

Description

if a less file contains:

page-break-inside: avoid; break-inside: avoid;

the less compiler instead outputs this to the css file:

-webkit-column-break-inside: avoid; break-inside: avoid;

Steps to recreate

Place break-inside: avoid; on the line following page-break-inside: avoid; in a less file, then compile it and examine the relevant style in the css file.

Current behavior

Instead of outputting page-break-inside: avoid;, the less compiler is outputting -webkit-column-break-inside: avoid; if the page-break-inside: avoid; is immediately followed by break-inside: avoid;

The issue can be worked around by placing the lines in reverse order.

break-inside: avoid; page-break-inside: avoid;

outputs correctly.

Expected behavior

The less compiler should output page-break-inside: avoid; regardless of what the following line is.

Gratitude

Thanks for making such an amazing tool!