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

not to strip quotes in url #611

Closed
zeakd opened this issue Jun 23, 2015 · 5 comments
Closed

not to strip quotes in url #611

zeakd opened this issue Jun 23, 2015 · 5 comments

Comments

@zeakd
Copy link

zeakd commented Jun 23, 2015

@font-face {
  font-family: "BebasNeue";
  font-weight: bold;
  font-style : normal;
  src: url('/fonts/BebasNeue Bold.eot');
  src:
  url("/fonts/BebasNeue Bold.woff") format("woff"),
  url("/fonts/BebasNeue Bold.otf") format("opentype");
}

Hi.
I write this code and it works, but when I strip quotes like this

@font-face {
  font-family: "BebasNeue";
  font-weight: bold;
  font-style : normal;
  src: url(/fonts/BebasNeue Bold.eot);
  src:
  url(/fonts/BebasNeue Bold.woff) format("woff"),
  url(/fonts/BebasNeue Bold.otf) format("opentype");
}

and it doesn't work. no request send.

so I want not to remove that quotes.

cleancss -o result.css my.css --compatibility *,+properties.urlQuotes

and I did

cleancss -o result.css my.css --compatibility *,-properties.urlQuotes
cleancss -o result.css my.css --compatibility ie8,+properties.urlQuotes

even I changed all urlQuotes property to true in lib/compatibility.js but it still remove my quotes. how can I leave these?

@jakubpawlowicz
Copy link
Collaborator

Can you provide an example page (jsfiddle, etc) so it can be retested in different browsers? In which browser it fails btw?

@zeakd
Copy link
Author

zeakd commented Jun 24, 2015

I made test in github.io because of font file

common index.html

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
     <link rel="stylesheet" href="styles/style.css">
    <title>font-face</title>
</head>
<body>
    <div id = "test">
        <h2>#TEXT</h2>
    </div>
</body>
</html>

font-face-example1 style.css (success)

http://zeakd.github.io/font-face-example1/
@font-face {
  font-family: "BebasNeue";
  font-weight: bold;
  font-style : normal;
  src: url('/font-face-example1/fonts/BebasNeue Bold.eot');
  src:local("☺"),
  url("/font-face-example1/fonts/BebasNeue Bold.woff") format("woff"),
  url("/font-face-example1/fonts/BebasNeue Bold.otf") format("opentype");
}

#test {
    font: 12px/26px BebasNeue;
}

font-face-example2 style.css (fail)

http://zeakd.github.io/font-face-example2/
@font-face {
  font-family: "BebasNeue";
  font-weight: bold;
  font-style : normal;
  src: url(/font-face-example2/fonts/BebasNeue Bold.eot);
  src:local("☺"),
  url(/font-face-example2/fonts/BebasNeue Bold.woff) format("woff"),
  url(/font-face-example2/fonts/BebasNeue Bold.otf) format("opentype");
}

#test {
    font: 12px/26px BebasNeue;
}

I don't know why example2 doesn't send font get request. I knew quote in url is option...
So I want to leave these quotes. thanks.

jakubpawlowicz added a commit that referenced this issue Jun 24, 2015
It manifested itself when rebasing to a relative or
absolute path only.
@jakubpawlowicz
Copy link
Collaborator

Fixed in 3.3.4 - it was a combination of URL rebasing, rewriting, and whitespace which there were no test for.

@zeakd
Copy link
Author

zeakd commented Jun 24, 2015

Thanks!

@jakubpawlowicz
Copy link
Collaborator

👍 for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants