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
d3b61de5
Commit
d3b61de5
authored
Apr 20, 2012
by
Mike Sherov
Committed by
Rick Waldron waldron.rick@gmail.com
Apr 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
define curCSS without temp vars to save 10 bytes
parent
df2a22ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
css.js
src/css.js
+4
-10
No files found.
src/css.js
View file @
d3b61de5
...
@@ -15,9 +15,7 @@ var ralpha = /alpha\([^)]*\)/i,
...
@@ -15,9 +15,7 @@ var ralpha = /alpha\([^)]*\)/i,
cssExpand
=
[
"Top"
,
"Right"
,
"Bottom"
,
"Left"
],
cssExpand
=
[
"Top"
,
"Right"
,
"Bottom"
,
"Left"
],
cssPrefixes
=
[
"O"
,
"Webkit"
,
"Moz"
,
"ms"
],
cssPrefixes
=
[
"O"
,
"Webkit"
,
"Moz"
,
"ms"
],
curCSS
,
curCSS
;
getComputedStyle
,
currentStyle
;
// return a css property mapped to a potentially vendor prefixed property
// return a css property mapped to a potentially vendor prefixed property
function
vendorPropName
(
style
,
name
)
{
function
vendorPropName
(
style
,
name
)
{
...
@@ -198,7 +196,7 @@ jQuery.extend({
...
@@ -198,7 +196,7 @@ jQuery.extend({
jQuery
.
curCSS
=
jQuery
.
css
;
jQuery
.
curCSS
=
jQuery
.
css
;
if
(
document
.
defaultView
&&
document
.
defaultView
.
getComputedStyle
)
{
if
(
document
.
defaultView
&&
document
.
defaultView
.
getComputedStyle
)
{
getComputedStyle
=
function
(
elem
,
name
)
{
curCSS
=
function
(
elem
,
name
)
{
var
ret
,
defaultView
,
computedStyle
,
width
,
var
ret
,
defaultView
,
computedStyle
,
width
,
style
=
elem
.
style
;
style
=
elem
.
style
;
...
@@ -225,10 +223,8 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) {
...
@@ -225,10 +223,8 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) {
return
ret
;
return
ret
;
};
};
}
}
else
if
(
document
.
documentElement
.
currentStyle
)
{
curCSS
=
function
(
elem
,
name
)
{
if
(
document
.
documentElement
.
currentStyle
)
{
currentStyle
=
function
(
elem
,
name
)
{
var
left
,
rsLeft
,
uncomputed
,
var
left
,
rsLeft
,
uncomputed
,
ret
=
elem
.
currentStyle
&&
elem
.
currentStyle
[
name
],
ret
=
elem
.
currentStyle
&&
elem
.
currentStyle
[
name
],
style
=
elem
.
style
;
style
=
elem
.
style
;
...
@@ -268,8 +264,6 @@ if ( document.documentElement.currentStyle ) {
...
@@ -268,8 +264,6 @@ if ( document.documentElement.currentStyle ) {
};
};
}
}
curCSS
=
getComputedStyle
||
currentStyle
;
function
getWidthOrHeight
(
elem
,
name
,
extra
)
{
function
getWidthOrHeight
(
elem
,
name
,
extra
)
{
// Start with offset property, which is equivalent to the border-box value
// Start with offset property, which is equivalent to the border-box value
...
...
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