@sprite for background-image only?

99 views
Skip to first unread message

rhodebump

unread,
Oct 8, 2012, 5:58:05 PM10/8/12
to google-we...@googlegroups.com
Hello,

I am trying to use the @sprite annotation to help reduce my image downloads.  I have the following css, which uses a "border-image" property.  I would love to be able to use the sprite annotation, but this is only for background images.  Is there a way to use imageresources/cssresources together for the "border-image" property?


Thanks,
Phillip

.whiteButton {
    border-image:url(images/whiteButton.png)  0 12 0 12;
    -webkit-border-image: url(images/whiteButton.png) 0 12 0 12;
    -moz-border-image: url(images/whiteButton.png) 0 12 0 12;
    text-shadow: rgba(255, 255, 255, 0.7) 0 1px 0;
}

Thomas Broyer

unread,
Oct 8, 2012, 8:06:38 PM10/8/12
to google-we...@googlegroups.com


On Monday, October 8, 2012 11:58:05 PM UTC+2, rhodebump wrote:
Hello,

I am trying to use the @sprite annotation to help reduce my image downloads.  I have the following css, which uses a "border-image" property.  I would love to be able to use the sprite annotation, but this is only for background images.  Is there a way to use imageresources/cssresources together for the "border-image" property?

Use a DataResource and @url rule:

@url whiteButtonUrl whiteButton;
.whiteButton {
  border-image: whiteButtonUrl 0 12 0 12;
}

rhodebump

unread,
Oct 15, 2012, 8:11:54 AM10/15/12
to google-we...@googlegroups.com
Awesome, i will give it a shot!  Thanks
Reply all
Reply to author
Forward
0 new messages