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

Merge CSS Companion Filters & CSS Style Modifying Filters? #231

Closed
RedDragonWebDesign opened this issue Jul 13, 2020 · 2 comments
Closed

Comments

@RedDragonWebDesign
Copy link
Contributor

RedDragonWebDesign commented Jul 13, 2020

If I understand these two lists correctly, they both work to un-float things. CSS Style Modifying Filters appears to be for action operators (:style) only, CSS Companion Filters appears to be for selectors (##) only.

I would like to throw the idea out there of merging them together into a list named unfloat, nofloat, float, or something like that.

The reason I think it might be a good idea to combine them, is I was writing filters the other day, and a couple of times I was in a situation where I was un-floating something, and I had to write multiple filters and split them between these two lists. For organization, it might make more sense to keep them grouped closely together, instead of across files. Example:

! these two go together. The the second one un-floats the toolbar, the first one gets rid of some whitespace that is caused by un-floating the toolbar
adguard.com##div[style="position: relative; width: 1519.2px; height: 50.8px; display: block; vertical-align: baseline; float: none;"]
adguard.com##.p-navSticky:style(position: relative !important;)

Also, if I am correct about both of these lists un-floating things, the new name would be clearer to folks working on the project.

@yourduskquibbles
Copy link
Owner

You are correct about the two lists.

One historical note, the CSS Companion list was created some number of months AFTER I had created the CSS Modifying list to put filters in that are only required because of the CSS Modifications List. When I setup the initial sublists, my original idea was that the CSS Modifying list would ONLY have filters with the :style(foo: bar !important;) syntax so originally those companion filters were placed in the ultralist.txt but I realized after some amount of time that anyone who was subscribing to only the CSS Modification list wouldn't have the appropriate companion filters loaded if they didn't subscribe to the main ultralist.txt so I created the companion list and loaded it as a dependent sublist of the CSS Modifying list. but I think at this point its an unnecessary legacy of when I originally created sublists and could be updated like you suggest.

TL;DR: You're right and it is probably unnecessarily cumbersome to have the CSS Companion filters as its own sublist vs just merging them into the CSS Modifying filters list and dropping my thought about only having filters with the :style(foo: bar !important;) syntax in the CSS Modifying filters list.

@yourduskquibbles
Copy link
Owner

@GeneralKenobi1 Thanks for the suggestion! I have updated the sublists structure and merged the css_style_filters.txt and css_companion_filters.txt into the new sublist floating_filters.txt.

I am hoping this doesn't break any users workflows or dependencies or create any issues for users who are only subscribed to the css_style_filters.txt sublist as I've included a !redirect and !#include floating_filters.txt sublist directive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants