Skip to content

Commit

Permalink
UI style: update effects on mac and Firefox for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
gdh1995 committed Apr 28, 2023
1 parent 72b1ea7 commit 9667eea
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"**/*.py": true,
"**/.DS_Store": true
},
"typescript.tsdk": "node_modules\\typescript\\lib",
"typescript.tsdk": "node_modules/typescript/lib",
"css.lint.vendorPrefix": "ignore",
"css.lint.zeroUnits": "warning",
"css.lint.validProperties": [
Expand Down
4 changes: 2 additions & 2 deletions background/browsing_data_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ export const getRecentSessions_ = (expected: number, showBlocked: boolean
u: url, title_: title,
visit_: t,
sessionId_: [entry.windowId, (wnd || entry).sessionId!, wnd ? wnd.tabs!.length : 0],
label_: wnd ? `+${wnd.tabs!.length > 1 ? wnd.tabs!.length - 1 : ""} `
: entry.windowId !== curWndId_ && t > procStart ? "+ " : ""
label_: wnd ? ` +${wnd.tabs!.length > 1 ? wnd.tabs!.length - 1 : ""}`
: entry.windowId !== curWndId_ && t > procStart ? " +" : ""
})
}
if (anyWindow) { // for GC
Expand Down
2 changes: 1 addition & 1 deletion background/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ historyEngine = {
const u = e.u, o = new Suggestion("history", u, UrlDecoder_.decodeURL_(u, u), e.title_ || "",
get2ndArg, (99 - i) / 100), sessionId: any = e.sessionId_
o.visit = e.visit_
sessionId && (o.s = sessionId, o.label = e.label_! + '<span class="undo">&#8630;</span>')
sessionId && (o.s = sessionId, o.label = '<span class="undo">&#8630;</span>' + e.label_!)
arr[i] = o;
}
},
Expand Down
2 changes: 1 addition & 1 deletion front/help_dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
}
.HColumn {
white-space: normal;
font: 12px/1 "Helvetica Neue",Helvetica,Arial,sans-serif;
font: 12px/1 "Helvetica Neue",Arial,sans-serif;
}
.HelpTd {
line-height: 19.2px;
Expand Down
4 changes: 2 additions & 2 deletions front/vimium-c.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ transform:none!important;width:0!important;display:contents!important}:host:befo
letter-spacing:normal;line-height-step:0;margin:0;opacity:1;outline:none;padding:0;text-align-last:auto;text-indent:0;
text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal;
-webkit-writing-mode:horizontal-tb;all:initial;display:block;text-align:left;unicode-bidi:normal;
color:#000;contain:layout style;direction:ltr;font:12px/1 "Helvetica Neue",Helvetica,Arial,sans-serif;
color:#000;contain:layout style;direction:ltr;font:12px/1 "Helvetica Neue",Arial,sans-serif;
pointer-events:none;position:fixed;user-select:none;z-index:2147483647}
.HM{font-weight:bold;position:absolute;white-space:nowrap}.DLG::backdrop{background:#0000}
.LH{background:linear-gradient(#fff785,#ffc542);border:0.01px solid #e3be23;border-radius:3px;box-shadow:0 3px
Expand All @@ -27,7 +27,7 @@ padding:4px 4px 1px;right:152px;text-overflow:ellipsis;white-space:nowrap}
/*#find*/
::selection { background: #ff9632 !important; }
html, body, * { user-select: auto; }
*{cursor:text;font:14px/16px "Helvetica Neue",Helvetica,Arial,sans-serif;margin:0;outline:none;white-space:pre}
*{cursor:text;font:14px/16px "Helvetica Neue",Arial,sans-serif;margin:0;outline:none;white-space:pre}
.r{all:initial;background:#fff;border-radius:3px 3px 0 0;box-shadow:inset 0 0 1.5px 1px #aaa;color:#000;
cursor:text;display:flex;height:21px;padding:4px 4px 0}.r.D{background:#222;color:#d4d4d4}
#s{flex:0 0 4px}#i{flex:0 1 auto;height:16px;min-width:9px;margin-left:2px;overflow:hidden;padding:0 2px 0 0}
Expand Down
5 changes: 3 additions & 2 deletions front/vomnibar.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@
content:attr(data-alt-index);font-size:24px;
height:39px;line-height:39px;position:absolute;left:calc(50% - 20px);text-align:center;top:2px;width:39px}
.p{border-color:#bbcee9;}.item.s{background-color:#bed1ea;border-style:none;}
.top{height:20px;overflow:hidden;font:16px/20px "Helvetica Neue",Helvetica,Arial,"PingFang SC",
.top{height:20px;overflow:hidden;font:16px/20px "Helvetica Neue",Arial,"PingFang SC",
"Hiragino Sans GB","Microsoft YaHei","Heiti SC","WenQuanYi Micro Hei",sans-serif;}
.icon{background:20px 0/16px no-repeat;fill:#999;fill:var(--vc-c,#999);height:16px;
margin:1.5px 4px 0 0;padding-right:20px;width:16px;vertical-align:top;}
.tab,.math{stroke:#999;stroke:var(--vc-c,#999);stroke-width:4;fill:none;}
.no-favicon .icon{margin-right:-16px;background:none !important;}
.label,.time{color:#999;display:inline-block;font-size:14px;font-weight:normal;}
.undo{font-family:sans-serif,STIXGeneral;}
.bottom{height:18px;line-height:14px;margin-left:20px;overflow:hidden;}
a{color:#3b517d;cursor:default;font:14px/18px "Helvetica Neue",Helvetica,Arial,sans-serif;text-decoration:none;}
a{color:#3b517d;cursor:default;font:14px/18px "Helvetica Neue",Arial,sans-serif;text-decoration:none;}
.mono-url a{font-family:Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}
match{color:#000;font-weight:bold;}.title>match{text-decoration:underline;}
#toggle-dark{stroke-linecap:round;stroke-linejoin:bevel;}.i-moon{fill:none;stroke-width:1.4;}
Expand Down
9 changes: 3 additions & 6 deletions pages/options.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ html.dark {
}

body {
font: 14px "Helvetica Neue",Helvetica,Arial,"PingFang SC","Hiragino Sans GB"
font: 14px "Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB"
,"Microsoft YaHei","Heiti SC","WenQuanYi Micro Hei",sans-serif;
margin: 0;
}
Expand Down Expand Up @@ -160,7 +160,7 @@ button, select {
box-sizing: border-box;
color: #444;
color: var(--vc-button-color, #444);
font: 12px/1 "Helvetica Neue",Helvetica,Arial,"PingFang SC","Hiragino Sans GB"
font: 12px/1 "Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB"
,"Microsoft YaHei","Heiti SC","WenQuanYi Micro Hei",sans-serif !important;
height: 24px;
outline: none;
Expand Down Expand Up @@ -565,7 +565,7 @@ label:active {
.exclusionHeader {
color: #444;
display: inline-block;
font: 14px/16px "Helvetica Neue",Helvetica,Arial,"PingFang SC","Hiragino Sans GB"
font: 14px/16px "Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB"
,"Microsoft YaHei","Heiti SC","WenQuanYi Micro Hei",sans-serif;
height: 16px;
padding-left: 4px;
Expand Down Expand Up @@ -746,9 +746,6 @@ select:-moz-focusring {
#keyMappings {
min-height: 182px;
}
input.baseline[type=checkbox] {
vertical-align: baseline;
}
}
@supports (display: -ms-grid) {
option:hover {
Expand Down
5 changes: 1 addition & 4 deletions pages/options_permissions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { kPgReq } from "../background/page_messages"
import {
$, OnEdge, browser_, OnFirefox, OnChrome, nextTick_, CurCVer_, IsEdg_, post_, pageLangs_, PageOs_, prevent_
$, OnEdge, browser_, OnFirefox, OnChrome, nextTick_, CurCVer_, IsEdg_, post_, pageLangs_, prevent_
} from "./async_bg"
import { Option_, type KnownOptionsDataset, oTrans_, bgSettings_, delayBinding_ } from "./options_base"
import { registerClass_, createNewOption_, TextOption_ } from "./options_defs"
Expand Down Expand Up @@ -186,9 +186,6 @@ OnEdge || registerClass_("OptionalPermissions", OptionalPermissionsOption_)

const initOptionalPermissions = (): void => {
const fragment = document.createDocumentFragment()
if (OnFirefox && Build.OS & (1 << kOS.unixLike) && PageOs_ === kOS.unixLike) {
template.querySelector("input")!.classList.add("baseline")
}
for (const shownItem of shownItems) {
const name = shownItem.name_
const node = document.importNode(template, true) as EnsuredMountedHTMLElement
Expand Down
10 changes: 1 addition & 9 deletions pages/options_wnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
bgSettings_, type KnownOptionsDataset, showI18n_, setupBorderWidth_, Option_, AllowedOptions, debounce_, oTrans_,
delayBinding_, didBindEvent_
} from "./options_base"
import { saveBtn_, exportBtn_, savedStatus_, BooleanOption_, onKeyMappingsError_, type SaveBtn } from "./options_defs"
import { saveBtn_, exportBtn_, savedStatus_, onKeyMappingsError_, type SaveBtn } from "./options_defs"
import { manifest_ } from "./options_permissions"

interface ElementWithHash extends HTMLElement {
Expand Down Expand Up @@ -88,14 +88,6 @@ let optionsInit1_ = function (): void {
console.log("Warning: some options are not ready to fetch:", fetching.join(", "))
}
}
OnFirefox && Build.OS & (1 << kOS.unixLike) && PageOs_ === kOS.unixLike && nextTick_((): void => {
for (let key in Option_.all_) {
const obj = Option_.all_[key as "vimSync"]
if (obj instanceof BooleanOption_) {
obj.element_.classList.add("baseline")
}
}
});
if (Option_.all_.exclusionRules.previous_.length > 0) {
nextTick_((el): void => {
el.style.visibility = "";
Expand Down
2 changes: 1 addition & 1 deletion pages/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}

#helpText, #state {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-family: "Helvetica Neue",Arial,sans-serif;
}

#state {
Expand Down
2 changes: 1 addition & 1 deletion tests/dom/editable-in-shadow-of-body.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
></span><span id="c" data-vimium=" (find hud)"
></span></div>
<style type="text/css">
*{cursor:text;font:14px/16px "Helvetica Neue",Helvetica,Arial,sans-serif;margin:0;outline:none;white-space:pre}
*{cursor:text;font:14px/16px "Helvetica Neue",Arial,sans-serif;margin:0;outline:none;white-space:pre}
.r{all:initial;background:#fff;border-radius:3px 3px 0 0;box-shadow:inset 0 0 1.5px 1px #aaa;color:#000;
cursor:text;display:flex;height:21px;padding:4px 4px 0}.r.D{background:#222;color:#d4d4d4}
#s{flex:0 0 4px}#i{flex:0 1 auto;height:16px;min-width:9px;margin-left:2px;overflow:hidden;padding:0 2px 0 0}
Expand Down

0 comments on commit 9667eea

Please sign in to comment.