• Live group demo of Marketing Hub + Data Agent

    Standardize reporting, reduce manual work, and introduce AI without cleanup

    Join us on March 12
  • Ready to build your local HubSpot community?

    HUG leaders host events, spark connections, and create spaces where people learn and grow together.

    Become a HUG Leader

CSS Minification with clamp()

MWyatt
Member

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 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." 

 

0 Upvotes
1 Accepted solution
dennisedson
Solution
Community Manager
Community Manager

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.


loop Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.
Learn More

View solution in original post

5 Replies 5
dennisedson
Community Manager
Community Manager
Fix has been deployed. Will need to republish the file to be reminified

loop Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.
Learn More

piersg
Key Advisor
0 Upvotes
dennisedson
Community Manager
Community Manager

@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 🙃


loop Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.
Learn More

Ntbrown
Contributor

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://en.wikipedia.org/wiki/Rasterisation

https://en.wikipedia.org/wiki/Font_rasterization

https://en.wikipedia.org/wiki/Sub-pixel_resolution

https://en.wikipedia.org/wiki/Subpixel_rendering

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

dennisedson
Solution
Community Manager
Community Manager

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.


loop Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.
Learn More