Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 0.4.0
-
Component/s: None
-
Labels:None
Description
At the moment each class specifies again and again the sprite file.
i.e.
.openidIcon_livejournal {
background-image: url('img/Secure_OpenIDLogin.png');
-background-image: url('img/Secure_OpenIDLogin-ie6.png');
background-position: left -424px;
}
.openidIcon_wordpress {
background-image: url('img/Secure_OpenIDLogin.png');
-background-image: url('img/Secure_OpenIDLogin-ie6.png');
background-position: left -440px;
}
.openidIcon_blogger {
background-image: url('img/Secure_OpenIDLogin.png');
-background-image: url('img/Secure_OpenIDLogin-ie6.png');
background-position: left -456px;
}
Add an option to define it just once.
i.e
.openidIcon_livejournal, .openidIcon_wordpress, .openidIcon_blogger {
background-image: url('img/Secure_OpenIDLogin.png');
-background-image: url('img/Secure_OpenIDLogin-ie6.png');
}
.openidIcon_livejournal {
background-position: left -424px;
}
.openidIcon_wordpress {
background-position: left -440px;
}
.openidIcon_blogger {
background-position: left -456px;
}
Or even better:
.openidIcon {
background-image: url('img/Secure_OpenIDLogin.png');
-background-image: url('img/Secure_OpenIDLogin-ie6.png');
}
#livejournal.openidIcon {
background-position: left -424px;
}
#wordpress.openidIcon {
background-position: left -440px;
}
#blogger.openidIcon {
background-position: left -456px;
}
Issue Links
| This issue depends on: | ||||
| SMARTSPRITES-47 | Replace line-based CSS processing with a parser-based one |
|
|
|
Hi there,
Thanks for the suggestion! The first suggested compression should be doable once SMARTSPRITES-47 is done. The second compression sounds very much like a heuristic and it's not always applicable (think of a selector like this: {{li#menu > small.item { ... }}}).
Cheers,
Staszek