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
bc7bb0df
Commit
bc7bb0df
authored
Apr 22, 2011
by
timmywil
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:jquery/jquery
parents
2942be78
3d9445e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
css.js
src/css.js
+3
-1
css.js
test/unit/css.js
+25
-1
No files found.
src/css.js
View file @
bc7bb0df
...
@@ -59,7 +59,9 @@ jQuery.extend({
...
@@ -59,7 +59,9 @@ jQuery.extend({
"fontWeight"
:
true
,
"fontWeight"
:
true
,
"opacity"
:
true
,
"opacity"
:
true
,
"zoom"
:
true
,
"zoom"
:
true
,
"lineHeight"
:
true
"lineHeight"
:
true
,
"widows"
:
true
,
"orphans"
:
true
},
},
// Add in properties whose names you wish to fix before
// Add in properties whose names you wish to fix before
...
...
test/unit/css.js
View file @
bc7bb0df
...
@@ -45,9 +45,9 @@ test("css(String|Hash)", function() {
...
@@ -45,9 +45,9 @@ test("css(String|Hash)", function() {
equals
(
jQuery
(
"#floatTest"
).
css
(
"float"
),
"right"
,
"Modified CSS float using
\"
float
\"
: Assert float is right"
);
equals
(
jQuery
(
"#floatTest"
).
css
(
"float"
),
"right"
,
"Modified CSS float using
\"
float
\"
: Assert float is right"
);
jQuery
(
"#floatTest"
).
css
({
"font-size"
:
"30px"
});
jQuery
(
"#floatTest"
).
css
({
"font-size"
:
"30px"
});
equals
(
jQuery
(
"#floatTest"
).
css
(
"font-size"
),
"30px"
,
"Modified CSS font-size: Assert font-size is 30px"
);
equals
(
jQuery
(
"#floatTest"
).
css
(
"font-size"
),
"30px"
,
"Modified CSS font-size: Assert font-size is 30px"
);
jQuery
.
each
(
"0,0.25,0.5,0.75,1"
.
split
(
","
),
function
(
i
,
n
)
{
jQuery
.
each
(
"0,0.25,0.5,0.75,1"
.
split
(
","
),
function
(
i
,
n
)
{
jQuery
(
"#foo"
).
css
({
opacity
:
n
});
jQuery
(
"#foo"
).
css
({
opacity
:
n
});
equals
(
jQuery
(
"#foo"
).
css
(
"opacity"
),
parseFloat
(
n
),
"Assert opacity is "
+
parseFloat
(
n
)
+
" as a String"
);
equals
(
jQuery
(
"#foo"
).
css
(
"opacity"
),
parseFloat
(
n
),
"Assert opacity is "
+
parseFloat
(
n
)
+
" as a String"
);
jQuery
(
"#foo"
).
css
({
opacity
:
parseFloat
(
n
)});
jQuery
(
"#foo"
).
css
({
opacity
:
parseFloat
(
n
)});
equals
(
jQuery
(
"#foo"
).
css
(
"opacity"
),
parseFloat
(
n
),
"Assert opacity is "
+
parseFloat
(
n
)
+
" as a Number"
);
equals
(
jQuery
(
"#foo"
).
css
(
"opacity"
),
parseFloat
(
n
),
"Assert opacity is "
+
parseFloat
(
n
)
+
" as a Number"
);
...
@@ -394,3 +394,27 @@ test("jQuery.cssProps behavior, (bug #8402)", function() {
...
@@ -394,3 +394,27 @@ test("jQuery.cssProps behavior, (bug #8402)", function() {
// cleanup jQuery.cssProps
// cleanup jQuery.cssProps
jQuery
.
cssProps
.
top
=
undefined
;
jQuery
.
cssProps
.
top
=
undefined
;
});
});
test
(
"widows & orphans #8936"
,
function
()
{
expect
(
4
);
var
$p
=
jQuery
(
"<p>"
).
appendTo
(
"#main"
).
end
();
$p
.
css
({
widows
:
0
,
orphans
:
0
});
equal
(
$p
.
css
(
"widows"
),
0
,
"widows correctly start with value 0"
);
equal
(
$p
.
css
(
"orphans"
),
0
,
"orphans correctly start with value 0"
);
$p
.
css
({
widows
:
3
,
orphans
:
3
});
equal
(
$p
.
css
(
"widows"
),
3
,
"widows correctly set to 3"
);
equal
(
$p
.
css
(
"orphans"
),
3
,
"orphans correctly set to 3"
);
$p
.
remove
();
});
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