• Resolved ColinD

    (@colind)


    Thanks for the block. It looks like CSS classes are not being applied to the frontend markup. For example if I set it to align-full, and add a custom class in settings > advanced of ‘foo-class’ I would expect
    <figure class=”wp-block-image wp-block-ce-responsive-picture alignfull foo-class”>
    but I’m getting only
    <figure class=”wp-block-image wp-block-ce-responsive-picture”>

    Let me know if I’m doing it wrong.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Richard B

    (@richard-b)

    Hi Colin

    Very welcome, please could you let us know which device image you are adding your extra class to (mobile / desktop etc)?

    Just tested but we are getting

    <figure class="wp-block-image wp-block-ce-responsive-picture alignfull foo-class">

    when the ‘foo-class’ is added to the desktop image.

    Thread Starter ColinD

    (@colind)

    I am attempting to set the alignment and add the class to the Responsive Picture (Group) block, not to any of the inner images.

    If I add a class to the fallback image, that class is moved to the <figure> but classes applied to the other images are not. I also do not have an option to set alignfull on the inner images.

    Plugin Support Richard B

    (@richard-b)

    Thank you for explaining and for reporting this issue, testing confirmed the scenario.
    We have just released a fix for alignment on the main block and custom classname handling.

    Inner image alignment will now follow the main block alignment for all images.

    Please do let us know if there is anything else you feel would improve the block and thank you for using it.

    Plugin Support Richard B

    (@richard-b)

    Please let us know if there is anything else we can help you with.

    Thread Starter ColinD

    (@colind)

    Thanks for the update. That allows the class to be added to the <picture> element. Moving the class from the <img> to the <picture> still seems unexpected to me. I wonder if there were a way to explain that to users? I recognize that adding a class to a <source> is kind of weird since the <source> is never rendered. But again, from a usability perspective having the class attribute in the image block settings of the editor result in no class on the front end is unexpected. Regardless, minor niggles. Thanks again for the block and the support.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.