question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optimizing properties of level 2 removes hsl values

See original GitHub issue

Precheck

Using 2 level, color values specified in hsl format are removed.

Similar to https://github.com/clean-css/clean-css/issues/1156

Environment

  • clean-css version - 5.1.5
  • node.js version - 14.17.5
  • operating system - Linux 5.13.12

Configuration options

var CleanCSS = require('clean-css');
new CleanCSS({ inline: false, level: 2 })

Input CSS

.zone.contacts .size_1_3 > a {
      border: 3px solid hsl(0deg 0 85%);
}

Actual output CSS

.zone.contacts .size_1_3>a{border:3px solid}

Expected output CSS

.zone.contacts .size_1_3>a{border:3px solid hsl(0deg 0 85%)}

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
jakubpawlowiczcommented, May 11, 2022

Thanks, I’ll dig into it.

0reactions
boris-petrovcommented, May 11, 2022

Not sure about that, probably it is OK to not use percentage as in most places CSS accepts also zero without a unit.

Also, here are more examples that are removed:

.foo {
  border-top: 0.063rem solid hsl(210deg, 10%, 24%);
}

.foo {
  border-top: 0.063rem solid hsl(210deg, 10.8108108108%, 24.649859944%);
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Tips for Using and Optimizing HSL Qualifications - Peachpit
You can use HSL Qualification to isolate regions of the image for secondary correction or hue curves to accomplish similarly targeted ...
Read more >
CSS Color Module Level 5 - W3C
Abstract. This module extends CSS Color [css-color-4] to add color modification functions, and custom color spaces (ICC profiles).
Read more >
Adjust color, saturation, and hue - Adobe Support
For Hue, enter a value or drag the slider until the colors appear as you ... in the red part of the color...
Read more >
Introducing the sequential linear programming level-set ...
The key features of the new method are discretized boundary integrals to estimate function changes and the formulation of an optimization sub- ...
Read more >
Ipopt Options - COIN-OR Documentation
The default value for this string option is "make_parameter". Possible values: make_parameter: Remove fixed variable from optimization variables ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found