primeflex icon indicating copy to clipboard operation
primeflex copied to clipboard

Enhancement: Primeflex as a plugin for Tailwind

Open Dav3rs opened this issue 3 years ago • 2 comments

It would be good to have available a primeflex version that behave as a Tailwind Plugin, just like DaisyUI does. It would inject the custom utility classes that integrate perfectly with prime libraries, and leave the other ones to tailwind. This also would benefit from the well known tailwind features.

Dav3rs avatar Nov 03 '22 14:11 Dav3rs

For example, I wanted to have more breackpoints, but cannot see a way to customize this in the primeflex docs. And I can guess why, adding all this classes and variants to primeflex would blow up the bundle size. This would not be a problem as a tailwind plugin, and it also would benefit with plugin configuration for extensibility, instead of cloning and building a custom primeflex.

Dav3rs avatar Nov 03 '22 14:11 Dav3rs

Hi @Dav3rs, thanks a lot for your feedback.

I wanted to have more breackpoints, but cannot see a way to customize this in the primeflex docs.

  • You can override $breakpoints variable according to your needs. Exp; https://github.com/primefaces/primeflex/issues/52#issuecomment-1069096707
$sm:576px;
$md:768px;
$lg:992px;
$xl:1300px;
$xxl:2000px;

$breakpoints: (
    'sm': $sm,
    'md': $md,
    'lg': $lg,
    'xl': $xl
    'xxl': $xxl
);

@import 'node_modules/primeflex/primeflex.scss'

mertsincan avatar Nov 09 '22 09:11 mertsincan