SelectorsHub / SelectorsHubIssues

11 stars 0 forks source link

Trigger auto suggestion on colon #33

Closed depascalis closed 3 years ago

depascalis commented 3 years ago

When writing selectors in the input field with Auto suggestions turned on, suggestions are not triggered for colon :, suggestions are only trigger after adding another character after the colon :f. It would be preferable if all pseudo selectors were suggested after a single colon.

selectorshubsanjay commented 3 years ago

Thank you for the suggestion. Taken your feedback and added it as enhancement. It will be available with next release.

image

selectorshubsanjay commented 3 years ago

Fix is live now on Firefox. You can add SelectorsHub in Firefox and test it. https://addons.mozilla.org/en-US/firefox/addon/selectorshub/

On Chrome, it's under review. It will be available within 1-2days.

Kindly close the review after testing it. Thank you.

depascalis commented 3 years ago

I don't know if this behavior is related to this change, the other changes, or if it's by design. When generating class selectors, it generates with the attribute selector and not the class selector.

Examples

Here are some examples when inspecting https://github.com/SelectorsHub/SelectorsHubIssues

class selector

class checked image div[class="color-bg-secondary pt-3 hide-full-screen mb-5"]

If the class names is not in the exact order as in the selector above, the selector will break. So in my opinion, it would be better to use div.color-bg-secondary.pt-3.hide-full-screen.mb-5 if you want all those selectors included.

nth-child() selector

class unchecked and id checked image body > div:nth-child(5) > div:nth-child(1) > main:nth-child(1) > div:nth-child(1)

In this example, I'm wondering why it is ignoring IDs from parent elements, nth-child() should have the absolute lowest priority and should be avoided, right? Or is the preference checkbox only being applied to the currently selected element and not the whole DOM tree of the selected element?

Maybe I'm using the extension incorrectly?

selectorshubsanjay commented 3 years ago

You are right Mike. There is an issue in filter for CSS. I will fix it. Thank you. Appreciate your findings.

selectorshubsanjay commented 3 years ago

Hi Mike, all the fixes are live now on Firefox. Please test it once. Thank you.

depascalis commented 3 years ago

Well done @selectorshubsanjay that fixed it. I still have some more things to address but I will create a new issue for that.