Skip to content

Recommended CSS classes for mosaic-grid-row #593

@mauritsvanrees

Description

@mauritsvanrees

I have a site with Mosaic that started out on Plone 5.1, and was migrated to 5.2 and 6.0. It has a few custom content layouts that have classes that don't seem to do anything and that don't result in any matches in Mosaic code, nor custom code for this site. These are classes like mosaic-width-half and mosaic-position-leftmost that were set by a previous Mosaic version.

So I started wondering which classes are expected next to mosaic-grid-cell.
When I search in Mosaic itself in the content layouts, I get this:

basic.html:        <div class="mosaic-grid-cell col">
basic.html:        <div class="mosaic-grid-cell col">
document.html:        <div class="mosaic-grid-cell col-12 mosaic-position-0">
document.html:        <div class="mosaic-grid-cell col-12 mosaic-position-0">
document.html:        <div class="mosaic-grid-cell col-12 mosaic-position-0">
news_item.html:        <div class="mosaic-grid-cell col-12 mosaic-position-0">
news_item.html:        <div class="mosaic-grid-cell col-12 mosaic-position-0">
news_item.html:        <div class="mosaic-grid-cell col-12 mosaic-position-0">

Is mosaic-position-0 still needed? A further search in Mosaic gives no result.

col or col-* seem fine, and help for Bootstrap 5.

When using the Format menu, I can add mosaic-grid-row-fluid/dark. This can be expanded with custom code. And in issue #478 there is a discussion on which classes to add here in a way that works responsively.

I guess if there are classes that do not do anything, then it does not hurt, except that it can get confusing for anyone who looks at the html.

Main question: does it make sense to write an upgrade step for this, removing some no longer supported classes and adding some new, especially col when it is not there (nor col-*)?
Or would this be something that is very project specific and does not translate well to a general Mosaic upgrade step?
I will share a script in the next comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions