nunomaduro / termwind

🍃 In short, it's like Tailwind CSS, but for the PHP command-line applications.
MIT License
2.27k stars 76 forks source link

feat: Allow `truncate` to be used without params. #139

Closed xiCO2k closed 2 years ago

xiCO2k commented 2 years ago

This PR adds the capability to use the truncate class to be used without params.

If it's used without params, it will look for the width on the elem.

render(<<<'HTML'
    <div class="mx-2 my-1">
        <div class="flex space-x-1">
            <span class="flex-1 truncate">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Sunt illo et nisi omnis porro at, mollitia harum quas esse, aperiam dolorem ab recusandae fugiat nesciunt doloribus rem eaque nostrum itaque.</span>
            <span class="text-green">DONE</span>
        </div>
    </div>
HTML);

Output

image