summaryrefslogtreecommitdiffstats
path: root/toolkit/components/translations/content/translations.css
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/translations/content/translations.css')
-rw-r--r--toolkit/components/translations/content/translations.css174
1 files changed, 174 insertions, 0 deletions
diff --git a/toolkit/components/translations/content/translations.css b/toolkit/components/translations/content/translations.css
new file mode 100644
index 0000000000..094ebde75d
--- /dev/null
+++ b/toolkit/components/translations/content/translations.css
@@ -0,0 +1,174 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+:root {
+ /* Provide defaults for when this page is viewed in "toolkit". */
+ background-color: var(--in-content-page-background, #fff);
+ color: var(--in-content-page-color, #15141a);
+
+ /* Provide backup values for some of the variables used in "browser" so that the styles
+ look nice by default in "toolkit". */
+ --AT-box-background: var(--in-content-box-background, #fff);
+ --AT-box-border-color: var(--in-content-box-border-color, #9e9ea0);
+ --AT-box-info-background: var(--in-content-box-info-background, #f0f0f4);
+
+ /* Variables used in the page layout */
+ --AT-page-margin: 20px;
+ --AT-input-padding: 20px;
+ /* This is somewhat arbitrary, but works well for the current design. If the computed
+ header height changes, this will need to be adjusted. */
+ --AT-header-height: 156px;
+ --AT-input-height: calc(min(400px, calc(100vh - var(--AT-header-height))));
+ --AT-select-arrow-inset: 5px;
+}
+
+h1 {
+ /* Provide this style for "toolkit". It is defined in "browser" */
+ font-weight: lighter;
+}
+
+body {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ inset: 0;
+ position: absolute;
+ visibility: hidden;
+ flex-direction: column;
+}
+
+.about-translations-header {
+ display: flex;
+}
+
+.about-translations-header > * {
+ flex: 1;
+ display: flex;
+ max-width: 50%;
+}
+
+.about-translations-header-start {
+ justify-content: start;
+}
+
+.about-translations-header-end {
+ justify-content: end;
+}
+
+/* Increase the selector specificity to override the base `select` styles. */
+select.about-translations-select {
+ position: relative;
+ padding-inline: 10px 20px;
+ padding-block: 0px;
+ min-width: 50%;
+ margin: 5px;
+ background-position: right var(--AT-select-arrow-inset) center;
+}
+
+select.about-translations-select:dir(rtl) {
+ background-position-x: left var(--AT-select-arrow-inset);
+}
+
+.about-translations-contents {
+ display: flex;
+ flex-direction: column;
+ box-sizing: border-box;
+ width: calc(100% - var(--AT-page-margin) * 2);
+ max-width: 1200px;
+ background-color: var(--AT-box-background);
+ border: 1px solid var(--AT-box-border-color);
+ border-radius: 4px;
+}
+
+.about-translations-input {
+ display: flex;
+ width: 100%;
+ border-top: 1px solid var(--AT-box-border-color);
+}
+
+.about-translations-input-start {
+ border-inline-end: 1px solid var(--AT-box-border-color);
+}
+
+.about-translations-input > * {
+ position: relative;
+ width: 50%;
+}
+
+.about-translations-input-textarea {
+ /* Override user's dragging of the textarea width. */
+ width: 100% !important;
+ height: var(--AT-input-height);
+ box-sizing: border-box;
+ margin: 0;
+ padding: var(--AT-input-padding);
+ border: 0;
+}
+
+.about-translations-input-results-blank {
+ opacity: 0.7;
+}
+
+.about-translations-input-results {
+ position: absolute;
+ inset: 0;
+ padding: var(--AT-input-padding);
+ box-sizing: border-box;
+ overflow-y: scroll;
+}
+
+.about-translations-info {
+ display: none;
+ padding: 10px;
+ background-color: var(--AT-box-info-background);
+ border-radius: 4px;
+ margin-bottom: var(--AT-input-padding);
+}
+
+.about-translations-info-message {
+ flex: 1;
+ align-self: center;
+}
+
+.about-translations-info-icon {
+ width: 16px;
+ height: 16px;
+ margin: 10px;
+ background-image: url('chrome://global/skin/icons/info.svg');
+ -moz-context-properties: fill;
+ fill: currentColor;
+}
+
+@media (max-width: 700px) {
+ :root {
+ --AT-page-margin: 10px;
+ }
+ h1 {
+ margin-top: 15px;
+ }
+ body {
+ padding-bottom: var(--AT-page-margin);
+ }
+ .about-translations-input {
+ flex-direction: column;
+ flex: 1;
+ }
+ .about-translations-input-textarea,
+ .about-translations-input {
+ font-size: 16px;
+ }
+ .about-translations-input > * {
+ width: 100%;
+ flex: 1;
+ }
+ .about-translations-input-end {
+ border-top: 1px solid var(--AT-box-border-color);
+ }
+ .about-translations-input-textarea {
+ height: 100%;
+ }
+ .about-translations-contents {
+ flex: 1;
+ }
+}