First, thanks for a great module!

Let's say we have the following HTML:

<div class="foo">
  ...div contents...
</div>

When I click on the div to theme it using Sweaver, I see a little dropdown arrow. When I click it, I can pick between either "div" (internally, the div selector) or "all foo" (internally, the .foo selector). Is it possible to pick an "all foo div's" (the div.foo selector) option?

The use case for this is as follows:
Let's say the theme's default CSS already defines div.foo to have a red background, but you want to give it a blue background. Changing .foo is insufficient, because the pre-existing CSS declaration for div.foo takes precedence over the new CSS declaration for .foo, and div.foo remains red. Changing <div> is overkill, because it will turn every div blue.

Thanks for any help, insight, or advice you can provide!

CommentFileSizeAuthor
#2 combined_selectors.patch8.76 KBjyve

Comments

jyve’s picture

This shouldn't be too difficult so we will have a look at it.

jyve’s picture

Version: 6.x-1.0-beta1 » 7.x-1.x-dev
Assigned: Unassigned » swentel
Status: Active » Patch (to be ported)
StatusFileSize
new8.76 KB

There is now an option in the backend to allow combined selectors. This makes a match of the tag, the id and all classes. By default this setting is off, as it clutters up the interface a bit.

Committed to the D6 dev version. Patch for D7 is attached.

swentel’s picture

Status: Patch (to be ported) » Closed (fixed)

Committed to D7 branch.