Site logo

[Support request] How to remove the ‘container’ from the class

Home Forums Support [Support request] How to remove the ‘container’ from the class

Home Forums Support How to remove the ‘container’ from the class

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1539646
    YSK

    Hi there,

    How to remove the ‘container’ from every #page class.

    Because I want to use “tailwindcss”.

    ‘container’ conflicts.

    BEFORE
    <div id="page" class="site grid-container container hfeed">

    The results I want are as follows.
    <div id="page" class="site grid-container hfeed">

    Is there a problem with removing the ‘container’?

    Thank you!

    #1540335
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I would advise against it, as some of our features may use that selector.

    However, it is possible:

    add_filter( 'generate_page_class', function( $classes ) {
        $classes = array_diff( $classes, array( 'container' ) );
    
        return $classes;
    } );

    It may be better to just resolve the conflict. What’s the issue, exactly?

    #1541561
    YSK

    Hi there,

    Thank you for your suggestions for solutions.
    and I understand that there may be problems.

    Tailwind CSS ‘container’
    https://tailwindcss.com/docs/container

    I’d like to think of a way to make them coexist somehow.

    Thank you!

    #1542708
    Tom
    Lead Developer
    Lead Developer

    So is the main issue you’re seeing width-related?

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.