mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 13:51:31 +01:00
Add red(), green(), and blue().
This commit is contained in:
parent
048d7cff33
commit
dbd55e16d8
@ -56,6 +56,23 @@ void defineCoreFunctions(Environment environment) {
|
||||
}
|
||||
]));
|
||||
|
||||
environment.setFunction(new BuiltInCallable(
|
||||
"red",
|
||||
new ArgumentDeclaration([new Argument("color")]),
|
||||
(arguments) => new SassNumber(arguments.first.assertColor("color").red)));
|
||||
|
||||
environment.setFunction(new BuiltInCallable(
|
||||
"green",
|
||||
new ArgumentDeclaration([new Argument("color")]),
|
||||
(arguments) =>
|
||||
new SassNumber(arguments.first.assertColor("color").green)));
|
||||
|
||||
environment.setFunction(new BuiltInCallable(
|
||||
"blue",
|
||||
new ArgumentDeclaration([new Argument("color")]),
|
||||
(arguments) =>
|
||||
new SassNumber(arguments.first.assertColor("color").blue)));
|
||||
|
||||
environment.setFunction(new BuiltInCallable(
|
||||
"mix",
|
||||
new ArgumentDeclaration([
|
||||
|
Loading…
x
Reference in New Issue
Block a user