Skip navigation
Currently Being Moderated

FW CS6 sprites - both class and id selector

Nov 17, 2012 12:55 AM

Is it possible to output sprites containing both class and id selectors?

 

I'm generating sprites for an existing web page which contains both class and id CSS. When I export from FW, the Export Options give me the choice of class or id, which makes me think I'm going to have to maintain two or more FW files. Is that right? Is there a way I can force FW CS6 to generate a single sprite file containing both class and id selectors?

 

John

 
Replies
  • Currently Being Moderated
    Nov 17, 2012 2:46 PM   in reply to john beardsworth

    To make this work, there'd need to be a way to designate ‘class versus id’ for each individual slice; however, writing the selectors for class(.) or id(#) into the slice names themselves seems to be overridden upon export.

     

    I can think of two possible strategies:

     

    1. Fixing the issue after the fact. During export, simply choose the selector option that's used most frequently, and then open the resulting CSS file in a text editor and switch the incorrect selectors from class(.) to id(#), or vice versa.
    2. Exporting in multiple passes. The Export dialog includes a ‘Selected Slices Only’ option. First use the Pointer tool to select all slices to be output with class(.) selectors, and Export using that option. Then do the same for slices to be output with id(#) selectors. You could also use sublayers within the Web Layer to help you in organizing and selecting slices.

     

    The second strategy will result in two different sprite sheets but would allow you to work within a single FW document, if that's a benefit.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points