• Resolved damienlopvet

    (@damienlopvet)


    Hey guys,
    This is great job you’ve done there!

    why can I only use classes like pt-5 and not those like bg-red-400 ?
    Is that a bug or a pro-version feature or something?

    The best for you. Thanks again.

    Damien

Viewing 1 replies (of 1 total)
  • Plugin Author leeshadle

    (@leeshadle)

    Hi @damienlopvet!

    You should be able to use any Tailwind utility classes. However, the default configuration shipped with the plugin limits the colors to only a handful to keep the utility class selector snappy.

    Could you share your configuration with me? I’m guessing that’s why you’re not seeing it. If you remove the colors key in the configuration file you can access all the default Tailwind colors, such as bg-red-400:

    var tailwind = !!tailwind ? tailwind : window.tailwind;
    
    tailwind.config = {
        important: true,
        theme: {
            /* max-width responsive breakpoints */
            screens: {
                md: {
                    'max': '1023px'
                },
                sm: {
                    'max': '767px'
                },
            },
            colors: {
                primary: tailwind.colors.slate['900'],
                secondary: tailwind.colors.white,
                text: 'var(--color-text)',
                accent: tailwind.colors.sky['500'],
                neutral: tailwind.colors.slate,
                transparent: tailwind.colors.transparent,
                current: tailwind.colors.current,
            },
            extend: {
                boxShadow: {
                    inset: 'inset 0 1px 0 0 rgb(255 255 255 / 20%)',
                },
                fontFamily: {
                    primary: tailwind.defaultConfig.theme.fontFamily.sans,
                    secondary: tailwind.defaultConfig.theme.fontFamily.sans,
                    text: tailwind.defaultConfig.theme.fontFamily.sans,
                    accent: tailwind.defaultConfig.theme.fontFamily.sans,
                },
                listStyleType: {
                    circle: 'circle',
                    square: 'square',
                },
            },
        },
        corePlugins: {
            preflight: false,
        },
    }
Viewing 1 replies (of 1 total)
  • The topic ‘bg-red-400’ is closed to new replies.