mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(style): CSS variables should be case-sensitive. (#9603)
This commit is contained in:
committed by
GitHub
parent
846a87c666
commit
02aa0f652a
@@ -1,4 +1,5 @@
|
||||
import '../../../globals';
|
||||
import { isCssVariable } from '../../core/properties';
|
||||
import { isNullOrUndefined } from '../../../utils/types';
|
||||
|
||||
import * as cssParser from '../../../css';
|
||||
@@ -523,7 +524,7 @@ export function fromAstNodes(astRules: cssParser.Node[]): RuleSet[] {
|
||||
}
|
||||
|
||||
function createDeclaration(decl: cssParser.Declaration): any {
|
||||
return { property: decl.property.toLowerCase(), value: decl.value };
|
||||
return { property: isCssVariable(decl.property) ? decl.property : decl.property.toLowerCase(), value: decl.value };
|
||||
}
|
||||
|
||||
function createSimpleSelectorFromAst(ast: parser.SimpleSelector): SimpleSelector {
|
||||
|
||||
Reference in New Issue
Block a user