From c98d942de7f539c3c3a7be110ac0700ea1c37ec0 Mon Sep 17 00:00:00 2001 From: Federico Date: Tue, 16 Jul 2024 15:07:16 +0700 Subject: [PATCH 1/3] Meta: Nested CSS selectors --- source/features/clean-repo-sidebar.css | 76 +++++++++++++------------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/source/features/clean-repo-sidebar.css b/source/features/clean-repo-sidebar.css index c047d61fec74..ea7d56eb6822 100644 --- a/source/features/clean-repo-sidebar.css +++ b/source/features/clean-repo-sidebar.css @@ -1,51 +1,49 @@ -/* Hide "About" header */ -[rgh-clean-repo-sidebar] .Layout-sidebar .BorderGrid-row:first-child h2 { - display: none; -} +[rgh-clean-repo-sidebar] .Layout-sidebar { + /* Hide "About" header */ + .BorderGrid-row:first-child h2 { + display: none; + } -/* Hide "Packages" if empty */ -[rgh-clean-repo-sidebar] + /* Hide "Packages" if empty */ .BorderGrid-row:has(a[href*='/packages?repo_name'] .Counter[title='0']) { - display: none; -} - -/* Align the top of the repo root sidebar with the main page content */ -[rgh-clean-repo-sidebar] .Layout-sidebar .BorderGrid-row:first-child h2 + p.f4 { - margin-top: 0 !important; -} + display: none; + } -/* Hide "Readme" link made unnecessary by `toggle-files-button` #3580 */ -[rgh-clean-repo-sidebar] .Layout-sidebar [href$='#readme'] { - display: none; -} + /* Align the top of the repo root sidebar with the main page content */ + .BorderGrid-row:first-child h2 + p.f4 { + margin-top: 0 !important; + } -@media (min-width: 768px) { - /* Hide "Releases" header */ - [rgh-clean-repo-sidebar] .Layout-sidebar h2 [href$='/releases'] { + /* Hide "Readme" link made unnecessary by `toggle-files-button` #3580 */ + [href$='#readme'] { display: none; } + @media (min-width: 768px) { + /* Hide "Releases" header */ + h2 [href$='/releases'] { + display: none; + } - /* Align data section with latest tag/release link #5428 */ - [rgh-clean-repo-sidebar] .Layout-sidebar .Link--muted .octicon { - margin-right: 4px !important; + /* Align data section with latest tag/release link #5428 */ + .Link--muted .octicon { + margin-right: 4px !important; + } } -} -/* - * Hide "+ 65 releases" link - * Hide "Learn more about GitHub Sponsors" link - * Hide "+ 123 contributors" link - */ -[rgh-clean-repo-sidebar] .Layout-sidebar .BorderGrid-cell > .mt-3 { - display: none; -} + /* + Hide "+ 65 releases" link + Hide "Learn more about GitHub Sponsors" link + Hide "+ 123 contributors" link + */ + .BorderGrid-cell > .mt-3 { + display: none; + } -/* Hide Code of conduct links */ -[rgh-clean-repo-sidebar] - .Layout-sidebar + /* Hide Code of conduct links */ .Link--muted:is( - [href$='/code-of-conduct.md' i], - [href$='/code_of_conduct.md' i] - ) { - display: none; + [href$='/code-of-conduct.md' i], + [href$='/code_of_conduct.md' i] + ) { + display: none; + } } From 5166399486fc8449575a0f774f972d09edd53de1 Mon Sep 17 00:00:00 2001 From: Federico Date: Tue, 16 Jul 2024 15:13:15 +0700 Subject: [PATCH 2/3] /2 --- source/features/align-issue-labels.css | 68 +++++---- source/features/clean-pinned-issues.css | 103 ++++++------- source/features/dim-bots.css | 40 ++--- .../hide-navigation-hover-highlight.css | 20 +-- source/features/mobile-tabs.css | 142 +++++++++--------- .../no-unnecessary-split-diff-view.css | 70 ++++----- source/features/scrollable-areas.css | 27 ++-- 7 files changed, 241 insertions(+), 229 deletions(-) diff --git a/source/features/align-issue-labels.css b/source/features/align-issue-labels.css index 4ff82bf0cf3a..c65b4a2d29db 100644 --- a/source/features/align-issue-labels.css +++ b/source/features/align-issue-labels.css @@ -1,36 +1,38 @@ -/* Move labels in the Issue/PR list below the title */ -[rgh-align-issue-labels] .js-issue-row .min-width-0 { - display: flex; - flex-wrap: wrap; -} - -/* Labels */ -[rgh-align-issue-labels] .js-issue-row .min-width-0 > .lh-default { - order: 1; -} - -[rgh-align-issue-labels] .js-issue-row .min-width-0 .text-small { - flex-basis: 100%; /* #4949 */ -} - -/* Build status */ -[rgh-align-issue-labels] .js-issue-row .commit-build-statuses { - margin-left: 4px; -} - -/* Issue details line */ -[rgh-align-issue-labels] .js-issue-row .mt-1.text-small.color-fg-muted { - flex-basis: 100%; -} - -/* Title */ -[rgh-align-issue-labels] .js-issue-row .h4 { - max-width: 100%; /* #1518 */ -} - -[rgh-align-issue-labels] .js-issue-row .IssueLabel { - margin-top: 4px; - font-size: 11px !important; +[rgh-align-issue-labels] .js-issue-row { + /* Move labels in the Issue/PR list below the title */ + .min-width-0 { + display: flex; + flex-wrap: wrap; + } + + /* Labels */ + .min-width-0 > .lh-default { + order: 1; + } + + .min-width-0 .text-small { + flex-basis: 100%; /* #4949 */ + } + + /* Build status */ + .commit-build-statuses { + margin-left: 4px; + } + + /* Issue details line */ + .mt-1.text-small.color-fg-muted { + flex-basis: 100%; + } + + /* Title */ + .h4 { + max-width: 100%; /* #1518 */ + } + + .IssueLabel { + margin-top: 4px; + font-size: 11px !important; + } } /* diff --git a/source/features/clean-pinned-issues.css b/source/features/clean-pinned-issues.css index 431d0dca2b2e..30fcb83e5557 100644 --- a/source/features/clean-pinned-issues.css +++ b/source/features/clean-pinned-issues.css @@ -1,58 +1,59 @@ -/* Changes the layout of pinned issues from side-by-side to a standard list. */ -[rgh-clean-pinned-issues] .js-pinned-issues-reorder-container .f4 { - display: none !important; /* Hide title */ -} - -[rgh-clean-pinned-issues] .js-pinned-issues-reorder-list { - gap: 16px; -} - -[rgh-clean-pinned-issues] .pinned-issue-item { - width: auto !important; - flex: 1; - margin-inline: 0 !important; -} - -@media (min-width: 700px) { - [rgh-clean-pinned-issues] .js-pinned-issues-reorder-list { - display: table !important; - width: 100%; - margin: 0; - margin-bottom: 20px; - - /* Rounded table border https://stackoverflow.com/a/2586780/288906 */ - box-shadow: 0 0 0 2px var(--rgh-border-color); - border-collapse: collapse; - border-radius: 6px; - border-style: hidden; +[rgh-clean-pinned-issues] { + /* Changes the layout of pinned issues from side-by-side to a standard list. */ + .js-pinned-issues-reorder-container .f4 { + display: none !important; /* Hide title */ } - [rgh-clean-pinned-issues] .pinned-issue-item { - display: table-row !important; - border-color: var(--rgh-border-color) !important; + .js-pinned-issues-reorder-list { + gap: 16px; } - [rgh-clean-pinned-issues] .pinned-issue-item > * { - display: table-cell !important; - padding: 6px 12px; - vertical-align: middle; - white-space: nowrap; + .pinned-issue-item { + width: auto !important; + flex: 1; + margin-inline: 0 !important; } - - /* Move `x` before the title and align both icons */ - [rgh-clean-pinned-issues] .pinned-issue-item > :first-child { - display: flex !important; - white-space: normal; /* Restore wrapping on title */ - } - - [rgh-clean-pinned-issues] .pinned-issue-handle { - order: -1; - margin-top: -2px; - } - - [rgh-clean-pinned-issues] .pinned-issue-item form button { - float: unset !important; - margin-left: -10px; - margin-right: 2px !important; + @media (min-width: 700px) { + .js-pinned-issues-reorder-list { + display: table !important; + width: 100%; + margin: 0; + margin-bottom: 20px; + + /* Rounded table border https://stackoverflow.com/a/2586780/288906 */ + box-shadow: 0 0 0 2px var(--rgh-border-color); + border-collapse: collapse; + border-radius: 6px; + border-style: hidden; + } + + .pinned-issue-item { + display: table-row !important; + border-color: var(--rgh-border-color) !important; + } + + .pinned-issue-item > * { + display: table-cell !important; + padding: 6px 12px; + vertical-align: middle; + white-space: nowrap; + } + + /* Move `x` before the title and align both icons */ + .pinned-issue-item > :first-child { + display: flex !important; + white-space: normal; /* Restore wrapping on title */ + } + + .pinned-issue-handle { + order: -1; + margin-top: -2px; + } + + .pinned-issue-item form button { + float: unset !important; + margin-left: -10px; + margin-right: 2px !important; + } } } diff --git a/source/features/dim-bots.css b/source/features/dim-bots.css index 0ee4a4536e45..a28cf5dacd3b 100644 --- a/source/features/dim-bots.css +++ b/source/features/dim-bots.css @@ -1,23 +1,27 @@ -.rgh-dim-bots > *, -.rgh-dim-bots .Box-row--drag-hide { - transition: 100ms opacity; /* Match `mark-merge-commits-in-list` */ -} +.rgh-dim-bots { + & > *, + & .Box-row--drag-hide { + transition: 100ms opacity; /* Match `mark-merge-commits-in-list` */ + } -/* Commit titles, dim */ -.rgh-dim-bots:not(.rgh-tagged, :hover) > *, + /* Commit titles, dim */ + &:not(.rgh-tagged, :hover) > *, /* PR row, dim */ -.rgh-dim-bots:not(.rgh-tagged, :hover) .Box-row--drag-hide { - opacity: 50%; /* Match `mark-merge-commits-in-list` */ -} +&:not(.rgh-tagged, :hover) .Box-row--drag-hide { + opacity: 50%; /* Match `mark-merge-commits-in-list` */ + } -/* Reset commit title spacing */ -.rgh-dim-bots:not(.rgh-tagged, .rgh-interacted) .min-width-0 .mb-1 { - margin-bottom: 0 !important; -} + &:not(.rgh-tagged, .rgh-interacted) { + /* Reset commit title spacing */ + .min-width-0 .mb-1 { + margin-bottom: 0 !important; + } -.rgh-dim-bots:not(.rgh-tagged, .rgh-interacted) .mb-1 ~ *, /* Commit metadata */ -.rgh-dim-bots:not(.rgh-tagged, .rgh-interacted) .dropdown-signed-commit, /* Commit verified label */ -.rgh-dim-bots:not(.rgh-tagged, .rgh-interacted) .flex-shrink-0 .BtnGroup, /* Commit buttons on side */ -.rgh-dim-bots:not(.rgh-tagged, .rgh-interacted) .min-width-0 > :is(.d-block, .d-flex) /* PR */ { - display: none !important; + .mb-1 ~ *, /* Commit metadata */ + .dropdown-signed-commit, /* Commit verified label */ + .flex-shrink-0 .BtnGroup, /* Commit buttons on side */ + .min-width-0 > :is(.d-block, .d-flex) /* PR */ { + display: none !important; + } + } } diff --git a/source/features/hide-navigation-hover-highlight.css b/source/features/hide-navigation-hover-highlight.css index 1b690b0c5990..a6154518d375 100644 --- a/source/features/hide-navigation-hover-highlight.css +++ b/source/features/hide-navigation-hover-highlight.css @@ -1,11 +1,13 @@ -[rgh-no-navigation-highlight] .Box-row.navigation-focus, /* Issue list */ -[rgh-no-navigation-highlight] .react-directory-row:hover, /* React file list */ -[rgh-no-navigation-highlight] .navigation-focus td /* File list */ { - background: none !important; -} +[rgh-no-navigation-highlight] { + .Box-row.navigation-focus, /* Issue list */ +.react-directory-row:hover, /* React file list */ +.navigation-focus td /* File list */ { + background: none !important; + } -/* Notifications list */ -[rgh-no-navigation-highlight] .notifications-list-item:hover { - background: none !important; - box-shadow: none !important; + /* Notifications list */ + .notifications-list-item:hover { + background: none !important; + box-shadow: none !important; + } } diff --git a/source/features/mobile-tabs.css b/source/features/mobile-tabs.css index 8cfc00acf612..5b9d7ff17ae9 100644 --- a/source/features/mobile-tabs.css +++ b/source/features/mobile-tabs.css @@ -1,85 +1,87 @@ -@media (max-width: 767px) { - [rgh-mobile-tabs]:root .AppHeader-localBar { - padding: 0; - } +[rgh-mobile-tabs] { + @media (max-width: 767px) { + &:root .AppHeader-localBar { + padding: 0; + } - [rgh-mobile-tabs] .UnderlineNav { - padding-inline: var(--base-size-16, 16px); - padding-block: 5px var(--control-medium-gap, 8px); - } + .UnderlineNav { + padding-inline: var(--base-size-16, 16px); + padding-block: 5px var(--control-medium-gap, 8px); + } - [rgh-mobile-tabs] .UnderlineNav-body { - align-items: stretch; /* Ensure they have the same height */ - } + .UnderlineNav-body { + align-items: stretch; /* Ensure they have the same height */ + } - [rgh-mobile-tabs] .UnderlineNav-body > li { - flex-shrink: 0; - flex-basis: 0; - } + .UnderlineNav-body > li { + flex-shrink: 0; + flex-basis: 0; + } - [rgh-mobile-tabs] .UnderlineNav-item { - display: flex; - justify-content: center; - flex-flow: row wrap; - padding: 5px; - flex-basis: 0; - background: var( - --control-transparent-bgColor-hover, - var(--color-action-list-item-default-hover-bg) - ); - } + .UnderlineNav-item { + display: flex; + justify-content: center; + flex-flow: row wrap; + padding: 5px; + flex-basis: 0; + background: var( + --control-transparent-bgColor-hover, + var(--color-action-list-item-default-hover-bg) + ); + } - [rgh-mobile-tabs] .UnderlineNav-item:hover { - background: var( - --control-transparent-bgColor-hover, - var(--color-action-list-item-default-active-bg) - ); /* From: Counter background color */ - } + .UnderlineNav-item:hover { + background: var( + --control-transparent-bgColor-hover, + var(--color-action-list-item-default-active-bg) + ); /* From: Counter background color */ + } - [rgh-mobile-tabs] .UnderlineNav-item.selected::after { - /* Reposition the orange line */ - bottom: -9px !important; - } + .UnderlineNav-item.selected::after { + /* Reposition the orange line */ + bottom: -9px !important; + } - [rgh-mobile-tabs] .UnderlineNav-item [data-content] { - order: 2; - flex-basis: 100%; - line-height: 1; - margin-top: 5px; + .UnderlineNav-item [data-content] { + order: 2; + flex-basis: 100%; + line-height: 1; + margin-top: 5px; - /* Ensure that there's at least 10px padding, which is usually granted by the empty grid columns */ - padding-inline: 10px; + /* Ensure that there's at least 10px padding, which is usually granted by the empty grid columns */ + padding-inline: 10px; - /* font-size: 0; */ - /* Safari 16.4 color bug #6473 */ - font-size: 0.6px; - color: transparent !important; - } + /* font-size: 0; */ + /* Safari 16.4 color bug #6473 */ + font-size: 0.6px; + color: transparent !important; + } - [rgh-mobile-tabs] .UnderlineNav-item [data-content]::before { - visibility: inherit; - height: auto; - font-size: 10px; - color: var(--fgColor-default, var(--color-fg-default)); - font-weight: inherit; - } + .UnderlineNav-item [data-content]::before { + visibility: inherit; + height: auto; + font-size: 10px; + color: var(--fgColor-default, var(--color-fg-default)); + font-weight: inherit; + } - [rgh-mobile-tabs] [data-content='Pull requests']::before { - content: 'Pulls' !important; - } + [data-content='Pull requests']::before { + content: 'Pulls' !important; + } - [rgh-mobile-tabs] .UnderlineNav-item svg { - margin-right: 0 !important; - grid-area: icon; - justify-self: center; /* Improve centering if there's no counter */ - } + .UnderlineNav-item svg { + margin-right: 0 !important; + grid-area: icon; + justify-self: center; /* Improve centering if there's no counter */ + } - [rgh-mobile-tabs] .UnderlineNav-item .Counter { - grid-area: counter; - background: none; /* Counters appears as pills */ - min-width: 0; /* Pills have a min-width we don't need */ - padding: 0; /* Pills have padding */ - text-align: left; /* Pills have centered text */ - margin-left: 5px; + .UnderlineNav-item .Counter { + grid-area: counter; + background: none; /* Counters appears as pills */ + min-width: 0; /* Pills have a min-width we don't need */ + padding: 0; /* Pills have padding */ + text-align: left; /* Pills have centered text */ + margin-left: 5px; + } } } diff --git a/source/features/no-unnecessary-split-diff-view.css b/source/features/no-unnecessary-split-diff-view.css index fcfda566842d..4a225bcaf961 100644 --- a/source/features/no-unnecessary-split-diff-view.css +++ b/source/features/no-unnecessary-split-diff-view.css @@ -1,41 +1,43 @@ -/* The selector looks for diff tables WITHOUT changes on the left XOR on the right */ -/* Instead of duplicating this selector for each rule, we set a variable and pick it up where needed */ -[rgh-no-unnecessary-split-diff-view] +[rgh-no-unnecessary-split-diff-view] { + /* The selector looks for diff tables WITHOUT changes on the left XOR on the right */ + /* Instead of duplicating this selector for each rule, we set a variable and pick it up where needed */ + .js-diff-table:has([data-split-side]):not( - :has([data-split-side='left']:is(.blob-code-addition, .blob-code-deletion)) - ) { - --rgh-only-additions: none; - table-layout: auto !important; -} + :has( + [data-split-side='left']:is(.blob-code-addition, .blob-code-deletion) + ) + ) { + --rgh-only-additions: none; + table-layout: auto !important; + } -[rgh-no-unnecessary-split-diff-view] .js-diff-table:has([data-split-side]):not( - :has([data-split-side='right']:is(.blob-code-addition, .blob-code-deletion)) - ) { - --rgh-only-deletions: none; - table-layout: auto !important; -} + :has( + [data-split-side='right']:is(.blob-code-addition, .blob-code-deletion) + ) + ) { + --rgh-only-deletions: none; + table-layout: auto !important; + } -/* Only additions: Hide the left side */ -[rgh-no-unnecessary-split-diff-view] - :is([data-hunk], .blob-expanded) - td:nth-child(2) { - display: var(--rgh-only-additions, table-cell) !important; -} + /* Only additions: Hide the left side */ -/* Only deletions: Hide the right side */ -[rgh-no-unnecessary-split-diff-view] - :is([data-hunk], .blob-expanded) - td:nth-child(4) { - display: var(--rgh-only-deletions, table-cell) !important; -} + :is([data-hunk], .blob-expanded) td:nth-child(2) { + display: var(--rgh-only-additions, table-cell) !important; + } + + /* Only deletions: Hide the right side */ + + :is([data-hunk], .blob-expanded) td:nth-child(4) { + display: var(--rgh-only-deletions, table-cell) !important; + } + + /* Any applicable situation: Re-align annotations */ -/* Any applicable situation: Re-align annotations */ -[rgh-no-unnecessary-split-diff-view] - :is(.inline-comments, .js-inline-annotations) - .empty-cell:not(.blob-num) { - display: var( - --rgh-only-additions, - var(--rgh-only-deletions, table-cell) - ) !important; + :is(.inline-comments, .js-inline-annotations) .empty-cell:not(.blob-num) { + display: var( + --rgh-only-additions, + var(--rgh-only-deletions, table-cell) + ) !important; + } } diff --git a/source/features/scrollable-areas.css b/source/features/scrollable-areas.css index e6c112d60079..8b7fdcc2398d 100644 --- a/source/features/scrollable-areas.css +++ b/source/features/scrollable-areas.css @@ -1,17 +1,16 @@ -[rgh-scrollable-areas] .comment-body :is(blockquote, pre) { - position: relative; /* OctoLinker compat: attach the purple balls to the scroll */ - max-height: 30.5em; - overflow-y: auto; -} +[rgh-scrollable-areas] { + .comment-body :is(blockquote, pre) { + position: relative; /* OctoLinker compat: attach the purple balls to the scroll */ + max-height: 30.5em; + overflow-y: auto; + } -/* A tiny scroll bar appears when the last paragraph contains a `code` or `g-emoji` tag #3012 #4597 */ -[rgh-scrollable-areas] .comment-body blockquote { - padding-bottom: 0.2em; /* Do not add to `pre` #5540 */ -} + /* A tiny scroll bar appears when the last paragraph contains a `code` or `g-emoji` tag #3012 #4597 */ + .comment-body blockquote { + padding-bottom: 0.2em; /* Do not add to `pre` #5540 */ + } -[rgh-scrollable-areas] - .comment-body - :is(details, blockquote) - :is(blockquote, pre) { - max-height: none; + .comment-body :is(details, blockquote) :is(blockquote, pre) { + max-height: none; + } } From 6210d1ee10a3a98344a0e00c779501a1e1567674 Mon Sep 17 00:00:00 2001 From: Federico Date: Tue, 16 Jul 2024 15:25:39 +0700 Subject: [PATCH 3/3] Try dprint + malva --- dprint.json | 11 ++ package-lock.json | 134 ++++++++++++++++++ package.json | 1 + .../always-show-branch-delete-buttons.css | 4 +- source/features/center-reactions-popup.css | 3 +- source/features/clean-checks-list.css | 3 +- .../features/clean-conversation-headers.css | 14 +- source/features/clean-conversations.css | 3 +- source/features/clean-notifications.css | 6 +- source/features/clean-repo-sidebar.css | 11 +- source/features/clean-rich-text-editor.css | 8 +- source/features/conflict-marker.css | 4 +- .../features/conversation-activity-filter.css | 12 +- source/features/cross-deleted-pr-branches.css | 4 +- source/features/default-branch-button.css | 2 +- source/features/dim-bots.css | 15 +- source/features/emphasize-draft-pr-label.css | 12 +- source/features/extend-diff-expander.css | 6 +- source/features/github-bugs.css | 21 ++- .../hidden-review-comments-indicator.css | 2 +- source/features/hide-diff-signs.css | 10 +- .../hide-navigation-hover-highlight.css | 6 +- source/features/hide-newsfeed-noise.css | 6 +- source/features/highest-rated-comment.css | 12 +- source/features/mobile-tabs.css | 4 +- source/features/night-not-found.css | 81 +++++------ .../no-unnecessary-split-diff-view.css | 18 +-- source/features/one-click-pr-or-gist.css | 2 +- source/features/pr-approvals-count.css | 8 +- source/features/quick-label-removal.css | 2 +- source/features/rgh-welcome-issue.css | 21 ++- source/features/select-notifications.css | 3 +- .../show-associated-branch-prs-on-fork.css | 2 +- source/features/show-whitespace.css | 26 ++-- .../sticky-conversation-list-toolbar.css | 3 +- source/features/sticky-csv-header.css | 9 +- .../features/sticky-notifications-actions.css | 6 +- source/features/sticky-sidebar.css | 5 +- .../features/suggest-commit-title-limit.css | 12 +- source/features/tab-size.css | 3 +- source/features/table-input.css | 27 +--- .../features/warning-for-disallow-edits.css | 2 +- source/github-helpers/heat-map.css | 20 +-- source/options.css | 38 ++--- source/refined-github.css | 24 ++-- 45 files changed, 363 insertions(+), 263 deletions(-) create mode 100644 dprint.json diff --git a/dprint.json b/dprint.json new file mode 100644 index 000000000000..6271fd583dbb --- /dev/null +++ b/dprint.json @@ -0,0 +1,11 @@ +{ + "malva": { + "useTabs": true + }, + "excludes": [ + "**/node_modules" + ], + "plugins": [ + "https://plugins.dprint.dev/g-plane/malva-v0.5.1.wasm" + ] +} diff --git a/package-lock.json b/package-lock.json index 4397b76b92b5..146dffcd7972 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,6 +64,7 @@ "css-loader": "^7.1.2", "daily-version": "^2.0.0", "dot-json": "^1.3.0", + "dprint": "^0.47.2", "esbuild-loader": "^4.2.0", "eslint-config-xo-react": "^0.27.0", "eslint-plugin-react": "^7.34.1", @@ -239,6 +240,118 @@ "node": ">=10.0.0" } }, + "node_modules/@dprint/darwin-arm64": { + "version": "0.47.2", + "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.47.2.tgz", + "integrity": "sha512-mVPFBJsXxGDKHHCAY8wbqOyS4028g1bN15H9tivCnPAjwaZhkUimZHXWejXADjhGn+Xm2SlakugY9PY/68pH3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@dprint/darwin-x64": { + "version": "0.47.2", + "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.47.2.tgz", + "integrity": "sha512-T7wzlc+rBV+6BRRiBjoqoy5Hj4TR2Nv2p2s9+ycyPGs10Kj/JXOWD8dnEHeBgUr2r4qe/ZdcxmsFQ5Hf2n0WuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@dprint/linux-arm64-glibc": { + "version": "0.47.2", + "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.47.2.tgz", + "integrity": "sha512-B0m1vT5LdVtrNOVdkqpLPrSxuCD+l5bTIgRzPaDoIB1ChWQkler9IlX8C+RStpujjPj6SYvwo5vTzjQSvRdQkA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@dprint/linux-arm64-musl": { + "version": "0.47.2", + "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.47.2.tgz", + "integrity": "sha512-zID6wZZqpg2/Q2Us+ERQkbhLwlW3p3xaeEr00MPf49bpydmEjMiPuSjWPkNv+slQSIyIsVovOxF4lbNZjsdtvw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@dprint/linux-x64-glibc": { + "version": "0.47.2", + "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.47.2.tgz", + "integrity": "sha512-rB3WXMdINnRd33DItIp7mObS7dzHW90ZzeJSsoKJLPp+Z7wXjjb27UUowfqVI4baa/1pd7sdbX54DPohMtfu/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@dprint/linux-x64-musl": { + "version": "0.47.2", + "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.47.2.tgz", + "integrity": "sha512-E0+TNbzYdTXJ/jCVjUctVxkda/faw++aDQLfyWGcmdMJnbM7NZz+W4fUpDXzMPsjy+zTWxXcPK7/q2DZz2gnbg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@dprint/win32-arm64": { + "version": "0.47.2", + "resolved": "https://registry.npmjs.org/@dprint/win32-arm64/-/win32-arm64-0.47.2.tgz", + "integrity": "sha512-K1EieTCFjfOCmyIhw9zFSduE6qVCNHEveupqZEfbSkVGw5T9MJQ1I9+n7MDb3RIDYEUk0enJ58/w82q8oDKCyA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@dprint/win32-x64": { + "version": "0.47.2", + "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.47.2.tgz", + "integrity": "sha512-LhizWr8VrhHvq4ump8HwOERyFmdLiE8C6A42QSntGXzKdaa2nEOq20x/o56ZIiDcesiV+1TmosMKimPcOZHa+Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@dual-bundle/import-meta-resolve": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", @@ -3148,6 +3261,27 @@ "dot-json": "bin/dot-json.js" } }, + "node_modules/dprint": { + "version": "0.47.2", + "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.47.2.tgz", + "integrity": "sha512-geUcVIIrmLaY+YtuOl4gD7J/QCjsXZa5gUqre9sO6cgH0X/Fa9heBN3l/AWVII6rKPw45ATuCSDWz1pyO+HkPQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "dprint": "bin.js" + }, + "optionalDependencies": { + "@dprint/darwin-arm64": "0.47.2", + "@dprint/darwin-x64": "0.47.2", + "@dprint/linux-arm64-glibc": "0.47.2", + "@dprint/linux-arm64-musl": "0.47.2", + "@dprint/linux-x64-glibc": "0.47.2", + "@dprint/linux-x64-musl": "0.47.2", + "@dprint/win32-arm64": "0.47.2", + "@dprint/win32-x64": "0.47.2" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.811", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.811.tgz", diff --git a/package.json b/package.json index c26ddaf56c2a..526d6ef7619d 100644 --- a/package.json +++ b/package.json @@ -102,6 +102,7 @@ "css-loader": "^7.1.2", "daily-version": "^2.0.0", "dot-json": "^1.3.0", + "dprint": "^0.47.2", "esbuild-loader": "^4.2.0", "eslint-config-xo-react": "^0.27.0", "eslint-plugin-react": "^7.34.1", diff --git a/source/features/always-show-branch-delete-buttons.css b/source/features/always-show-branch-delete-buttons.css index e8716ebfb4d8..c1b83eb5c83d 100644 --- a/source/features/always-show-branch-delete-buttons.css +++ b/source/features/always-show-branch-delete-buttons.css @@ -2,8 +2,8 @@ @media (max-width: 1011px) { /* Show "Delete"’s container */ .js-branch-row .d-none.d-md-flex, - /* Show "Delete" unless it's deleted */ - .js-branch-row:not(.Details--on) form.js-branch-destroy { + /* Show "Delete" unless it's deleted */ .js-branch-row:not(.Details--on) + form.js-branch-destroy { display: flex !important; } diff --git a/source/features/center-reactions-popup.css b/source/features/center-reactions-popup.css index 8daee27fc4c4..e267e1c8b5f7 100644 --- a/source/features/center-reactions-popup.css +++ b/source/features/center-reactions-popup.css @@ -1,7 +1,8 @@ /* Restore two-line layout */ :root .dropdown-menu-reactions { display: grid !important; - grid-template-rows: 1fr 1fr; /* Keep two lines whether there are 6 or 8 reactions */ + grid-template-rows: + 1fr 1fr; /* Keep two lines whether there are 6 or 8 reactions */ grid-auto-flow: column; } diff --git a/source/features/clean-checks-list.css b/source/features/clean-checks-list.css index 6ebd37cf1a2f..f3d6fd44d7f8 100644 --- a/source/features/clean-checks-list.css +++ b/source/features/clean-checks-list.css @@ -23,7 +23,8 @@ } /* Dim successful/skipped/neutral checks */ -.merge-status-list:has(.octicon-x, .text-italic):not(:hover) /* Only if any checks are failing or in progress */ +.merge-status-list:has(.octicon-x, .text-italic):not(:hover) + /* Only if any checks are failing or in progress */ .merge-status-item:has(.octicon-check, .octicon-skip, .octicon-square-fill) { opacity: 50%; } diff --git a/source/features/clean-conversation-headers.css b/source/features/clean-conversation-headers.css index 65c255148dfa..d8e1f0a5dd89 100644 --- a/source/features/clean-conversation-headers.css +++ b/source/features/clean-conversation-headers.css @@ -26,10 +26,8 @@ } /* Shows on PRs: [by ]octocat main ← feature */ -.rgh-clean-conversation-headers:not( - .rgh-clean-conversation-headers-hide-author - )::before { - content: 'by '; +.rgh-clean-conversation-headers:not(.rgh-clean-conversation-headers-hide-author)::before { + content: "by "; font-size: 14px; } @@ -39,8 +37,12 @@ /* Removes on issues: [octocat] opened this issue on 1 Jan · 1 comments */ /* Removes on PRs: [octocat] merged 1 commit into master from feature */ -.rgh-clean-conversation-headers.rgh-clean-conversation-headers-hide-author .author + .Label, /* #5832 */ -.rgh-clean-conversation-headers.rgh-clean-conversation-headers-hide-author .author { +.rgh-clean-conversation-headers.rgh-clean-conversation-headers-hide-author + .author + + .Label, +/* #5832 */ +.rgh-clean-conversation-headers.rgh-clean-conversation-headers-hide-author + .author { display: none; } diff --git a/source/features/clean-conversations.css b/source/features/clean-conversations.css index 6c11902194d6..02c3ab8a85be 100644 --- a/source/features/clean-conversations.css +++ b/source/features/clean-conversations.css @@ -1,6 +1,5 @@ /* Remove user avatar from new comment form */ -.timeline-new-comment .timeline-comment-avatar, -.review-thread-reply .avatar { +.timeline-new-comment .timeline-comment-avatar, .review-thread-reply .avatar { display: none; } diff --git a/source/features/clean-notifications.css b/source/features/clean-notifications.css index eee193675321..70e91bf0164d 100644 --- a/source/features/clean-notifications.css +++ b/source/features/clean-notifications.css @@ -1,13 +1,13 @@ /* Place conversation number before the title */ -.js-notifications-group [id^='notification'] { +.js-notifications-group [id^="notification"] { flex-direction: row !important; } /* Hide duplicate repository URL */ -.js-notifications-group [id^='notification'] > .d-flex > .f6 { +.js-notifications-group [id^="notification"] > .d-flex > .f6 { font-size: 0 !important; } /* Size and position the conversation number */ -.js-notifications-group [id^='notification'] > .d-flex > .f6 > span { +.js-notifications-group [id^="notification"] > .d-flex > .f6 > span { display: block; font-size: 12px; font-variant-numeric: tabular-nums; diff --git a/source/features/clean-repo-sidebar.css b/source/features/clean-repo-sidebar.css index ea7d56eb6822..bf6795fcdfdb 100644 --- a/source/features/clean-repo-sidebar.css +++ b/source/features/clean-repo-sidebar.css @@ -5,7 +5,7 @@ } /* Hide "Packages" if empty */ - .BorderGrid-row:has(a[href*='/packages?repo_name'] .Counter[title='0']) { + .BorderGrid-row:has(a[href*="/packages?repo_name"] .Counter[title="0"]) { display: none; } @@ -15,12 +15,12 @@ } /* Hide "Readme" link made unnecessary by `toggle-files-button` #3580 */ - [href$='#readme'] { + [href$="#readme"] { display: none; } @media (min-width: 768px) { /* Hide "Releases" header */ - h2 [href$='/releases'] { + h2 [href$="/releases"] { display: none; } @@ -40,10 +40,7 @@ } /* Hide Code of conduct links */ - .Link--muted:is( - [href$='/code-of-conduct.md' i], - [href$='/code_of_conduct.md' i] - ) { + .Link--muted:is([href$="/code-of-conduct.md" i], [href$="/code_of_conduct.md" i]) { display: none; } } diff --git a/source/features/clean-rich-text-editor.css b/source/features/clean-rich-text-editor.css index 5128b7ccde0b..c2000cb66fe2 100644 --- a/source/features/clean-rich-text-editor.css +++ b/source/features/clean-rich-text-editor.css @@ -2,13 +2,7 @@ /* Kinda excludes "soft keyboards" devices https://github.com/w3c/csswg-drafts/issues/3871 */ @media (hover: hover) and (pointer: fine) { [rgh-clean-rich-text-editor] - :is( - [data-md-button='mention'], - [data-md-button='ref'], - [data-md-button='header-3'], - [data-md-button='bold'], - [data-md-button='italic'] - ):not(:focus) { + :is([data-md-button="mention"], [data-md-button="ref"], [data-md-button="header-3"], [data-md-button="bold"], [data-md-button="italic"]):not(:focus) { /* Like GitHub’s `show-on-focus` class. Needed because we target `md-ref` with the observer in `table-input` and `collapsible-content-button` */ position: absolute; width: 1px; diff --git a/source/features/conflict-marker.css b/source/features/conflict-marker.css index 71313b27251c..df5022253680 100644 --- a/source/features/conflict-marker.css +++ b/source/features/conflict-marker.css @@ -1,7 +1,7 @@ -[data-color-mode='light'] .rgh-conflict-marker svg { +[data-color-mode="light"] .rgh-conflict-marker svg { color: #ccc; } -[data-color-mode='dark'] .rgh-conflict-marker svg { +[data-color-mode="dark"] .rgh-conflict-marker svg { color: var(--fgColor-muted, var(--color-fg-muted)); } diff --git a/source/features/conversation-activity-filter.css b/source/features/conversation-activity-filter.css index 29ca77ca9980..e497b59d3298 100644 --- a/source/features/conversation-activity-filter.css +++ b/source/features/conversation-activity-filter.css @@ -1,12 +1,8 @@ .rgh-conversation-events-label, .rgh-conversation-activity-is-filtered .rgh-conversation-activity-filtered, -[data-rgh-conversation-activity-filter='hideEventsAndCollapsedComments'] - :is( - .rgh-conversation-activity-collapsed, - .js-resolvable-timeline-thread-container[data-resolved='true'], - .js-resolvable-timeline-thread-container[data-resolved='false'] - .minimized-comment - ), +[data-rgh-conversation-activity-filter="hideEventsAndCollapsedComments"] + :is(.rgh-conversation-activity-collapsed, .js-resolvable-timeline-thread-container[data-resolved="true"], .js-resolvable-timeline-thread-container[data-resolved="false"] + .minimized-comment), .rgh-conversation-activity-is-filtered .rgh-conversation-activity-filter-dropdown .octicon-eye, @@ -19,7 +15,7 @@ /* outline: solid 5px #f00; */ } -[data-rgh-conversation-activity-filter='hideEvents'] +[data-rgh-conversation-activity-filter="hideEvents"] .rgh-conversation-events-label { display: inline !important; } diff --git a/source/features/cross-deleted-pr-branches.css b/source/features/cross-deleted-pr-branches.css index 5ad3fca28005..a4c7d7d65dcd 100644 --- a/source/features/cross-deleted-pr-branches.css +++ b/source/features/cross-deleted-pr-branches.css @@ -1,4 +1,4 @@ -.commit-ref[title$='has been deleted'], -.commit-ref[title$='has been deleted'] * { +.commit-ref[title$="has been deleted"], +.commit-ref[title$="has been deleted"] * { text-decoration: line-through !important; } diff --git a/source/features/default-branch-button.css b/source/features/default-branch-button.css index 3a3f4bedf1af..4f2c5c8b2e77 100644 --- a/source/features/default-branch-button.css +++ b/source/features/default-branch-button.css @@ -1,4 +1,4 @@ /* Reduce excessive width on long branch names, this is also a GitHub bug */ -.rgh-default-branch-button-group [data-component='text'] { +.rgh-default-branch-button-group [data-component="text"] { max-width: 80px; } diff --git a/source/features/dim-bots.css b/source/features/dim-bots.css index a28cf5dacd3b..c3f364d57022 100644 --- a/source/features/dim-bots.css +++ b/source/features/dim-bots.css @@ -1,13 +1,11 @@ .rgh-dim-bots { - & > *, - & .Box-row--drag-hide { + & > *, & .Box-row--drag-hide { transition: 100ms opacity; /* Match `mark-merge-commits-in-list` */ } /* Commit titles, dim */ &:not(.rgh-tagged, :hover) > *, -/* PR row, dim */ -&:not(.rgh-tagged, :hover) .Box-row--drag-hide { + /* PR row, dim */ &:not(.rgh-tagged, :hover) .Box-row--drag-hide { opacity: 50%; /* Match `mark-merge-commits-in-list` */ } @@ -17,10 +15,11 @@ margin-bottom: 0 !important; } - .mb-1 ~ *, /* Commit metadata */ - .dropdown-signed-commit, /* Commit verified label */ - .flex-shrink-0 .BtnGroup, /* Commit buttons on side */ - .min-width-0 > :is(.d-block, .d-flex) /* PR */ { + .mb-1 ~ *, + /* Commit metadata */ .dropdown-signed-commit, + /* Commit verified label */ .flex-shrink-0 .BtnGroup, + /* Commit buttons on side */ .min-width-0 > :is(.d-block, .d-flex) /* PR */ + { display: none !important; } } diff --git a/source/features/emphasize-draft-pr-label.css b/source/features/emphasize-draft-pr-label.css index 3f71b59fbdd7..f3173774c878 100644 --- a/source/features/emphasize-draft-pr-label.css +++ b/source/features/emphasize-draft-pr-label.css @@ -2,12 +2,12 @@ /* stylelint-disable-next-line media-feature-name-no-vendor-prefix -- It's the only cross-browser media query */ @media (-webkit-min-device-pixel-ratio: 2) { - [rgh-emphasize-draft-pr-label] .js-issue-row :is( - /* Repo PR lists */ - [aria-label='Open draft pull request'], - /* Global PR lists */ - [aria-label='Draft Pull Request'] -) svg { + [rgh-emphasize-draft-pr-label] + .js-issue-row + :is(/* Repo PR lists */ + [aria-label="Open draft pull request"], /* Global PR lists */ + [aria-label="Draft Pull Request"]) + svg { stroke: var(--fgColor-muted, var(--color-fg-muted)); stroke-width: 1.2px; color: var(--rgh-background) !important; diff --git a/source/features/extend-diff-expander.css b/source/features/extend-diff-expander.css index 2d72c37858f5..1e4f194d841b 100644 --- a/source/features/extend-diff-expander.css +++ b/source/features/extend-diff-expander.css @@ -1,10 +1,8 @@ /* Hovering the line will highlight the first direction button, unless you hover the buttons directly */ .rgh-extend-diff-expander .js-expandable-line:hover - :is( - .blob-num:not(:hover) .directional-expander:first-child, - .blob-num:not(:hover) + .blob-code - ) { + :is(.blob-num:not(:hover) + .directional-expander:first-child, .blob-num:not(:hover) + .blob-code) { color: var( --control-checked-fgColor-rest, var(--color-state-hover-primary-text, #fff) diff --git a/source/features/github-bugs.css b/source/features/github-bugs.css index 21e444e16f77..9ddd441d0203 100644 --- a/source/features/github-bugs.css +++ b/source/features/github-bugs.css @@ -1,6 +1,9 @@ /* Style backticked code in links #4817, matches GitHub’s `.markdown-title code` rule */ -.js-commits-list-item code, /* `isCommitList` commit message */ -.Box-header .commit-author + span code /* `isRepoTree` commit message */ { +.js-commits-list-item code, +/* `isCommitList` commit message */ .Box-header + .commit-author + + span + code /* `isRepoTree` commit message */ { padding: 2px 4px; background-color: var(--bgColor-neutral-muted, var(--color-neutral-muted)); font-size: 0.9em; @@ -14,8 +17,14 @@ /* Monospace textareas for new SSH/GPG keys #4917 */ :is(.new_public_key, .new_gpg_key) textarea { /* Same as GitHub style for `code` */ - font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, - 'Liberation Mono', monospace !important; + font-family: + ui-monospace, + SFMono-Regular, + "SF Mono", + Menlo, + Consolas, + "Liberation Mono", + monospace !important; } /* Limit width of comment form on commit pages #5032 */ @@ -35,7 +44,7 @@ /* Align icons in the release search field #6506 */ /* Test: https://github.com/refined-github/refined-github/releases */ -[action$='/releases'] .subnav-search-icon { +[action$="/releases"] .subnav-search-icon { margin-top: -1px; } @@ -44,7 +53,7 @@ } /* Add margin to release download icon #6510 */ -.Box-row :is(.octicon-package, .octicon-file-zip):has(+ a[rel='nofollow']) { +.Box-row :is(.octicon-package, .octicon-file-zip):has(+ a[rel="nofollow"]) { margin-right: 4px; } diff --git a/source/features/hidden-review-comments-indicator.css b/source/features/hidden-review-comments-indicator.css index fd375ecb4cd4..72643ab837e7 100644 --- a/source/features/hidden-review-comments-indicator.css +++ b/source/features/hidden-review-comments-indicator.css @@ -7,7 +7,7 @@ } .rgh-comments-indicator:is(::before, ::after) { - content: '' !important; /* Needs to override .blob-num’s */ + content: "" !important; /* Needs to override .blob-num’s */ position: absolute; top: -1px; left: 0; diff --git a/source/features/hide-diff-signs.css b/source/features/hide-diff-signs.css index b05cc4bc589f..a9fd2fc25aae 100644 --- a/source/features/hide-diff-signs.css +++ b/source/features/hide-diff-signs.css @@ -1,10 +1,8 @@ [rgh-hide-diff-signs] - :is( - .diff-text-cell - .diff-text, /* Edit page, probably upcoming DOM everywhere */ - .blob-code-inner,/* Inline review blocks in PRs */ - .blob-code-marker-cell/* Commit page */ - )::before { + :is(.diff-text-cell + .diff-text, /* Edit page, probably upcoming DOM everywhere */ +.blob-code-inner, /* Inline review blocks in PRs */ .blob-code-marker-cell +/* Commit page */)::before { visibility: hidden; } diff --git a/source/features/hide-navigation-hover-highlight.css b/source/features/hide-navigation-hover-highlight.css index a6154518d375..6ab5a274996d 100644 --- a/source/features/hide-navigation-hover-highlight.css +++ b/source/features/hide-navigation-hover-highlight.css @@ -1,7 +1,7 @@ [rgh-no-navigation-highlight] { - .Box-row.navigation-focus, /* Issue list */ -.react-directory-row:hover, /* React file list */ -.navigation-focus td /* File list */ { + .Box-row.navigation-focus, + /* Issue list */ .react-directory-row:hover, + /* React file list */ .navigation-focus td /* File list */ { background: none !important; } diff --git a/source/features/hide-newsfeed-noise.css b/source/features/hide-newsfeed-noise.css index 5444c6e09f49..f5a063f1dfbb 100644 --- a/source/features/hide-newsfeed-noise.css +++ b/source/features/hide-newsfeed-noise.css @@ -16,10 +16,6 @@ edited a gollum (wiki) } [rgh-hide-newsfeed-noise] - .body:has( - [data-hydro-click*='"type":"PushEvent"'], - [data-hydro-click*='"type":"FollowEvent"'], - [data-hydro-click*='"type":"ReleaseEvent"'] - ) { + .body:has([data-hydro-click*="\"type\":\"PushEvent\""], [data-hydro-click*="\"type\":\"FollowEvent\""], [data-hydro-click*="\"type\":\"ReleaseEvent\""]) { display: none !important; } diff --git a/source/features/highest-rated-comment.css b/source/features/highest-rated-comment.css index bbf55c0812c3..ced5d6d2f438 100644 --- a/source/features/highest-rated-comment.css +++ b/source/features/highest-rated-comment.css @@ -1,7 +1,9 @@ .rgh-highest-rated-comment.timeline-comment { /* Same as GitHub's `.timeline-chosen-answer` */ - border: 2px solid - var(--borderColor-success-emphasis, var(--color-success-emphasis)); + border: 2px solid var( + --borderColor-success-emphasis, + var(--color-success-emphasis) + ); } .rgh-highest-rated-comment.timeline-comment--caret::before { @@ -12,8 +14,10 @@ } a.rgh-highest-rated-comment { - border: 2px solid - var(--borderColor-success-emphasis, var(--color-success-emphasis)) !important; + border: 2px solid var( + --borderColor-success-emphasis, + var(--color-success-emphasis) + ) !important; } a.rgh-highest-rated-comment .avatar { diff --git a/source/features/mobile-tabs.css b/source/features/mobile-tabs.css index 5b9d7ff17ae9..591c67fcc495 100644 --- a/source/features/mobile-tabs.css +++ b/source/features/mobile-tabs.css @@ -65,8 +65,8 @@ font-weight: inherit; } - [data-content='Pull requests']::before { - content: 'Pulls' !important; + [data-content="Pull requests"]::before { + content: "Pulls" !important; } .UnderlineNav-item svg { diff --git a/source/features/night-not-found.css b/source/features/night-not-found.css index c8979e780e40..4cfb9714348a 100644 --- a/source/features/night-not-found.css +++ b/source/features/night-not-found.css @@ -1,124 +1,117 @@ /* Brighten Octocat on hover 1/2 */ -.js-plaxify[height='230'] { - transition: - transform 0.1s, - filter 1s; +.js-plaxify[height="230"] { + transition: transform 0.1s, filter 1s; } /* These are 2 exact copies: one for always-dark mode and the other one for auto mode */ -[data-color-mode='dark'] .js-plaxify[height='249'] { +[data-color-mode="dark"] .js-plaxify[height="249"] { filter: invert(); } -[data-color-mode='dark'] .js-plaxify[height='230'] { +[data-color-mode="dark"] .js-plaxify[height="230"] { filter: brightness(0.7) saturate(0.5) contrast(1.3); } -[data-color-mode='dark'] .js-plaxify[height='156'] { +[data-color-mode="dark"] .js-plaxify[height="156"] { filter: brightness(0.3) saturate(0.5); } -[data-color-mode='dark'] .js-plaxify[height='49'] { +[data-color-mode="dark"] .js-plaxify[height="49"] { filter: brightness(0.8) saturate(0.5); } -[data-color-mode='dark'] - .js-plaxify:is([height='415'], [height='75'], [height='50']) { +[data-color-mode="dark"] + .js-plaxify:is([height="415"], [height="75"], [height="50"]) { filter: brightness(0.1) saturate(0.5); } -[data-color-mode='dark'] .js-plaxify[height='123'] { +[data-color-mode="dark"] .js-plaxify[height="123"] { filter: brightness(0.15) saturate(0.5); } /* Dark dimmed */ -[data-color-mode='dark'][data-dark-theme='dark_dimmed'] - .js-plaxify[height='249'] { +[data-color-mode="dark"][data-dark-theme="dark_dimmed"] + .js-plaxify[height="249"] { filter: brightness(0.5); } -[data-color-mode='dark'][data-dark-theme='dark_dimmed'] - .js-plaxify[height='230'] { +[data-color-mode="dark"][data-dark-theme="dark_dimmed"] + .js-plaxify[height="230"] { filter: brightness(0.8) saturate(0.5) contrast(1.3); } -[data-color-mode='dark'][data-dark-theme='dark_dimmed'] - .js-plaxify[height='156'] { +[data-color-mode="dark"][data-dark-theme="dark_dimmed"] + .js-plaxify[height="156"] { filter: brightness(0.5) saturate(0.5); } -[data-color-mode='dark'][data-dark-theme='dark_dimmed'] - .js-plaxify[height='49'] { +[data-color-mode="dark"][data-dark-theme="dark_dimmed"] + .js-plaxify[height="49"] { filter: brightness(0.9) saturate(0.5); } -[data-color-mode='dark'][data-dark-theme='dark_dimmed'] - .js-plaxify:is([height='415'], [height='75'], [height='50'], [height='123']) { +[data-color-mode="dark"][data-dark-theme="dark_dimmed"] + .js-plaxify:is([height="415"], [height="75"], [height="50"], [height="123"]) { filter: brightness(0.3) saturate(0.5); } /* Auto mode, dark */ @media (prefers-color-scheme: dark) { /* Dark */ - [data-color-mode='auto'][data-dark-theme='dark'] .js-plaxify[height='249'] { + [data-color-mode="auto"][data-dark-theme="dark"] .js-plaxify[height="249"] { filter: invert(); } - [data-color-mode='auto'][data-dark-theme='dark'] .js-plaxify[height='230'] { + [data-color-mode="auto"][data-dark-theme="dark"] .js-plaxify[height="230"] { filter: brightness(0.6) saturate(0.5) contrast(1.3); } - [data-color-mode='auto'][data-dark-theme='dark'] .js-plaxify[height='156'] { + [data-color-mode="auto"][data-dark-theme="dark"] .js-plaxify[height="156"] { filter: brightness(0.3) saturate(0.5); } - [data-color-mode='auto'][data-dark-theme='dark'] .js-plaxify[height='49'] { + [data-color-mode="auto"][data-dark-theme="dark"] .js-plaxify[height="49"] { filter: brightness(0.9) saturate(0.5); } - [data-color-mode='auto'][data-dark-theme='dark'] - .js-plaxify:is([height='415'], [height='75'], [height='50']) { + [data-color-mode="auto"][data-dark-theme="dark"] + .js-plaxify:is([height="415"], [height="75"], [height="50"]) { filter: brightness(0.1) saturate(0.5); } - [data-color-mode='auto'][data-dark-theme='dark'] .js-plaxify[height='123'] { + [data-color-mode="auto"][data-dark-theme="dark"] .js-plaxify[height="123"] { filter: brightness(0.15) saturate(0.5); } /* Dark dimmed */ - [data-color-mode='auto'][data-dark-theme='dark_dimmed'] - .js-plaxify[height='249'] { + [data-color-mode="auto"][data-dark-theme="dark_dimmed"] + .js-plaxify[height="249"] { filter: brightness(0.5); } - [data-color-mode='auto'][data-dark-theme='dark_dimmed'] - .js-plaxify[height='230'] { + [data-color-mode="auto"][data-dark-theme="dark_dimmed"] + .js-plaxify[height="230"] { filter: brightness(0.8) saturate(0.5) contrast(1.3); } - [data-color-mode='auto'][data-dark-theme='dark_dimmed'] - .js-plaxify[height='156'] { + [data-color-mode="auto"][data-dark-theme="dark_dimmed"] + .js-plaxify[height="156"] { filter: brightness(0.5) saturate(0.5); } - [data-color-mode='auto'][data-dark-theme='dark_dimmed'] - .js-plaxify[height='49'] { + [data-color-mode="auto"][data-dark-theme="dark_dimmed"] + .js-plaxify[height="49"] { filter: brightness(0.9) saturate(0.5); } - [data-color-mode='auto'][data-dark-theme='dark_dimmed'] - .js-plaxify:is( - [height='415'], - [height='75'], - [height='50'], - [height='123'] - ) { + [data-color-mode="auto"][data-dark-theme="dark_dimmed"] + .js-plaxify:is([height="415"], [height="75"], [height="50"], [height="123"]) { filter: brightness(0.3) saturate(0.5); } } /* Brighten Octocat on hover 2/2 */ -[data-color-mode] .js-plaxify[height='230']:hover { +[data-color-mode] .js-plaxify[height="230"]:hover { filter: none; } diff --git a/source/features/no-unnecessary-split-diff-view.css b/source/features/no-unnecessary-split-diff-view.css index 4a225bcaf961..30672ca6f59a 100644 --- a/source/features/no-unnecessary-split-diff-view.css +++ b/source/features/no-unnecessary-split-diff-view.css @@ -2,20 +2,12 @@ /* The selector looks for diff tables WITHOUT changes on the left XOR on the right */ /* Instead of duplicating this selector for each rule, we set a variable and pick it up where needed */ - .js-diff-table:has([data-split-side]):not( - :has( - [data-split-side='left']:is(.blob-code-addition, .blob-code-deletion) - ) - ) { + .js-diff-table:has([data-split-side]):not(:has([data-split-side="left"]:is(.blob-code-addition, .blob-code-deletion))) { --rgh-only-additions: none; table-layout: auto !important; } - .js-diff-table:has([data-split-side]):not( - :has( - [data-split-side='right']:is(.blob-code-addition, .blob-code-deletion) - ) - ) { + .js-diff-table:has([data-split-side]):not(:has([data-split-side="right"]:is(.blob-code-addition, .blob-code-deletion))) { --rgh-only-deletions: none; table-layout: auto !important; } @@ -35,9 +27,7 @@ /* Any applicable situation: Re-align annotations */ :is(.inline-comments, .js-inline-annotations) .empty-cell:not(.blob-num) { - display: var( - --rgh-only-additions, - var(--rgh-only-deletions, table-cell) - ) !important; + display: var(--rgh-only-additions, var(--rgh-only-deletions, table-cell)) + !important; } } diff --git a/source/features/one-click-pr-or-gist.css b/source/features/one-click-pr-or-gist.css index 08cad4b41371..c26829ca812a 100644 --- a/source/features/one-click-pr-or-gist.css +++ b/source/features/one-click-pr-or-gist.css @@ -1,5 +1,5 @@ /* For the 1st button "Create public Gist" */ -#gists + div button[value='1'] { +#gists + div button[value="1"] { margin-left: auto !important; margin-right: 0; } diff --git a/source/features/pr-approvals-count.css b/source/features/pr-approvals-count.css index 90a4ef8c811e..86bdabd3314a 100644 --- a/source/features/pr-approvals-count.css +++ b/source/features/pr-approvals-count.css @@ -1,14 +1,14 @@ /* Show approvals count in PR list */ .js-issue-row .color-fg-muted - [href$='#partial-pull-merging'][aria-label*='approval'] { + [href$="#partial-pull-merging"][aria-label*="approval"] { font-size: 0; color: transparent !important; } .js-issue-row .color-fg-muted - [href$='#partial-pull-merging'][aria-label*='approval']::before { + [href$="#partial-pull-merging"][aria-label*="approval"]::before { all: unset; content: attr(aria-label); display: inline-block !important; @@ -18,14 +18,14 @@ .js-issue-row .color-fg-muted - [href$='#partial-pull-merging'][aria-label*='changes'] { + [href$="#partial-pull-merging"][aria-label*="changes"] { color: var(--rgh-red) !important; } /* Disable now-duplicate tooltip */ .js-issue-row .color-fg-muted - [href$='#partial-pull-merging'][aria-label*='approval']::after { + [href$="#partial-pull-merging"][aria-label*="approval"]::after { content: none; } diff --git a/source/features/quick-label-removal.css b/source/features/quick-label-removal.css index f3c11326cd72..685641dccb3b 100644 --- a/source/features/quick-label-removal.css +++ b/source/features/quick-label-removal.css @@ -19,7 +19,7 @@ fill: rgb(var(--label-r) var(--label-g) var(--label-b)); } -[data-color-mode='dark'][data-dark-theme*='dark'] +[data-color-mode="dark"][data-dark-theme*="dark"] .rgh-quick-label-removal:is(:focus, :hover) svg { fill: var(--rgh-background); diff --git a/source/features/rgh-welcome-issue.css b/source/features/rgh-welcome-issue.css index 85d944fcd093..24d29020c198 100644 --- a/source/features/rgh-welcome-issue.css +++ b/source/features/rgh-welcome-issue.css @@ -6,21 +6,20 @@ */ -[data-url^='/refined-github/refined-github/issues/3543/show_partial'] :is( -.gh-header-meta, /* Issue details */ -.gh-header-actions, /* "New issue" button */ -.gh-header-title .color-fg-muted /* Issue number */ -), -[data-url^='/refined-github/refined-github/issues/3543/partials'] :is( - .js-comment-edit-history, /* "Edited" badge */ - relative-time /* Comment time */ -), -[data-url^='/refined-github/refined-github/issues/3543/show_partial?partial=issues%2Fsidebar'] /* Sidebar */ { +[data-url^="/refined-github/refined-github/issues/3543/show_partial"] + :is(.gh-header-meta, /* Issue details */ +.gh-header-actions, /* "New issue" button */ .gh-header-title .color-fg-muted +/* Issue number */), +[data-url^="/refined-github/refined-github/issues/3543/partials"] + :is(.js-comment-edit-history, /* "Edited" badge */ relative-time +/* Comment time */), +[data-url^="/refined-github/refined-github/issues/3543/show_partial?partial=issues%2Fsidebar"] /* Sidebar */ +{ display: none !important; } @media (min-width: 768px) { - [data-url^='/refined-github/refined-github/issues/3543/show_partial'] + [data-url^="/refined-github/refined-github/issues/3543/show_partial"] .gh-header-title .js-issue-title { font-size: 5vw !important; diff --git a/source/features/select-notifications.css b/source/features/select-notifications.css index ce14decac81c..2938dade7f3c 100644 --- a/source/features/select-notifications.css +++ b/source/features/select-notifications.css @@ -1,8 +1,7 @@ /* Only when the menu is shown as a dropdown, not as a modal (mobile) #5796 */ /* The media query matches the native one exactly, inverted via `not` */ @media screen and not (max-width: 543px) { - .js-notifications-mark-selected-actions > *, - .rgh-open-selected-button { + .js-notifications-mark-selected-actions > *, .rgh-open-selected-button { /* Allow clicking on "Done" and other toolbar buttons even when the dropdown (z-index of 99) is open #4753 */ z-index: 100; } diff --git a/source/features/show-associated-branch-prs-on-fork.css b/source/features/show-associated-branch-prs-on-fork.css index 80d0d960b3a0..7987300f0aa2 100644 --- a/source/features/show-associated-branch-prs-on-fork.css +++ b/source/features/show-associated-branch-prs-on-fork.css @@ -11,7 +11,7 @@ gap: 4px; } -.rgh-pr-cell > [class*='Box'] { +.rgh-pr-cell > [class*="Box"] { /* Drop forced height on pre-existing cell */ height: auto; } diff --git a/source/features/show-whitespace.css b/source/features/show-whitespace.css index 94d77132e16b..4838fac717b7 100644 --- a/source/features/show-whitespace.css +++ b/source/features/show-whitespace.css @@ -5,51 +5,51 @@ background-position: left center; } -[data-rgh-whitespace='tab'] { - background-image: url('data:image/svg+xml,%3Csvg preserveAspectRatio="xMinYMid meet" viewBox="0 0 12 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M9.5 10.44L6.62 8.12L7.32 7.26L12.04 11V11.44L7.28 14.9L6.62 13.9L9.48 11.78H0V10.44H9.5Z" fill="rgba(128, 128, 128, 50%25)"/%3E%3C/svg%3E'); +[data-rgh-whitespace="tab"] { + background-image: url("data:image/svg+xml,%3Csvg preserveAspectRatio=\"xMinYMid meet\" viewBox=\"0 0 12 24\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cpath d=\"M9.5 10.44L6.62 8.12L7.32 7.26L12.04 11V11.44L7.28 14.9L6.62 13.9L9.48 11.78H0V10.44H9.5Z\" fill=\"rgba(128, 128, 128, 50%25)\"/%3E%3C/svg%3E"); background-size: calc(var(--tab-size) * 1ch) 1.25em; /* 2px because of #4991 */ background-position: 2px center; } -[data-rgh-whitespace='space'] { - background-image: url('data:image/svg+xml,%3Csvg preserveAspectRatio="xMinYMid meet" viewBox="0 0 12 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M4.5 11C4.5 10.1716 5.17157 9.5 6 9.5C6.82843 9.5 7.5 10.1716 7.5 11C7.5 11.8284 6.82843 12.5 6 12.5C5.17157 12.5 4.5 11.8284 4.5 11Z" fill="rgba(128, 128, 128, 50%25)"/%3E%3C/svg%3E'); +[data-rgh-whitespace="space"] { + background-image: url("data:image/svg+xml,%3Csvg preserveAspectRatio=\"xMinYMid meet\" viewBox=\"0 0 12 24\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cpath d=\"M4.5 11C4.5 10.1716 5.17157 9.5 6 9.5C6.82843 9.5 7.5 10.1716 7.5 11C7.5 11.8284 6.82843 12.5 6 12.5C5.17157 12.5 4.5 11.8284 4.5 11Z\" fill=\"rgba(128, 128, 128, 50%25)\"/%3E%3C/svg%3E"); background-size: 1ch 1.25em; } -[data-tab-size='1'] { +[data-tab-size="1"] { --tab-size: 1; } -[data-tab-size='2'] { +[data-tab-size="2"] { --tab-size: 2; } -[data-tab-size='3'] { +[data-tab-size="3"] { --tab-size: 3; } -[data-tab-size='4'] { +[data-tab-size="4"] { --tab-size: 4; } -[data-tab-size='5'] { +[data-tab-size="5"] { --tab-size: 5; } -[data-tab-size='6'] { +[data-tab-size="6"] { --tab-size: 6; } -[data-tab-size='8'] { +[data-tab-size="8"] { --tab-size: 8; } -[data-tab-size='10'] { +[data-tab-size="10"] { --tab-size: 10; } -[data-tab-size='12'] { +[data-tab-size="12"] { --tab-size: 12; } diff --git a/source/features/sticky-conversation-list-toolbar.css b/source/features/sticky-conversation-list-toolbar.css index 36edf3f02212..abaa117e135c 100644 --- a/source/features/sticky-conversation-list-toolbar.css +++ b/source/features/sticky-conversation-list-toolbar.css @@ -1,8 +1,7 @@ /* Sticky table header on issues list */ /* https://github.com/refined-github/refined-github/issues */ .Box-header#js-issues-toolbar, -/* https://github.com/issues */ -.Box#js-issues-toolbar > .Box-header { +/* https://github.com/issues */ .Box#js-issues-toolbar > .Box-header { position: sticky; top: 0; z-index: 25; /* Must be above .modal-backdrop (z-index 20) #1317 */ diff --git a/source/features/sticky-csv-header.css b/source/features/sticky-csv-header.css index 0f6db64c2fa1..b555430717db 100644 --- a/source/features/sticky-csv-header.css +++ b/source/features/sticky-csv-header.css @@ -11,16 +11,17 @@ border-right: none; } -.blob-wrapper.type-csv, -.Box:has(.csv-data) { +.blob-wrapper.type-csv, .Box:has(.csv-data) { border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom: none; } .markdown-body .csv-data tbody tr:last-child td:first-child { - border-bottom: 1px solid - var(--borderColor-default, var(--color-border-default)); + border-bottom: 1px solid var( + --borderColor-default, + var(--color-border-default) + ); } /* diff --git a/source/features/sticky-notifications-actions.css b/source/features/sticky-notifications-actions.css index 2c2a0fcff542..f33ae922daa9 100644 --- a/source/features/sticky-notifications-actions.css +++ b/source/features/sticky-notifications-actions.css @@ -7,9 +7,9 @@ top: var(--sticky-padding); z-index: 10; /* Cover up the content seen through the rounded corners above */ - box-shadow: 0 - calc((var(--sticky-padding) + var(--borderRadius-medium)) * -1) 0 0 - var(--rgh-background); + box-shadow: 0 calc( + (var(--sticky-padding) + var(--borderRadius-medium)) * -1 + ) 0 0 var(--rgh-background); } /* Grouped by repo; .Box only contains the header */ diff --git a/source/features/sticky-sidebar.css b/source/features/sticky-sidebar.css index fbae49a12d94..acdd8a9cca96 100644 --- a/source/features/sticky-sidebar.css +++ b/source/features/sticky-sidebar.css @@ -1,7 +1,8 @@ [rgh-sticky-sidebar-enabled] #js-repo-pjax-container ul.pagehead-actions, /* https://github.com/refined-github/refined-github/issues/6761 */ -[rgh-sticky-sidebar-enabled] [id^='my-forks-menu'] { - z-index: initial !important; /* This affects the social buttons. It seems to have no effect but it constantly causes trouble with other features. */ +[rgh-sticky-sidebar-enabled] [id^="my-forks-menu"] { + z-index: initial + !important; /* This affects the social buttons. It seems to have no effect but it constantly causes trouble with other features. */ } /* diff --git a/source/features/suggest-commit-title-limit.css b/source/features/suggest-commit-title-limit.css index fde28b17a4e2..c1c2ede71482 100644 --- a/source/features/suggest-commit-title-limit.css +++ b/source/features/suggest-commit-title-limit.css @@ -15,20 +15,12 @@ /* stylelint-enable */ } -:is( - #commit-summary-input, - #merge_title_field, - #issue_title - ).rgh-title-over-limit { +:is(#commit-summary-input, #merge_title_field, #issue_title).rgh-title-over-limit { border-color: var(--rgh-limit-color); background-color: color-mix(in srgb, var(--rgh-limit-color) 3%, transparent); } -:is( - #commit-summary-input, - #merge_title_field, - #issue_title - ).rgh-title-over-limit:focus { +:is(#commit-summary-input, #merge_title_field, #issue_title).rgh-title-over-limit:focus { box-shadow: inset 0 1px 2px rgb(35 27 27 / 7.5%), 0 0 0 0.2em color-mix(in srgb, var(--rgh-limit-color) 30%, transparent); diff --git a/source/features/tab-size.css b/source/features/tab-size.css index d9860a6bbbef..018f30e650a9 100644 --- a/source/features/tab-size.css +++ b/source/features/tab-size.css @@ -7,8 +7,7 @@ There’s also one place where GitHub incorrectly uses the "user configuration" --tab-size is used to allow the user to override it and to be picked up by `show-whitespace` */ -:root, -.comment-body .tab-size[data-tab-size='8'] { +:root, .comment-body .tab-size[data-tab-size="8"] { --tab-size: 4; tab-size: var(--tab-size); } diff --git a/source/features/table-input.css b/source/features/table-input.css index 6886e65cfd51..f12c09371c3a 100644 --- a/source/features/table-input.css +++ b/source/features/table-input.css @@ -35,31 +35,14 @@ } .rgh-tic:hover div, -.rgh-tic:is(:nth-of-type(5n + 1)):has(~ :hover:nth-of-type(5n + 1)) div, -.rgh-tic:is(:nth-of-type(5n + 1), :nth-of-type(5n + 2)):has( - ~ :hover:nth-of-type(5n + 2) - ) +.rgh-tic:is(:nth-of-type(5n+1)):has(~ :hover:nth-of-type(5n+1)) div, +.rgh-tic:is(:nth-of-type(5n+1), :nth-of-type(5n+2)):has(~ :hover:nth-of-type(5n+2)) div, -.rgh-tic:is( - :nth-of-type(5n + 1), - :nth-of-type(5n + 2), - :nth-of-type(5n + 3) - ):has(~ :hover:nth-of-type(5n + 3)) +.rgh-tic:is(:nth-of-type(5n+1), :nth-of-type(5n+2), :nth-of-type(5n+3)):has(~ :hover:nth-of-type(5n+3)) div, -.rgh-tic:is( - :nth-of-type(5n + 1), - :nth-of-type(5n + 2), - :nth-of-type(5n + 3), - :nth-of-type(5n + 4) - ):has(~ :hover:nth-of-type(5n + 4)) +.rgh-tic:is(:nth-of-type(5n+1), :nth-of-type(5n+2), :nth-of-type(5n+3), :nth-of-type(5n+4)):has(~ :hover:nth-of-type(5n+4)) div, -.rgh-tic:is( - :nth-of-type(5n + 1), - :nth-of-type(5n + 2), - :nth-of-type(5n + 3), - :nth-of-type(5n + 4), - :nth-of-type(5n + 5) - ):has(~ :hover:nth-of-type(5n + 5)) +.rgh-tic:is(:nth-of-type(5n+1), :nth-of-type(5n+2), :nth-of-type(5n+3), :nth-of-type(5n+4), :nth-of-type(5n+5)):has(~ :hover:nth-of-type(5n+5)) div { border-color: #79b8ff; background-color: var( diff --git a/source/features/warning-for-disallow-edits.css b/source/features/warning-for-disallow-edits.css index 0479c956bb5f..76f87a7b1a4a 100644 --- a/source/features/warning-for-disallow-edits.css +++ b/source/features/warning-for-disallow-edits.css @@ -1,5 +1,5 @@ /* Hide warning when PR is closed */ -[data-pull-is-open='false'] +[data-pull-is-open="false"] ~ #discussion_bucket .rgh-warning-for-disallow-edits { display: none; diff --git a/source/github-helpers/heat-map.css b/source/github-helpers/heat-map.css index 82c97f182d8a..3529d9d91108 100644 --- a/source/github-helpers/heat-map.css +++ b/source/github-helpers/heat-map.css @@ -4,7 +4,7 @@ --rgh-heat-color: #c24e00; } -:root [data-rgh-heat='1'] { +:root [data-rgh-heat="1"] { color: #c24e00 !important; color: color-mix( in srgb, @@ -13,7 +13,7 @@ ) !important; } -:root [data-rgh-heat='2'] { +:root [data-rgh-heat="2"] { color: #ac571f !important; color: color-mix( in srgb, @@ -22,7 +22,7 @@ ) !important; } -:root [data-rgh-heat='3'] { +:root [data-rgh-heat="3"] { color: #a35b2c !important; color: color-mix( in srgb, @@ -31,7 +31,7 @@ ) !important; } -:root [data-rgh-heat='4'] { +:root [data-rgh-heat="4"] { color: #9a5f38 !important; color: color-mix( in srgb, @@ -40,7 +40,7 @@ ) !important; } -:root [data-rgh-heat='5'] { +:root [data-rgh-heat="5"] { color: #926245 !important; color: color-mix( in srgb, @@ -49,7 +49,7 @@ ) !important; } -:root [data-rgh-heat='6'] { +:root [data-rgh-heat="6"] { color: #896651 !important; color: color-mix( in srgb, @@ -58,7 +58,7 @@ ) !important; } -:root [data-rgh-heat='7'] { +:root [data-rgh-heat="7"] { color: #806a5e !important; color: color-mix( in srgb, @@ -67,7 +67,7 @@ ) !important; } -:root [data-rgh-heat='8'] { +:root [data-rgh-heat="8"] { color: #776d6a !important; color: color-mix( in srgb, @@ -76,7 +76,7 @@ ) !important; } -:root [data-rgh-heat='9'] { +:root [data-rgh-heat="9"] { color: #6e7177 !important; color: color-mix( in srgb, @@ -85,7 +85,7 @@ ) !important; } -:root [data-rgh-heat='10'] { +:root [data-rgh-heat="10"] { color: #6a737d !important; color: color-mix( in srgb, diff --git a/source/options.css b/source/options.css index 7af6e8463236..8b919e6068d4 100644 --- a/source/options.css +++ b/source/options.css @@ -8,11 +8,11 @@ html::after { /* Add some extra scroll to the page to reduce section toggle jumps/scroll */ - content: ''; + content: ""; display: block; height: 50vh; /* webpackIgnore: true */ - background: url('icon.png') center no-repeat; + background: url("icon.png") center no-repeat; filter: opacity(0.1) saturate(0) brightness(1.2); } @@ -85,7 +85,7 @@ details[open] > :not(summary) { } [data-validation]::before { - content: url('data:image/svg+xml; utf8, '); + content: url("data:image/svg+xml; utf8, "); width: 16px; height: 16px; vertical-align: -4px; @@ -93,29 +93,35 @@ details[open] > :not(summary) { display: inline-block; } -[data-validation='valid']::before { - content: url('data:image/svg+xml; utf8, '); +[data-validation="valid"]::before { + content: url("data:image/svg+xml; utf8, "); } -[data-validation='invalid']::before { - content: url('data:image/svg+xml; utf8, '); +[data-validation="invalid"]::before { + content: url("data:image/svg+xml; utf8, "); } -:root [name='customCSS'], -:root [name='personalToken'] { +:root [name="customCSS"], :root [name="personalToken"] { /* Same as GitHub style for `code` */ - font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, - 'Liberation Mono', monospace !important; + font-family: + ui-monospace, + SFMono-Regular, + "SF Mono", + Menlo, + Consolas, + "Liberation Mono", + monospace !important; font-size: 11px; line-height: 1.5; } -[name='personalToken'] { - width: 20em !important; /* https://github.com/refined-github/refined-github/issues/1374#issuecomment-397906701 */ +[name="personalToken"] { + width: 20em + !important; /* https://github.com/refined-github/refined-github/issues/1374#issuecomment-397906701 */ display: inline-block !important; } -[name='personalToken']:invalid { +[name="personalToken"]:invalid { border-color: var(--rgh-red) !important; } @@ -123,11 +129,11 @@ details[open] > :not(summary) { display: flex; } -.js-features input[type='checkbox'] { +.js-features input[type="checkbox"] { flex-shrink: 0; } -.js-features input[type='checkbox']:not(*:root) { +.js-features input[type="checkbox"]:not(*:root) { /* Selector for Chrome only http://browserhacks.com/#ch */ margin-inline-end: 0.6em; margin-top: 2px; diff --git a/source/refined-github.css b/source/refined-github.css index 0b95106d8f06..7459bc3c4cba 100644 --- a/source/refined-github.css +++ b/source/refined-github.css @@ -35,10 +35,7 @@ https://github.com/notifications?query=reason%3Acomment (which is an unsaved fil min-height: 52px; /* Re-set the default height as a minimum height */ } -:is( - .js-notifications-mark-selected-actions, - .js-notifications-mark-all-actions - ):not([hidden]) { +:is(.js-notifications-mark-selected-actions, .js-notifications-mark-all-actions):not([hidden]) { display: contents !important; } @@ -47,7 +44,7 @@ https://github.com/notifications?query=reason%3Acomment (which is an unsaved fil transition: transform 0.1s; } -[alt='404 “This is not the web page you are looking for”'] { +[alt="404 “This is not the web page you are looking for”"] { animation: fade-in 2s ease-out; } @@ -57,14 +54,15 @@ https://github.com/notifications?query=reason%3Acomment (which is an unsaved fil } /* Make
visibly clickable */ -.markdown-body summary, /* Summary elements are always clickable when present */ -.markdown-body details:not([open]) { +.markdown-body summary, +/* Summary elements are always clickable when present */ .markdown-body + details:not([open]) { /* Summary-less details have unselectable clickable elements */ cursor: pointer; } /* Remove the "New repository" button in the dashboard sidebar */ -.dashboard-sidebar a.Button[href='/new'] { +.dashboard-sidebar a.Button[href="/new"] { display: none; } @@ -128,7 +126,7 @@ pr-branches } /* Space out "Edit" and "Open with" buttons on PR page, also for `view-last-pr-deployment` #4281 */ -.gh-header-actions [aria-label='Edit Pull Request title'] { +.gh-header-actions [aria-label="Edit Pull Request title"] { margin-left: 4px !important; margin-right: 4px !important; } @@ -144,23 +142,23 @@ pr-branches } /* Bold username in conversation lists #4899 */ -:is(.js-issue-row, .js-pinned-issue-list-item) [data-hovercard-type='user'] { +:is(.js-issue-row, .js-pinned-issue-list-item) [data-hovercard-type="user"] { font-weight: 600; } /* Fit large images in the window when viewing single files */ -div[data-target='readme-toc.content'] div.blob-wrapper img { +div[data-target="readme-toc.content"] div.blob-wrapper img { max-width: 100%; } /* Hide label on Milestones link if there are zero milestones #5120 */ -[data-selected-links^='repo_milestones ']:has([title='0']) { +[data-selected-links^="repo_milestones "]:has([title="0"]) { width: 36px; /* Size it so only the icon is visible */ overflow: hidden; /* Crop the text out */ padding-left: 10px; } -[data-selected-links^='repo_milestones ']:has([title='0']) svg { +[data-selected-links^="repo_milestones "]:has([title="0"]) svg { margin-right: 20px; /* Push the text farther away from the text so it's cropped out */ }