WAIT: 'clamp' only for fonts?

Bricks Version: 1.3.6
OS: Windows

Hi.

Not sure if this a bug or a missing feature… :slight_smile:

Started with a new project and setup all the fonts sizes with clamp functions. Next tried to do the same with some images / svgs (logo, etc.) - but it don´t react.

Is this missing or some fault of mine?

Hi Sascha,

I’ve just tested clamp in the upcoming Bricks 1.3.7 on an image and svg element (width) and it works perfectly fine. Can you please double check as soon as Bricks 1.3.7 is available and let me know, if it works for you?

Best regards,
timmse

2 Likes

Hi.

Thanks - that sounds good!

Best / Sascha

EDIT: It appears that the code is functional on the page output, but not on the editing canvas. Should this be signalled as a bug?

Is clamp confirmed to be working for images?

I’m trying to apply the function to the padding of an image element and it’s having no effect. I’m using Bricks 1.3.7.

Here’s the code I’m using, intended to give 10 to 40 pixels padding on devices ranging from 320 to 1280 pixels:

clamp(10px, calc(0.625rem + ((1vw - 3.2px) * 3.125)), 40px)

I’m selecting the Units “none” before pasting in the code.

Hi Niall,
Welcome to the forum!

The clamp issue on the canvas will be fixed in the upcoming Bricks 1.4 :slight_smile:

Best regards,
timmse

Hi Timmse

Thanks very much for that.

While on the subject of clamp padding, I’m finding that the function doesn’t seem to work in Theme Styles → General → Element Padding, or Theme Styles → General → Container → Root Margin/Root Padding. In contrast, adding px padding works fine, but the clamp function (same code as in my post above) has no effect, either in Canvas or Page Output.

Is this a known bug, or am I doing something wrong?

Hey, yeah it is a known bug and will be fixed as well :v: