Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CSSComponentValueDelimiter::CommaOrWhitespace
Summary: Must function notations do not require delimiting commas, with color function "legacy" syntax being an exception. E.g. ``` rgb() = [ <legacy-rgb-syntax> | <modern-rgb-syntax> ] rgba() = [ <legacy-rgba-syntax> | <modern-rgba-syntax> ] <legacy-rgb-syntax> = rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? ) <legacy-rgba-syntax> = rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? ) <modern-rgb-syntax> = rgb( [ <number> | <percentage> | none]{3} [ / [<alpha-value> | none] ]? ) <modern-rgba-syntax> = rgba( [ <number> | <percentage> | none]{3} [ / [<alpha-value> | none] ]? ) ``` Theoretically, this should mean an expression like `rgb(1, 2 0)`, which mixes both comma and whitespace delimeters would be malformed, but both Chrome, and RN's existing `normalize-color` package support this, so to make this pattern easier, we add the ability to scan based on using either whitespace or comma as component value delimeter. Changelog: [Internal] Differential Revision: D68349385
- Loading branch information