Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried :style -name=codesnippet craftyjs.com pre code {background-color: transparent;} but nothing happened, apparently. Then I tried :styleenable -name=codesnippet but nothing happend, either. How am I supposed to use this commands?

I'm running Pentadactyl nightly and Firefox 18 (stable).

share|improve this question

2 Answers 2

The problem here is CSS Specificity (See Chris Coyier's post for a nice description). You can add an !important to make this work.

:style -name=cs craftyjs.com pre code {background-color: transparent !important;} 
share|improve this answer

It's been a while since your original question, so perhaps the craftyjs site has changed since then. In any case, I couldn't find a specific element that matched your example CSS selector. So, I'll just provide an example with the site I see today.

Let's use this page as an example: Crafty.settings. Look at those lovely parameter lists! So grey. I hate grey. In fact, I hate parameter lists. Let's pretend they don't exist:

:style -name=ewww craftyjs.com dl {display:none;}

Gone. Ahh.

Now, you may very well ask, why does this work, when your finely crafted example did not? I don't know!

Here's a slightly modified example:

:style -name=ewww craftyjs.com dl {background:#f00;}

Doesn't work! This does, though:

:style -name=ewww craftyjs.com dl {color:#f00;}

Hmmm. We notice that pentadactyl doesn't offer "background" as a completion. Maybe:

:style -name=ewww craftyjs.com dl {background-color:#f00;}

No. Well, perhaps the Firefox developer tools can help us. Inspecting the parameter list box (while sneering silently to ourselves) shows this as the full setting: none repeat scroll 0% 0% rgb(238, 238, 238). Let's change it to blue: background: none repeat scroll 0% 0% rgb(0, 0, 238). Very nice! A comforting retro look. Reset it to gray, so that we can do it with Pentadactyl, like this:

:style -name=ewww craftyjs.com dl {background: none repeat scroll 0% 0% rgb(0, 0, 255)}

Argh. Sorrow. Back to normal. Looks like we found a bug! I like this bug so much, I gave it a special name: Pentadactly issue #969. Catchy, right?

Update: Aaaand, Peter Wooley FTW! (And now I know more about CSS. Possibly more than I wanted.) Recommended closing the new Pentdactyl issue.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.