Uploaded image for project: 'SmartSprites'
  1. SmartSprites
  2. SMARTSPRITES-40

Add support for disabling sprite reference directives and individual properties

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 0.3.0
    • Labels:
      None

      Description

      Motivation

      Sometimes it's useful to temporarily disable a sprite reference directive. Currently this can be achieved by replacing sprite-ref with some other token that will not be picked up by SmartSprites. Additionally, it may be useful to disable an individual property within a normally processed SmartSprites directive.

      Implementation

      A SmartSprites property that starts with a dash, e.g. : -sprite-ref: ... or -sprite-border-top: ... should be treated as disabled and should be excluded from sprite processing. If the directive's main property (-sprite-ref, -sprite) is disabled, the whole directive should be treated as disabled. Disabled directives should be excluded from sprite processing, but also removed from output, just like the original enabled directives.

      Discussion

      Another way of marking disabled directives could be using /* ... */ comments instead of the /** ... */ ones described in the documentation. However, if the former actually works with current versions, if we started treating them as disabled, it would break backward compatibility and we want to avoid that.

        Attachments

          Activity

            People

            • Assignee:
              stachoo Stanisław Osiński
              Reporter:
              stachoo Stanisław Osiński
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified