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

clip-path polygons destroyed #363

Open
oksoftware-cz opened this issue Mar 10, 2021 · 0 comments
Open

clip-path polygons destroyed #363

oksoftware-cz opened this issue Mar 10, 2021 · 0 comments

Comments

@oksoftware-cz
Copy link

Please, try to minify the following style (it is just example to demonstrate the problem, the first clip-path was a real code, the second ona is some kind of bug override):

.sample {
	clip-path: polygon(8px calc(100% - 1px),calc(100% - 8px) calc(100% - 1px),calc(100% - 8px) 100%,8px 100%);
	clip-path: polygon(8px calc(100% - 1px),
		calc(100% - 8px) calc(100% - 1px),
		calc(100% - 8px) 100%,
		8px 100%);
}

Unfortunately, you will get something like this:

.sample{clip-path:polygon(8px calc(100% - 1px),calc(100% - 8px),100%,8px 100%);clip-path:polygon(8px calc(100% - 1px),calc(100% - 8px) calc(100% - 1px),calc(100% - 8px) 100%,8px 100%)}

The first clip-path was minified to:

clip-path:polygon(8px calc(100% - 1px),calc(100% - 8px),100%,8px 100%);

The second one to:

clip-path:polygon(8px calc(100% - 1px),calc(100% - 8px) calc(100% - 1px),calc(100% - 8px) 100%,8px 100%)

You can see the difference immediately. when all polygon's parameter pairs are in one line, the second value of each pair is lost, except the first and last pair. When each pair is at a separate line, the minifying works well.

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

1 participant