mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix: background-position with negative values
This commit is contained in:
@@ -31,7 +31,7 @@ Parser.prototype.ident = function(){
|
||||
};
|
||||
|
||||
Parser.prototype.int = function(){
|
||||
var m = /^((\d+)(\S+)?) */.exec(this.str);
|
||||
var m = /^(([-\+]?\d+)(\S+)?) */.exec(this.str);
|
||||
if (!m) return;
|
||||
this.skip(m);
|
||||
var n = ~~m[2];
|
||||
@@ -46,7 +46,7 @@ Parser.prototype.int = function(){
|
||||
};
|
||||
|
||||
Parser.prototype.float = function(){
|
||||
var m = /^(((?:\d+)?\.\d+)(\S+)?) */.exec(this.str);
|
||||
var m = /^(((?:[-\+]?\d+)?\.\d+)(\S+)?) */.exec(this.str);
|
||||
if (!m) return;
|
||||
this.skip(m);
|
||||
var n = parseFloat(m[2]);
|
||||
|
||||
10
css-value/reworkcss-value.d.ts
vendored
10
css-value/reworkcss-value.d.ts
vendored
@@ -2,12 +2,10 @@ declare module "css-value" {
|
||||
interface CSSValue {
|
||||
type: string;
|
||||
string: string;
|
||||
unit: string;
|
||||
value: number;
|
||||
unit?: string;
|
||||
value?: number;
|
||||
}
|
||||
|
||||
interface ParserFunction {
|
||||
(cssValue: string): Array<CSSValue>;
|
||||
}
|
||||
export = ParserFunction;
|
||||
function parse(cssValue: string): Array<CSSValue>;
|
||||
export = parse;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user