Active
Project:
CSS Injector
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2010 at 01:48 UTC
Updated:
30 May 2011 at 02:37 UTC
Right now, to disable a rule you have to delete it.
Comments
Comment #1
escoles commentedYou can also pseudo-disable a rule by removing all its exception/inclusion arguments.
However, I agree that this would be a good feature -- removing the exception/inclusion arguments just so you can temporarily suspend a style rule potentially results in loss of history -- there's no method for reversion to the earlier state, aside from manually recording those arguments somewhere.
EDIT: One workaround that occured to me after clicking save would be to set the exclusion/inclusion criteria to PHP, and surround the argument set with PHP comments. E.g.:
However, as my goal is always to produce a site that clients can maintain, this isn't really a proper method from my perspective.
Also, my example exposes a potential weakness of the tactic: That some wildcards will break the comment set. So, it would make more sense maybe to use "//"-leaders. I think that would fail to load the sheet for all pages if you neglected to remove the comment-markers after un-setting the PHP selection.
Comment #2
klonos+1 for this
Comment #3
iantresman commentedYes, please this would be very useful. I'm currently trying out different themes, and want to disable some CSS which I added to a previous theme, and will want to re-instate if I re-enable it.
Comment #4
DrewMathers commentedIt would also be great to be able to have rules apply only to specified active themes for sites that do theme switching.
Comment #5
klonosNice thought Drew! Still, this issue is about finding an easy way to reuse old rules instead of deleting and creating them again when they are needed. So, I think you should create a new issue for your feature request. Anyhow, your feature will surely depend on this one being implemented first I guess.
Comment #6
klonos@Drew, #4: your request lives here: #353386: Allow applicable theme(s) to be selected to apply rule to
Comment #7
gordon commentedsubscribe