Site logo

[Support request] Default Unsemantic Classes

Home Forums Support [Support request] Default Unsemantic Classes

Home Forums Support Default Unsemantic Classes

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2485557
    Ahmed

    Hi,
    I’m trying to use the default css grid classes provided by unsemantic on a custom template, but it seems that those classes are missing from my main CSS file. For ex. I would like to use “grid-50” but it doesn’t work because the class is not defined.

    What’s the best way to include the entire grid system?

    Thanks!

    #2485578
    Fernando
    Customer Support

    Hi Ahmed,

    By default, those classes are meant for articles in Blog and archive pages. For non-article elements, our suggested way to create grids is to use the GB Grid Block.

    Reference: https://docs.generateblocks.com/article/grid-overview/

    #2485587
    Ahmed

    Thanks Fernando! How can I get that layout transferred to a custom php template file?

    #2485599
    Fernando
    Customer Support

    What’s your template file for? Is it for archive pages or a single post or something else?

    And, where in this template are you adding a Grid?

    Perhaps you can simply add an action hook, and hook a Block Element there.

    #2486274
    Ahmed

    Yes, it’s a single post for a custom plugin. I guess I can build a page template and then use the same grid pattern in the custom file.

    #2486319
    Ahmed

    Ok, that’s not going to work because using the block builder adds a lot of inline styling for positioning, margins, etc. How can I get access to the Unsemantic utility classes like class=”grid-25″, class=”grid-25 mobile-grid-50″, etc. on a single post and archive page?

    Thanks!

    #2486525
    Leo
    Staff
    Customer Support

    How can I get access to the Unsemantic utility classes like class=”grid-25″, class=”grid-25 mobile-grid-50″, etc. on a single post and archive page?

    This is not a good idea at all and might cause some conflicts with the theme which is already using Flexbox.

    If you are going to write HTML then why not create the columns using Flexbox instead?
    https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox

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