# SOLVED IN 1.4: Adding CLAMP formula breaks control panel layout

**URL:** <https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052>\
**Category:** Bugs\
**Created:** [May 17, 2022, 6:23pm UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052 "2022-05-17T18:23:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/michael/32/101_2.png) [@Michael](https://forum.bricksbuilder.io/u/Michael)\
**Post date:** [May 17, 2022, 6:23pm UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/1 "2022-05-17T18:23:09Z")

</div>

**Bricks Version** : 1.4RC2  
Chrome Latest  
Windows 11

Hey Chaps,

I did search and could not see another ticket, but i do recall something similar.

Basically if you add a formula inside themestyles\>container \>root container margin it breaks out of the input boxes.

Please see image below:

![Screenshot_60](https://forum.bricksbuilder.io/uploads/default/original/2X/4/41d035a768d3f26093e4d057faad0269a2da2f9b.jpeg)

Many thanks

Mick

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [May 17, 2022, 6:30pm UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/2 "2022-05-17T18:30:17Z")

</div>

Hi Michael,  
Thanks a lot for your report, but… 🕶

> [@SOLVED IN 1.4: Values with brackets (var, clamp, calc, etc.) in Input fields break styles](https://forum.bricksbuilder.io/t/wip-1-4rc2-values-with-brackets-var-clamp-calc-etc-in-input-fields-break-styles/2993):
>
> Version: 1.4RC2 Hi, It seems entering “(” anywhere in theme style not only breaks backend field, but it also breaks the whole stylesheet and whole website gets unstyled: Note: I just entered “var(–titi)” in the field. Note 2: For existing var() and calc() in theme styling before 1.4RC2 upgrade, no problem, so it seems it’s only newly entered “(” that break everything.

> [@SOLVED IN 1.4: Bricks 1.4 RC2 - CSS Variables Not Working](https://forum.bricksbuilder.io/t/wip-bricks-1-4-rc2-css-variables-not-working/3025):
>
> Bricks Version: 1.4 RC2 Browser: MS Edge Version 101.0.1210.39 (Official build) (64-bit) OS: Windows 10 Home URL: [Contact Us Left - Gerri Wiebe](https://gerriwiebe.pdms.ca/contact-us/) Adding CSS variables to padding fields doesn’t work. If you copy/paste the variable into the padding fields, the CSS variable is added twice like so: padding-top: var(–css-variable)var(–css-variable); If you type the variable name into the padding field, it appears like the value is added without a semicolon, which breaks the stylesheet. Here’s a…

> [@SOLVED IN 1.4: Setting fields using "(" are broken in backend](https://forum.bricksbuilder.io/t/wip-1-4rc2-setting-fields-using-are-broken-in-backend/2982):
>
> Bricks Version: 1.4RC2 When using “(” symbol (like with var and calc) in margins/paddings: width auto is used for unit string and breaks design (you have to scroll to see all section) actual input field disappears and we can’t do anything to get it back [image]

I would recommend you in 1.4RC2 not to use var, clamp, min, max or anything else with brackets in the input fields.

Cheers,  
timmse

---

<div class="post-metadata">

**Author:** ![Michael](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/michael/32/101_2.png) [@Michael](https://forum.bricksbuilder.io/u/Michael)\
**Post date:** [May 17, 2022, 6:38pm UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/3 "2022-05-17T18:38:20Z")

</div>

🤣 I did say i thought i something mentioned!! haha

---

<div class="post-metadata">

**Author:** ![ChrisCastillo](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/chriscastillo/32/2203_2.png) [@ChrisCastillo](https://forum.bricksbuilder.io/u/ChrisCastillo)\
**Post date:** [May 17, 2022, 6:57pm UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/4 "2022-05-17T18:57:27Z")

</div>

Is this just temporarily until you guys find a fix? It’s pretty important for us to be able to add var and calc into these fields.

---

<div class="post-metadata">

**Author:** ![Michael](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/michael/32/101_2.png) [@Michael](https://forum.bricksbuilder.io/u/Michael)\
**Post date:** [May 17, 2022, 7:03pm UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/5 "2022-05-17T19:03:33Z")

</div>

Hey @ChrisCastillo This bug was introduced in 1.4RC2 so i would imagine this would be fixed for the final release.

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [May 17, 2022, 7:10pm UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/6 "2022-05-17T19:10:02Z")

</div>

The error has crept in by extending/enlarging the input fields when using var(), clamp(), etc. and will of course be fixed in the next version.

However, you may have to re-enter the values, as the excess brackets are written to the database when saving. Therefore I would refrain from setting clamps or vars - generally anything with brackets - in RC2. This applies to all input fields, not only in the theme styles.

Big sorry for the inconvenience!

---

<div class="post-metadata">

**Author:** ![omega](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/o/a6a055/32.png) [@omega](https://forum.bricksbuilder.io/u/omega)\
**Post date:** [May 17, 2022, 7:17pm UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/7 "2022-05-17T19:17:56Z")

</div>

I just hope 1.4RC3/Stable comes fast and well!

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [May 27, 2022, 10:35am UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/8 "2022-05-27T10:35:36Z")

</div>

Hi Michael,  
The issue has been fixed with Bricks 1.4.  
The only problem that may occur now is that the broken variables (or functions) have been stored in the database and therefore do not work anymore.

So if you run into a broken layout somewhere, it is most likely due to a broken value in an input field like “var(var(–variable)”. Sorry for the trouble.

Best regards,  
timmse

---

<div class="post-metadata">

**Author:** ![Michael](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/michael/32/101_2.png) [@Michael](https://forum.bricksbuilder.io/u/Michael)\
**Post date:** [May 27, 2022, 10:43am UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/9 "2022-05-27T10:43:33Z")

</div>

Thanks Stefan,

Just to clarify and for anyone else who stumbles on this post that to remedying any broken values require you to copy and paste in the variable again and save?

Could you just confirm that is correct please Stefan

Thanks again and keep on fighting!! 👊

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [May 27, 2022, 11:51am UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/10 "2022-05-27T11:51:10Z")

</div>

Yep, that is correct ✌

---

<div class="post-metadata">

**Author:** ![pablo](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/pablo/32/6804_2.png) [@pablo](https://forum.bricksbuilder.io/u/pablo)\
**Post date:** [November 25, 2022, 2:52pm UTC](https://forum.bricksbuilder.io/t/solved-in-1-4-adding-clamp-formula-breaks-control-panel-layout/3052/11 "2022-11-25T14:52:53Z")

</div>

That really help me today! Thanks
