Skip to content

feat: added the syntax for alpha() function - #1092

Merged
dletorey merged 4 commits into
mdn:mainfrom
dletorey:45191-alpha-required
Sep 1, 2026
Merged

dletorey merged 4 commits into
mdn:mainfrom
dletorey:45191-alpha-required

Conversation

@dletorey

@dletorey dletorey commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • Added the syntax for alpha() function

Motivation

Related issues and pull requests

@dletorey
dletorey requested review from a team as code owners August 19, 2026 15:31
@dletorey
dletorey requested a review from pepelsbey August 19, 2026 15:31
@dletorey dletorey changed the title added the syntax for alpha() function Aug 19, 2026
@dletorey

Copy link
Copy Markdown
Contributor Author

updated due to this conversation

@yisibl

yisibl commented Aug 20, 2026

Copy link
Copy Markdown

Please note that since the alpha value was optional in the original specification, it was also optional when Chrome 152 was first released.

https://chromestatus.com/feature/5070160203481088

@dletorey

Copy link
Copy Markdown
Contributor Author

Please note that since the alpha value was optional in the original specification, it was also optional when Chrome 152 was first released.

https://chromestatus.com/feature/5070160203481088

@yisibl my testing in this suggests that Chrome and Safari have made this required

@yisibl

yisibl commented Aug 21, 2026

Copy link
Copy Markdown

Take a look at the test below: in Chrome 152, the background is green, while in Firefox, the syntax is invalid.

data:text/html;charset=UTF-8,<!doctype html> 
<style>
  body {
    background: alpha(from green);
  }
</style>

@dipikabh dipikabh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, Dave.
A few nits...approving. Please ping me if you need me to merge.

Comment thread css/functions.json Resolved
dletorey and others added 2 commits September 1, 2026 11:43
Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
@dletorey
dletorey merged commit 53f04b6 into mdn:main Sep 1, 2026
2 checks passed
@dletorey
dletorey deleted the 45191-alpha-required branch September 1, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants