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

Incorrect border transform makes border disappear #1090

Closed
mashedcode opened this issue Nov 9, 2019 · 3 comments
Closed

Incorrect border transform makes border disappear #1090

mashedcode opened this issue Nov 9, 2019 · 3 comments
Labels

Comments

@mashedcode
Copy link

mashedcode commented Nov 9, 2019

Environment

clean-css version 4.2.1 (clean-css-cli -O2 from master)

Input CSS

.test {
        border-color: currentcolor currentcolor rgb(148, 148, 148);
        border-image: none 100% / 1 / 0 stretch;
        border-width: 0px 0px 1px;
        border-style: none none solid;
}

Actual output CSS

.test{border-image:none 100%/1/0 stretch;border:0 currentcolor}

Expected output CSS

.test{border-color:#949494;border-width:0 0 1px;border-style:solid}

or

.test{border:0;border-bottom:1px solid #949494}
@jakubpawlowicz
Copy link
Collaborator

Thank you for flagging this issue - see 3e82bdc#diff-eaef0d9fa6e206ff3078d62db24fc3da7909fde09a53728f592d5a0575df7793R74 for valid test cases.

By the way I didn't find border-image:none 100%/1/0 stretch to be invalid but clean-css doesn't touch border-image at all. Would you care to elaborate, maybe there's room for further improvement.

@mashedcode
Copy link
Author

mashedcode commented Jan 27, 2021

Thanks!
The original css was generated by servo.
I guess the best optimization for border-image in this case would be border-image:0 because all provided values are the default values.
Definitely not a very common property.
Yes, keeping it as is would be correct.

@jakubpawlowicz
Copy link
Collaborator

Thanks @mashedcode - I've just opened #1138 for border-image improvements.

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

No branches or pull requests

2 participants