Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
4adc5b22
Commit
4adc5b22
authored
Mar 04, 2014
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CSS: Return values should be numbers
Fixes #14792 (cherry picked from commit
f4b37d89
)
parent
93fdfa2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
css.js
src/css.js
+2
-2
css.js
test/unit/css.js
+2
-1
No files found.
src/css.js
View file @
4adc5b22
...
@@ -32,8 +32,8 @@ var
...
@@ -32,8 +32,8 @@ var
cssShow
=
{
position
:
"absolute"
,
visibility
:
"hidden"
,
display
:
"block"
},
cssShow
=
{
position
:
"absolute"
,
visibility
:
"hidden"
,
display
:
"block"
},
cssNormalTransform
=
{
cssNormalTransform
=
{
letterSpacing
:
0
,
letterSpacing
:
"0"
,
fontWeight
:
400
fontWeight
:
"400"
},
},
cssPrefixes
=
[
"Webkit"
,
"O"
,
"Moz"
,
"ms"
];
cssPrefixes
=
[
"Webkit"
,
"O"
,
"Moz"
,
"ms"
];
...
...
test/unit/css.js
View file @
4adc5b22
...
@@ -871,12 +871,13 @@ testIframeWithCallback( "css('width') should work correctly before document read
...
@@ -871,12 +871,13 @@ testIframeWithCallback( "css('width') should work correctly before document read
);
);
test
(
"certain css values of 'normal' should be convertable to a number, see #8627"
,
function
()
{
test
(
"certain css values of 'normal' should be convertable to a number, see #8627"
,
function
()
{
expect
(
2
);
expect
(
3
);
var
el
=
jQuery
(
"<div style='letter-spacing:normal;font-weight:normal;'>test</div>"
).
appendTo
(
"#qunit-fixture"
);
var
el
=
jQuery
(
"<div style='letter-spacing:normal;font-weight:normal;'>test</div>"
).
appendTo
(
"#qunit-fixture"
);
ok
(
jQuery
.
isNumeric
(
parseFloat
(
el
.
css
(
"letterSpacing"
)
)
),
"css('letterSpacing') not convertable to number, see #8627"
);
ok
(
jQuery
.
isNumeric
(
parseFloat
(
el
.
css
(
"letterSpacing"
)
)
),
"css('letterSpacing') not convertable to number, see #8627"
);
ok
(
jQuery
.
isNumeric
(
parseFloat
(
el
.
css
(
"fontWeight"
)
)
),
"css('fontWeight') not convertable to number, see #8627"
);
ok
(
jQuery
.
isNumeric
(
parseFloat
(
el
.
css
(
"fontWeight"
)
)
),
"css('fontWeight') not convertable to number, see #8627"
);
equal
(
typeof
el
.
css
(
"fontWeight"
),
"string"
,
".css() returns a string"
);
});
});
// only run this test in IE9
// only run this test in IE9
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment