Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css minify loses space after ) #6563

Closed
mschoeffmann opened this issue Nov 30, 2019 · 6 comments
Closed

css minify loses space after ) #6563

mschoeffmann opened this issue Nov 30, 2019 · 6 comments

Comments

@mschoeffmann
Copy link

Description

Since I updated from 0.59.1 to 0.60.1, the "| minify" command removes important spaces from CSS:

STYLE TEMPLATE:

{{ $cssSite := resources.Get "css/_site.css" | minify }}
{{ $cssQueries := resources.Get "css/_queries.css" | minify }}
{{ $style := slice $cssSite $cssQueries | resources.Concat "css/bundle.css" | fingerprint }}

ORIGINAL CSS:
background: rgba(109, 109, 109, 1) url('/img/slide-home.jpg') no-repeat center center;

MINIFIED TO:
background:#6d6d6durl(/img/slide-home.jpg)no-repeat 50%;

In the minified version is a space missing right after the color and the url - it looks like a missing space after a ")".
The result #6d6d6durl results in no background image displayed. And i can imagine the missing space in )no-repeat can cause confusion, too?

What version of Hugo are you using (hugo version)?

$ hugo version
Hugo Static Site Generator v0.60.1/extended darwin/amd64 BuildDate: unknown

Does this issue reproduce with the latest release?

Yes

@ghost ghost mentioned this issue Jan 2, 2020
@akshaybabloo
Copy link
Contributor

This is also breaking the AMP pages

@akshaybabloo
Copy link
Contributor

Could be fixed in #6756

@bep bep added the Upstream label Jan 16, 2020
@bep bep modified the milestones: v0.63, v0.64 Jan 16, 2020
@bep bep modified the milestones: v0.64, v0.65 Jan 30, 2020
@bep bep modified the milestones: v0.65, v0.66 Feb 18, 2020
@bep bep modified the milestones: v0.66, v0.67 Mar 2, 2020
@bep bep modified the milestones: v0.67, v0.68 Mar 9, 2020
@bep bep modified the milestones: v0.68, v0.69 Mar 20, 2020
@apoorvmote
Copy link

It did not fix in Hugo version 0.68.3

The mandatory text inside tag 'head > style[amp-boilerplate]' is missing or incorrect.

Amp validation is still breaking

@bep bep modified the milestones: v0.69, v0.70 Apr 8, 2020
@bep bep modified the milestones: v0.70, v0.71 Apr 28, 2020
@bep bep modified the milestones: v0.71, v0.72 May 18, 2020
@bep bep modified the milestones: v0.72, v0.73 May 31, 2020
@bep bep modified the milestones: v0.73, v0.74 Jun 23, 2020
@bep bep modified the milestones: v0.74, v0.75 Jul 13, 2020
@bep bep modified the milestones: v0.75, v0.76 Sep 14, 2020
@bep bep modified the milestones: v0.76, v0.77 Oct 6, 2020
@tdewolff
Copy link

tdewolff commented Oct 8, 2020

I've tested the original issue and this is not an issue (anymore) in minify.

@mschoeffmann
Copy link
Author

Looks fixed now...
Hugo Static Site Generator v0.76.3/extended darwin/amd64 BuildDate: unknown

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants