[Feature Request]Show what selector(s) matches

edited February 2008 in Stylish
Most people are not CSS masters. We may make mistakes when writing css rules. However, we know very little when selectors don't work. Very often this is the specificity problem. Although I could quickly debug this by adding !important into the rules, I could not know whether my selectors match what I want before adding !important and clicking preview button. And sometimes a too general selector might match more elements than we have expected. If I choose to hide what those selectors match, I might hide something that I don't want it to disappear. But once I clicked "preview", those objects were all hidden. It is hard to know what have been hidden. It would be a good feature if stylish can show what our selectors match like drawing highlighted border around them or apply a colorful half-transparent layer over them when clicking "Test Selectors" button. I suggest that clicking this button would always show what selectors match. If the selector doesn't have enough specificity, it should still be shown but with less highlighted color. It would be even better if different colors could be used for different selectors.

Finally. I would like to say, I like stylish very much. Thanks for this great extension!


  • Oh my, i like it!! Not sure if it should be in the Stylish though or a separate extension, like 'DOMi Helper'. I definitely need one!
  • edited February 2008
    Indeed! It is a very good feature! But you can also test your selector by using different CSS rules (other than display:none or visibility:hidden) right?
    For example:
    element[attribute="value"] {
    border: 1px solid red !important;
    background-color: yellow !important;
    text-decoration: blink !important;
    That's what I usually do to test a selector.
  • Thanks for your great tip, LouCypher. I would use it from now on! However, I still hope np could consider implementing this useful feature.
  • Thanks Lou! ....
    Posted By: coolcd... I still hope np could consider implementing this useful feature.
Sign In or Register to comment.