Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: clean-css/clean-css
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.1.0
Choose a base ref
...
head repository: clean-css/clean-css
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.1.1
Choose a head ref
  • 3 commits
  • 7 files changed
  • 1 contributor

Commits on Feb 18, 2021

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    jakubpawlowicz Jakub Pawlowicz
    Copy the full SHA
    2a03edb View commit details

Commits on Mar 3, 2021

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    jakubpawlowicz Jakub Pawlowicz
    Copy the full SHA
    a7cdd76 View commit details
  2. Version 5.1.1.

    jakubpawlowicz committed Mar 3, 2021

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    jakubpawlowicz Jakub Pawlowicz
    Copy the full SHA
    896945f View commit details
Showing with 18 additions and 5 deletions.
  1. +5 −0 History.md
  2. +1 −1 docs/index.html
  3. +1 −1 docs/js/optimizer-worker.js
  4. +1 −1 lib/optimizer/validator.js
  5. +1 −1 package-lock.json
  6. +1 −1 package.json
  7. +8 −0 test/optimizer/level-2/optimize-test.js
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[5.1.1 / 2021-03-03](https://github.com/jakubpawlowicz/clean-css/compare/v5.1.0...v5.1.1)
==================

* Fixed issue [#1156](https://github.com/jakubpawlowicz/clean-css/issues/1156) - invalid hsl/hsla validation in level 2 optimizations.

[5.1.0 / 2021-02-18](https://github.com/jakubpawlowicz/clean-css/compare/5.0...v5.1.0)
==================

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ <h1 class="logo">
<form class="settings settings--collapsed js-settings">
<fieldset class="settings__group">
<select class="settings__option settings__option--version" name="version">
<option value="v5.0.1" selected>5.0.1 (latest)</option>
<option value="v5.1.0" selected>5.1.0 (latest)</option>
</select>
</fieldset>
<fieldset class="settings__group settings__group--advanced">
2 changes: 1 addition & 1 deletion docs/js/optimizer-worker.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ onmessage = function(event) {
case 'initialize':
if (!initialized) {
initialized = true
importScripts('//jakubpawlowicz.github.io/clean-css-builds/v5.0.1.js')
importScripts('//jakubpawlowicz.github.io/clean-css-builds/v5.1.0.js')
}
break
case 'optimize':
2 changes: 1 addition & 1 deletion lib/optimizer/validator.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ var calcRegex = new RegExp('^(\\-moz\\-|\\-webkit\\-)?calc\\([^\\)]+\\)$', 'i');
var decimalRegex = /[0-9]/;
var functionAnyRegex = new RegExp('^' + functionAnyRegexStr + '$', 'i');
var hexAlphaColorRegex = /^#(?:[0-9a-f]{4}|[0-9a-f]{8})$/i;
var hslColorRegex = /^hsl\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+%\s{0,31}\)|hsla\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+\s{0,31}\)$/i;
var hslColorRegex = /^hsl\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31}\)|hsla\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31},\s{0,31}\.?\d+\s{0,31}\)$/;
var identifierRegex = /^(\-[a-z0-9_][a-z0-9\-_]*|[a-z_][a-z0-9\-_]*)$/i;
var namedEntityRegex = /^[a-z]+$/i;
var prefixRegex = /^-([a-z0-9]|-)*$/i;
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clean-css",
"version": "5.1.0",
"version": "5.1.1",
"author": "Jakub Pawlowicz <contact@jakubpawlowicz.com> (https://jakubpawlowicz.com)",
"description": "A well-tested CSS minifier",
"license": "MIT",
8 changes: 8 additions & 0 deletions test/optimizer/level-2/optimize-test.js
Original file line number Diff line number Diff line change
@@ -199,6 +199,14 @@ vows.describe('level 2 optimizer')
'eight value colors': [
'.block{border:1px solid #00000001}',
'.block{border:1px solid #00000001}'
],
'hsl color with fractions': [
'.block{border:1px solid hsl(0, 0%, 65.5%)}',
'.block{border:1px solid hsl(0,0%,65.5%)}'
],
'hsla color with fractions': [
'.block{border:1px solid hsla(0, 0%, 65.5%, 0.2)}',
'.block{border:1px solid hsla(0,0%,65.5%,.2)}'
]
}, { level: 2 })
)