Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature requests for ":matches-css" #567

Closed
6 of 8 tasks
DandelionSprout opened this issue May 11, 2019 · 3 comments
Closed
6 of 8 tasks

Feature requests for ":matches-css" #567

DandelionSprout opened this issue May 11, 2019 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@DandelionSprout
Copy link

DandelionSprout commented May 11, 2019

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

I'm combining two feature requests into one, as I wish to become able to write entries to modify specific pre-existing CSS element values, à la fandom.com##body:matches-css(cursor: url*):style(cursor: auto). This would make it possible to write very good CSS-editing entries that'd make uBO's :style feature even more superior to the functionalities of privacy-scandal-struck CSS-editor-specific extensions like Stylish.

Request 1: Supporting wildcards in the :matches-css text selection, as it'd (among many other things) make it possible to target all uses of custom URL values, instead of one and one custom image at a time.

Request 2: Making it possible to combine :matches-css with :style.

A specific URL where the issue occurs

https://winx.fandom.com/wiki/Tecna.

Steps to Reproduce

  1. Open the element picker.
  2. Write ##body:matches-css(background-size: cover), and see that the picker does recognise such an element.
  3. (In request 1) Write e.g. ##body:matches-css(background-size: *), ##body:matches-css(background-size: cov*) ##body:matches-css(/background-size:.*/), ##body:matches-css(/[background-size: ]*/) or ##body:matches-css(background-size:) (among others), and see that the picker doesn't recognise any of them.
  4. (In request 2) Write ##body:matches-css(background-size: cover):style(background-size: unset), and see that the picker doesn't recognise it.

Expected behavior:

That the elements would've been hideable by uBO under such criteria.

Actual behavior:

(Covered by the reproduction steps.)

Your environment

  • uBlock Origin version: uBO 1.18.16
  • Browser Name and version: Vivaldi 2.3.1440.61 64-bit
  • Operating System and version: Windows 10 October 2018 Update (Recentmost installed update: KB4495667)
@gwarser
Copy link

gwarser commented May 11, 2019

  1. use regular expression, see example in https://github.com/gorhill/uBlock/wiki/Procedural-cosmetic-filters#subjectmatches-cssarg
  2. duplicate of Combining procedural selector :has() and :style() #382

@gwarser gwarser closed this as completed May 11, 2019
@DandelionSprout
Copy link
Author

DandelionSprout commented May 11, 2019

I suppose both of those links explains it. My fault.

And indeed it seems that writing à la ##body:matches-css(background-image: /url/) is exactly the kind of stuff I was looking for in Request 1 but which I somehow failed to see and try out.

@uBlock-user uBlock-user added the duplicate This issue or pull request already exists label May 11, 2019
@uBlock-user
Copy link
Contributor

uBlock-user commented May 11, 2019

Duplicate of #382

@uBlock-user uBlock-user marked this as a duplicate of #382 May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants