Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Laurie 42 posts 116 karma points
    Sep 29, 2023 @ 09:22
    Peter Laurie
    0

    Umbraco Block Grid without using inline style tags for variables

    Hi,

    We use the Umbraco Grid (legacy) in Umbraco 10 and I am looking at moving to Umbraco 12 and moving to use the Block Grid Editor which is being widely promoted as the way forward on Umbraco.

    I have been investigating this. One aspect of or website build is that we use a very strong CSP (Content Security Policy) where unsafe-inline is NOT allowed for styles. hence was are moving toward removing all inline styles, and this I find is at odds with the implementation of the Block Grid editor - as least on the front end. For example, when I remove the style attributes, from the items.cshtml block editor, such as:

    style=" --umb-block-grid--item-column-span: @item.ColumnSpan; --umb-block-grid--item-row-span: @item.RowSpan; "
    

    The whole design on the front end fall apart.

    I will also look at maybe trying to introduce Bootstrap 5 Grid CSS

    Can the Block Grid operate successfully without the use of these inline styles?

    This seems greatly limiting.

    Thank you for any feedback.

    Kind regards.

    Peter

Please Sign in or register to post replies

Write your reply to:

Draft