2 Replies Latest reply on Nov 18, 2012 1:40 AM by john beardsworth

    FW CS6 sprites - both class and id selector

    john beardsworth Adobe Community Professional & MVP

      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

        • 1. Re: FW CS6 sprites - both class and id selector
          groove25 Level 4

          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.

          • 2. Re: FW CS6 sprites - both class and id selector
            john beardsworth Adobe Community Professional & MVP

            Thanks, that pretty well confirms what I'd thought, and I have been hacking the css (luckily my selector names made that easy). Like you suggest, I expected to have been able to add the selectors to the slices and was disappointed that didn't work.