Skip to content

Commit

Permalink
Merge "Fix parse error when opacity is set to zero to alpha() function"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Aug 6, 2024
2 parents f8b680c + 0d80730 commit dd843a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Less/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2134,7 +2134,7 @@ private function parseAlpha() {
}

$value = $this->matchReg( '/\\G[0-9]+/' );
if ( !$value ) {
if ( $value === null ) {
$value = $this->expect( 'parseEntitiesVariable', 'Could not parse alpha' );
}

Expand Down
3 changes: 3 additions & 0 deletions test/Fixtures/less.php/css/T371606-alpha-zero-error.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.alpha {
filter: alpha(opacity=0);
}
3 changes: 3 additions & 0 deletions test/Fixtures/less.php/less/T371606-alpha-zero-error.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.alpha {
filter: alpha(opacity=0);
}

0 comments on commit dd843a2

Please sign in to comment.