Right now, to disable a rule you have to delete it.

Comments

escoles’s picture

You 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.:

/*
parthpart1/pathpart2
pathpart3/*
*/

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.

klonos’s picture

+1 for this

iantresman’s picture

Yes, 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.

DrewMathers’s picture

Title: Allow CSS rules to be enabled/disabled » Allow CSS rules to be enabled/disabled based on theme

It would also be great to be able to have rules apply only to specified active themes for sites that do theme switching.

klonos’s picture

Title: Allow CSS rules to be enabled/disabled based on theme » Allow CSS rules to be enabled/disabled (...instead of being deleted)

Nice 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.

klonos’s picture

gordon’s picture

subscribe