
morgan pushed to branch tor-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Tor Browser Commits: 9b43d384 by Henry Wilkes at 2025-08-20T17:40:32+01:00 fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection TB 43727: Drop the moz-toggle label-align-after attribute. - - - - - 941d407e by Henry Wilkes at 2025-08-20T17:40:33+01:00 fixup! TB 27476: Implement about:torconnect captive portal within Tor Browser TB 43727: Drop the moz-toggle label-align-after attribute. - - - - - 57bb4918 by Henry Wilkes at 2025-08-20T17:40:34+01:00 fixup! TB 7494: Create local home page for TBB. TB 43727: Align "Onionize" label before the toggle. - - - - - 1ab41197 by Henry Wilkes at 2025-08-20T17:57:06+01:00 fixup! Customize moz-toggle for tor-browser. TB 43727: Drop the moz-toggle label-align-after attribute. Upstream now does this by default. Instead we add the label-align-before attribute for the exception in about:tor. - - - - - 6 changed files: - browser/components/abouttor/content/aboutTor.html - browser/components/torpreferences/content/connectionPane.inc.xhtml - toolkit/components/torconnect/content/aboutTorConnect.html - toolkit/content/widgets/lit-utils.mjs - toolkit/content/widgets/moz-input-common.css - toolkit/content/widgets/moz-toggle/moz-toggle.mjs Changes: ===================================== browser/components/abouttor/content/aboutTor.html ===================================== @@ -77,6 +77,7 @@ /> <moz-toggle id="onionize-toggle" + label-align-before="" data-l10n-id="tor-browser-home-onionize-toggle" data-l10n-attrs="label" ></moz-toggle> ===================================== browser/components/torpreferences/content/connectionPane.inc.xhtml ===================================== @@ -79,7 +79,6 @@ <html:moz-toggle id="tor-connection-quickstart-toggle" class="tor-toggle" - label-align-after="" data-l10n-id="tor-connection-quickstart-checkbox" data-l10n-attrs="label" /> @@ -145,7 +144,6 @@ <html:moz-toggle id="tor-bridges-enabled-toggle" class="tor-toggle" - label-align-after="" data-l10n-id="tor-bridges-use-bridges" data-l10n-attrs="label" /> ===================================== toolkit/components/torconnect/content/aboutTorConnect.html ===================================== @@ -62,7 +62,7 @@ <button id="viewLogButton"></button> <div id="quickstartContainer"> - <moz-toggle id="quickstartToggle" label-align-after=""></moz-toggle> + <moz-toggle id="quickstartToggle"></moz-toggle> </div> <div class="button-container"> ===================================== toolkit/content/widgets/lit-utils.mjs ===================================== @@ -250,6 +250,9 @@ export class MozBaseInputElement extends MozLitElement { supportPage: { type: String, attribute: "support-page" }, accessKey: { type: String, mapped: true, fluent: true }, parentDisabled: { type: Boolean, state: true }, + // label-align-before is a customisation for the moz-toggle in about:tor. + // See tor-browser#43727. + labelAlignBefore: { type: Boolean, attribute: "label-align-before" }, }; static inputLayout = "inline"; @@ -404,9 +407,10 @@ export class MozBaseInputElement extends MozLitElement { part="label" for="input" shownaccesskey=${ifDefined(this.accessKey)} - >${this.isInlineLayout + >${this.labelAlignBefore ? this.labelTemplate() : ""}${this + .isInlineLayout ? this.inputTemplate() - : ""}${this.labelTemplate()}</label + : ""}${this.labelAlignBefore ? "" : this.labelTemplate()}</label >${this.hasDescription ? "" : this.supportLinkTemplate()} </span> ${this.descriptionTemplate()} ===================================== toolkit/content/widgets/moz-input-common.css ===================================== @@ -12,6 +12,7 @@ --input-margin-block-adjust: calc((1lh - var(--input-height)) / 2); --icon-margin-block-adjust: calc((1lh - var(--icon-size-default)) / 2); --input-margin-inline-start-adjust: calc(-1 * var(--input-space-offset)); + --input-margin-inline-adjust: var(--input-margin-inline-start-adjust) var(--space-small); } :host(:not([hidden])) { @@ -32,6 +33,13 @@ --input-margin-block-adjust: 0; } + :host([label-align-before]) { + /* The label is before the input, so we need the input to only have a + * starting gap between it and the label. */ + --input-space-offset: 0; + --input-margin-inline-adjust: var(--space-small) 0; + } + @media (forced-colors) { :host(:state(disabled)) { color: GrayText; @@ -72,7 +80,7 @@ line-height: inherit; vertical-align: top; margin-block: var(--input-margin-block-adjust); - margin-inline: var(--input-margin-inline-start-adjust) var(--space-small); + margin-inline: var(--input-margin-inline-adjust); :host(:not(:state(has-label))) & { margin-inline-end: 0; ===================================== toolkit/content/widgets/moz-toggle/moz-toggle.mjs ===================================== @@ -27,8 +27,6 @@ export default class MozToggle extends MozBaseInputElement { pressed: { type: Boolean, reflect: true }, // Extension for tor-browser. Used for tor-browser#41333. title: { type: String, attribute: "title" }, - // Extension for tor-browser. Used for tor-browser#40837. - labelAlignAfter: { type: Boolean, attribute: "label-align-after" }, }; static activatedProperty = "pressed"; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/4390c5a... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/4390c5a... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
morgan (@morgan)