Skip to content

Commit 52fb3d5

Browse files
committed
style: finalize tooltip chord style by removing fixed dimensions and cleaning up decorations
1 parent b405ca9 commit 52fb3d5

4 files changed

Lines changed: 27 additions & 31 deletions

File tree

better-github-nav.user.js

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @name Better GitHub Navigation
33
// @name:zh-CN 更好的 GitHub 导航栏
44
// @namespace https://github.com/ImXiangYu/better-github-nav
5-
// @version 0.1.37
5+
// @version 0.1.38
66
// @description Add quick access to Dashboard, Trending, Explore, Collections, and Stars from GitHub's top navigation.
77
// @description:zh-CN 在 GitHub 顶部导航中加入 Dashboard、Trending、Explore、Collections、Stars 快捷入口,常用页面一键直达。
88
// @author Ayubass
@@ -16,7 +16,7 @@
1616

1717
(() => {
1818
// src/constants.js
19-
var SCRIPT_VERSION = "0.1.37";
19+
var SCRIPT_VERSION = "0.1.38";
2020
var CUSTOM_BUTTON_CLASS = "custom-gh-nav-btn";
2121
var CUSTOM_BUTTON_ACTIVE_CLASS = "custom-gh-nav-btn-active";
2222
var CUSTOM_BUTTON_COMPACT_CLASS = "custom-gh-nav-btn-compact";
@@ -205,31 +205,29 @@
205205
gap: 4px;
206206
margin: 0;
207207
padding: 0;
208-
border: 0;
208+
border: none !important;
209+
box-shadow: none !important;
209210
font: inherit;
210211
color: inherit;
211-
background: transparent;
212-
text-decoration: none;
212+
background: transparent !important;
213+
text-decoration: none !important;
213214
}
214215
.custom-gh-nav-tooltip-chord {
215-
display: inline-flex;
216-
align-items: center;
217-
justify-content: center;
218-
min-width: 18px;
219-
height: 18px;
216+
display: inline-block;
217+
vertical-align: middle;
220218
padding: 0 4px;
221219
border-radius: 4px;
222-
background: #6e7681;
220+
background: rgba(110, 118, 129, 0.4);
223221
color: #ffffff;
224222
font-size: 11px;
225223
font-weight: 400;
226-
line-height: 1;
224+
line-height: 18px;
227225
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
228226
text-transform: uppercase;
229227
box-sizing: border-box;
230-
border: 1px solid rgba(255, 255, 255, 0.1);
231-
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
232-
text-decoration: none;
228+
border: none !important;
229+
box-shadow: none !important;
230+
text-decoration: none !important;
233231
}
234232
#${SETTINGS_OVERLAY_ID} {
235233
position: fixed;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "better-github-nav",
3-
"version": "0.1.37",
3+
"version": "0.1.38",
44
"description": "Build tools for the Better GitHub Navigation userscript.",
55
"private": true,
66
"scripts": {

src/styles.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,31 +78,29 @@ export function ensureStyles() {
7878
gap: 4px;
7979
margin: 0;
8080
padding: 0;
81-
border: 0;
81+
border: none !important;
82+
box-shadow: none !important;
8283
font: inherit;
8384
color: inherit;
84-
background: transparent;
85-
text-decoration: none;
85+
background: transparent !important;
86+
text-decoration: none !important;
8687
}
8788
.custom-gh-nav-tooltip-chord {
88-
display: inline-flex;
89-
align-items: center;
90-
justify-content: center;
91-
min-width: 18px;
92-
height: 18px;
89+
display: inline-block;
90+
vertical-align: middle;
9391
padding: 0 4px;
9492
border-radius: 4px;
95-
background: #6e7681;
93+
background: rgba(110, 118, 129, 0.4);
9694
color: #ffffff;
9795
font-size: 11px;
9896
font-weight: 400;
99-
line-height: 1;
97+
line-height: 18px;
10098
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
10199
text-transform: uppercase;
102100
box-sizing: border-box;
103-
border: 1px solid rgba(255, 255, 255, 0.1);
104-
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
105-
text-decoration: none;
101+
border: none !important;
102+
box-shadow: none !important;
103+
text-decoration: none !important;
106104
}
107105
#${SETTINGS_OVERLAY_ID} {
108106
position: fixed;

0 commit comments

Comments
 (0)