nunomaduro / termwind

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

Add Support to color class names like TailwindCSS #38

Closed xiCO2k closed 3 years ago

xiCO2k commented 3 years ago

This PR adds support to handle color variants like TailwindCSS.

Example:

use function Termwind\span;

span('text', 'bg-green-300 text-color-gray-700')->render();

// or

span('text')->bg('green', 300)->textColor('gray', 700)->render();

@nunomaduro if you can double check the exception ColorNotFound and the Element function getColorVariant not sure if that's the style we want.

Thanks

nunomaduro commented 3 years ago

@xiCO2k Fell free to tweet about this addition.

xiCO2k commented 3 years ago

Awesome will tweet later today!!