It's correct that there isn't support for this yet in Blocks (there are workarounds using the conditional block and custom code, possibly not worth it).
If you go to Toolset > Settings, make sure that both the Blocks and Legacy UIs are available, and have Content Templates use the block editor by default.
Then to to Toolset > Content Templates and create two templates, one for each variant of the output you want.
Then go to Toolset > Views and create your View with the legacy editor. In the Loop Output section you'll insert the templates (use the Fields and Views button), and then add the wpv-item shortcode to determine when each template should be used (one with item=odd and the other with item=even).
That's great, thanks Nigel. It seems combining block templates with legacy views is really powerful.
I actually found a css solution in the end which is a bit of a cheat using :nth-child(even) and flex-direction: row-reverse - it seems to do the job but I'm glad there's also the option to mix block templates and legacy views as I'm sure I'll end up using that anyway!
Actually...my CSS doesn't work quite as well as I was hoping. It does work but the Toolset specific styling gets lost on the frontend, I think because I'm using a GenerateBlocks grid container for the view. I don't suppose there is any news on better Toolset integration with GenerateBlocks? I know there's a Toolset Container/Grid but I find the GenerateBlocks options much more flexible.
Sorry I don't think it does have anything to do with GenerateBlocks.
I've also replicated this in a test environment with default WP 2021 theme.
I've created a view to show latest posts, added a Heading with link to post URL, then added a single field > Category > Link to term archive page - I've styled this with a small font size 12px (I've tried both typography and link typography). When you click update the styling to the font size at first seems to work, but then when you refresh the page it loses the styling and increase the font size to default.
I've tried a completely fresh WordPress install with only the default wordpress theme and toolset blocks installed and found the same issue, and the loss of styling isn't limited to the specific example above, I also tried a custom button style and that also gets lost once you refresh the page (or view the page when not logged in). However, the styling remains if the "Cache view" is toggled off but this presumably has performance implications?
For the new questions:
It does work but the Toolset specific styling gets lost on the frontend ...
It is a known issue, it happens if you save the post/page quickly before WordPress autosave completed, those custom style will lost in front-end when you refresh the page/post.
It has been escalated to our developers, but I am not sure when will it be fixed, I have added this thread into our to-do list, and will update here if there is any news.
Currently, you need to save the post/page little slowly, until the WordPress autosave completed
Hello, I've tried waiting a long time after saving but the issue persists. This is on a blank local wordpress site with default theme and toolset blocks installed, so easy to replicate. Interestingly if I remove the "Link to term archive page" and just display the category name the styling remains. But the button changes to default styling after one reload no matter how long I leave it to reload.
I have tried it in a fresh WP installation + the latest version of Toolset plugins, it works fine if I save the page after WordPress autosave completed.
Please provide a test site with same problem, also point out the problem page URL, private message box enabled.
Sorry Luo....I made a mistake in my previous reply, I have tried your method of waiting for the autosave to complete before saving the page and I can confirm that works for the button styling but it still doesn't work for me on the category archive link.
Just in case it helps with testing...with the button styling, it seems that simply adding a ">" after the text ( i.e. Read More > ) breaks the styling on reload. I did this to try and avoid calling up an icon font but it seems to cause the styling to be lost on reload for some reason.
Hopefully better GenerateBlocks integration is on the way as that uses SVG icons so doesn't require a font request.
Thanks for the details, I can duplicate the same problem, the style lost even after autosave completed. I have already added this thread into out to-do list.
Currently, you can add a shortcode block, display the Views shortcode directly, for example: