CMS Development

MWyatt
Member

CSS Minification with clamp()

SOLVE

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
HubSpot Product Team
HubSpot Product Team

CSS Minification with clamp()

SOLVE

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.


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.

View solution in original post

5 Replies 5
dennisedson
HubSpot Product Team
HubSpot Product Team

CSS Minification with clamp()

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

HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.

piersg
Key Advisor

CSS Minification with clamp()

SOLVE
0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

CSS Minification with clamp()

SOLVE

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


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.

Ntbrown
Contributor

CSS Minification with clamp()

SOLVE

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
HubSpot Product Team
HubSpot Product Team

CSS Minification with clamp()

SOLVE

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.


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.