Closed Bug 1679452 Opened 4 years ago Closed 4 years ago

Replace :not(X):not(Y) with :not(X, Y)

Categories

(Toolkit :: Themes, task)

task

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: ntim, Assigned: ikartikgautam, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=css])

Attachments

(1 file)

:not(a):not(b):not(c) and :not(a, b, c) are equivalent.

Let's replace them: https://searchfox.org/mozilla-central/search?q=%3Anot%28%5B%5E%5Cs%5C%5C%5D*%29%3Anot%28%5B%5E%5Cs%5C%5C%5D*%29&path=css&case=false&regexp=true

Files to exclude:

  • browser/components/downloads/content/downloads.css (doesn't follow the pattern I showed)
  • browser/components/newtab/content-src/components/DiscoveryStreamComponents/List/_List.scss
  • browser/components/newtab/css/activity-stream-linux.css
  • browser/components/newtab/css/activity-stream-mac.css
  • browser/components/newtab/css/activity-stream-windows.css
  • layout/docs/css-grid-3/Overview.html
  • Test files
Summary: Replace :not(X):not(Y) with :not(X, Y) → Replace :not(X):not(Y) with :not(X,Y)
Summary: Replace :not(X):not(Y) with :not(X,Y) → Replace :not(X):not(Y) with :not(X, Y)
Depends on: 1679463

Hi,

I just check the searchfox link you provided, and noticed that the pattern is like this : :not(a):not(b) ,
so are :not(a):not(b) and :not(a, b) equivalent ?

Thank You,
Kartik Gautam

Flags: needinfo?(ntim.bugs)

(In reply to Kartik Gautam from comment #1)

Hi,

I just check the searchfox link you provided, and notices that the patter is like this : :not(a):not(b) ,
so are :not(a):not(b) and :not(a, b) equivalent ?

Yes, this also applies for more than 2 items. Also applies when they're not next to each other (selector:not(a)...not(b) is the same as selector...:not(a, b)).

Note that I've added some more files to ignore to the list.

Btw, I haven't included those in the initial link, but could you please update these as well?

  • devtools/client/shared/components/Tree.js
  • devtools/client/shared/focus.js
  • toolkit/components/passwordmgr/NewPasswordModel.jsm
  • devtools/client/framework/test/browser_toolbox_options_multiple_tabs.js

Thanks!

Flags: needinfo?(ntim.bugs)

(In reply to Tim Nguyen :ntim from comment #2)

(In reply to Kartik Gautam from comment #1)

Hi,

I just check the searchfox link you provided, and notices that the patter is like this : :not(a):not(b) ,
so are :not(a):not(b) and :not(a, b) equivalent ?

Yes, this also applies for more than 2 items. Also applies when they're not next to each other (selector:not(a)...not(b) is the same as selector...:not(a, b)).

Note that I've added some more files to ignore to the list.

Btw, I haven't included those in the initial link, but could you please update these as well?

  • devtools/client/shared/components/Tree.js
  • devtools/client/shared/focus.js
  • toolkit/components/passwordmgr/NewPasswordModel.jsm
  • devtools/client/framework/test/browser_toolbox_options_multiple_tabs.js

Thanks!

okay sir, please assign it to me, i will take this up.
Thank you again

Assignee: nobody → ikartikgautam
Depends on: 1677247
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1d559a068da1
Replace :not(X):not(Y) with :not(X, Y) r=ntim
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Regressions: 1685628
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: