# CSS Minification with clamp()

**URL:** <https://community.hubspot.com/t/css-minification-with-clamp/36746>\
**Category:** CMS Development\
**Created:** [May 5, 2021, 2:25pm UTC](https://community.hubspot.com/t/css-minification-with-clamp/36746 "2021-05-05T14:25:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MWyatt](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mwyatt/32/51304_2.png) [@MWyatt](https://community.hubspot.com/u/MWyatt)\
**Post date:** [May 5, 2021, 2:25pm UTC](https://community.hubspot.com/t/css-minification-with-clamp/36746/1 "2021-05-05T14:25:45Z")

</div>

When my CSS is minified it is having the whitespaces in the clamp() function removed, making it a invalid property.

`clamp(21px,15.5454545455px+1.7045454545vw,33px)`

It should be like this

` font-size: clamp(21px,15.5454545455px + 1.7045454545vw,33px);`

Is there any way I can ensure the whitespace remains here after minification?

This is also the case in here - “I figured this out by using the [?hsDebug=true](https://developers.hubspot.com/docs/cms/developer-reference/debugging-and-errors#hsdebug-true) in our url(s) to see what hubspot is doing. Sure enough, it looks like the hubspot minifier is killing the property, since the css works fine in debug mode.”

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [May 6, 2021, 8:35am UTC](https://community.hubspot.com/t/css-minification-with-clamp/36746/2 "2021-05-06T08:35:51Z")

</div>

@dennisedson potentially similar to [this Tailwind minification issue](https://community.hubspot.com/t5/CMS-Development/Hubspot-s-CSS-Minification-Causing-Issues/td-p/421636)?

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [May 6, 2021, 2:02pm UTC](https://community.hubspot.com/t/css-minification-with-clamp/36746/3 "2021-05-06T14:02:00Z")

</div>

@MWyatt , @piersg I can reproduce the issue in my portal. Am getting some additional eyes on it

@MWyatt ,

`15.5454545455px + 1.7045454545vw`

were you challenging yourself to see how many decimal points you could get in there 🙃

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [May 6, 2021, 9:07pm UTC](https://community.hubspot.com/t/css-minification-with-clamp/36746/4 "2021-05-06T21:07:35Z")

</div>

Following up here,

There is an issue with the current minfier which is causing the issue. There is an new minifier on the horizon, but not quite ready yet. We are going to patch the present minifier to accomodate for this issue. Patch should be issues shortly. @MWyatt thanks for bringing this issue up.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [May 6, 2021, 10:29pm UTC](https://community.hubspot.com/t/css-minification-with-clamp/36746/5 "2021-05-06T22:29:49Z")

</div>

Subpixels at geo coordinate precision levels… There’s something you don’t see every day. Some light reading for the technical bits of why such precision is pointless if interested:

[https://ieeexplore.ieee.org/document/8766229](https://ieeexplore.ieee.org/document/8766229)

> **[Rasterisation](https://en.wikipedia.org/wiki/Rasterisation)**
>
> In computer graphics, rasterisation (British English) or rasterization (American English) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image which represents the original image. The rasterized image may then be displayed on a computer display, video display or printer, or stored in a bitmap file format. Rasterization may refer to the technique of drawing 3D models, or to the conversion of 2D rendering primitives, such as polyg The t...

[https://en.wikipedia.org/wiki/Font\_rasterization](https://en.wikipedia.org/wiki/Font_rasterization)

[https://en.wikipedia.org/wiki/Sub-pixel\_resolution](https://en.wikipedia.org/wiki/Sub-pixel_resolution)

[https://en.wikipedia.org/wiki/Subpixel\_rendering](https://en.wikipedia.org/wiki/Subpixel_rendering)

[https://en.wikipedia.org/wiki/Font\_hinting](https://en.wikipedia.org/wiki/Font_hinting)

Of historical interest… On legacy browsers and modern ones the variations in subpixel rendering is quite interesting.

![source.gif](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/c/dca33090e3ddef8a2a4b430292070711391f5c2d.gif)

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [May 6, 2021, 10:51pm UTC](https://community.hubspot.com/t/css-minification-with-clamp/36746/6 "2021-05-06T22:51:49Z")

</div>

Fix has been deployed. Will need to republish the file to be reminified
