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

CSSO is destroying hamburger menu in boostrap 4 #377

Closed
sowinski opened this issue Apr 10, 2018 · 4 comments
Closed

CSSO is destroying hamburger menu in boostrap 4 #377

sowinski opened this issue Apr 10, 2018 · 4 comments

Comments

@sowinski
Copy link

sowinski commented Apr 10, 2018

Hi,

csso 3.5.0 destroys bootstrap 4 hamburger menu icon.
Bootstrap 4.0 source: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.css

This is the original line

.navbar-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

And after compressing, it is this line

.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0,0,0,0.5")' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}

It is hart to see, but there apears a " within the rgba part:
should be:

'rgba(0, 0, 0, 0.5)'

but it is

'rgba(0,0,0,0.5")'

Can someone confirm this bug? It is also happening with cssmin (same lib at some point?)

Is there a workaround or something else for that?

Thank you :)

@lahmatiy
Copy link
Member

Looks like some other tool changes your CSS before compression. If you try to compress original code with web interface, you'll see CSSO doesn't add " to url() content.

@XhmikosR
Copy link
Contributor

XhmikosR commented Dec 11, 2018

Note that I made a PR to switch to csso for Bootstrap itself twbs/bootstrap#27811

Waiting to test things a little more and the stable and after that we'll make the switch, but I don't see any such issue.

@lahmatiy
Copy link
Member

Cool! Could we close the issue?

@XhmikosR
Copy link
Contributor

I definitely don't see this issue myself so AFAIC yes :)

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

3 participants