element-call-Github/src/index.css

295 lines
7.5 KiB
CSS
Raw Normal View History

2021-07-28 03:27:59 +08:00
/*
2022-06-01 23:48:17 +08:00
Copyright 2021-2022 New Vector Ltd
2021-07-28 03:27:59 +08:00
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
2021-08-20 03:11:12 +08:00
/* Inter unexpectedly contains various codepoints which collide with emoji, even
when variation-16 is applied to request the emoji variant. From eyeballing
the emoji picker, these are: 20e3, 23cf, 24c2, 25a0-25c1, 2665, 2764, 2b06, 2b1c.
Therefore we define a unicode-range to load which excludes the glyphs
(to avoid having to maintain a fork of Inter). */
2022-01-05 08:00:13 +08:00
@import "normalize.css/normalize.css";
@import "@vector-im/compound-design-tokens/assets/web/css/compound-design-tokens.css";
@import "@vector-im/compound-web/dist/style.css";
2022-01-05 08:00:13 +08:00
2021-08-20 03:11:12 +08:00
:root {
--font-scale: 1;
--font-size-micro: calc(10px * var(--font-scale));
--font-size-caption: calc(12px * var(--font-scale));
--font-size-body: calc(15px * var(--font-scale));
--font-size-subtitle: calc(18px * var(--font-scale));
--font-size-title: calc(24px * var(--font-scale));
--font-size-headline: calc(32px * var(--font-scale));
/* These colors are needed during the transitionary period between the old and
new Compound design systems, but should be removed ASAP */
--stopgap-color-on-solid-accent: var(--cpd-color-bg-canvas-default);
--stopgap-background-85: rgba(255, 255, 255, 0.85);
--stopgap-bgColor3: #444;
--cpd-color-border-accent: var(--cpd-color-green-800);
/* The distance to inset non-full-width content from the edge of the window
2023-09-29 00:41:00 +08:00
along the inline axis. This ramps up from 16px for typical mobile windows, to
96px for typical desktop windows. */
--inline-content-inset: min(
var(--cpd-space-24x),
max(var(--cpd-space-4x), calc((100vw - 900px) / 3))
);
--small-drop-shadow: 0px 1.2px 2.4px 0px rgba(0, 0, 0, 0.15);
--subtle-drop-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
--background-gradient: url("graphics/backgroundGradient.svg");
}
.cpd-theme-dark {
--cpd-color-border-accent: var(--cpd-color-green-1100);
--stopgap-color-on-solid-accent: var(--cpd-color-text-primary);
--stopgap-background-85: rgba(16, 19, 23, 0.85);
2021-08-20 03:11:12 +08:00
}
@font-face {
2021-11-18 06:24:52 +08:00
font-family: "Inter";
font-style: normal;
2021-08-20 03:11:12 +08:00
font-weight: 400;
font-display: swap;
unicode-range: var(--inter-unicode-range);
2023-10-11 22:42:04 +08:00
src:
url("/fonts/Inter/Inter-Regular.woff2") format("woff2"),
2021-11-18 06:24:52 +08:00
url("/fonts/Inter/Inter-Regular.woff") format("woff");
2021-08-20 03:11:12 +08:00
}
@font-face {
2021-11-18 06:24:52 +08:00
font-family: "Inter";
font-style: italic;
2021-08-20 03:11:12 +08:00
font-weight: 400;
font-display: swap;
unicode-range: var(--inter-unicode-range);
2023-10-11 22:42:04 +08:00
src:
url("/fonts/Inter/Inter-Italic.woff2") format("woff2"),
2021-11-18 06:24:52 +08:00
url("/fonts/Inter/Inter-Italic.woff") format("woff");
2021-08-20 03:11:12 +08:00
}
@font-face {
2021-11-18 06:24:52 +08:00
font-family: "Inter";
font-style: normal;
2021-08-20 03:11:12 +08:00
font-weight: 500;
font-display: swap;
unicode-range: var(--inter-unicode-range);
2023-10-11 22:42:04 +08:00
src:
url("/fonts/Inter/Inter-Medium.woff2") format("woff2"),
2021-11-18 06:24:52 +08:00
url("/fonts/Inter/Inter-Medium.woff") format("woff");
2021-08-20 03:11:12 +08:00
}
@font-face {
2021-11-18 06:24:52 +08:00
font-family: "Inter";
font-style: italic;
2021-08-20 03:11:12 +08:00
font-weight: 500;
font-display: swap;
unicode-range: var(--inter-unicode-range);
2023-10-11 22:42:04 +08:00
src:
url("/fonts/Inter/Inter-MediumItalic.woff2") format("woff2"),
2021-11-18 06:24:52 +08:00
url("/fonts/Inter/Inter-MediumItalic.woff") format("woff");
2021-08-20 03:11:12 +08:00
}
@font-face {
2021-11-18 06:24:52 +08:00
font-family: "Inter";
font-style: normal;
2021-08-20 03:11:12 +08:00
font-weight: 600;
font-display: swap;
unicode-range: var(--inter-unicode-range);
2023-10-11 22:42:04 +08:00
src:
url("/fonts/Inter/Inter-SemiBold.woff2") format("woff2"),
2021-11-18 06:24:52 +08:00
url("/fonts/Inter/Inter-SemiBold.woff") format("woff");
2021-08-20 03:11:12 +08:00
}
@font-face {
2021-11-18 06:24:52 +08:00
font-family: "Inter";
font-style: italic;
2021-08-20 03:11:12 +08:00
font-weight: 600;
font-display: swap;
unicode-range: var(--inter-unicode-range);
2023-10-11 22:42:04 +08:00
src:
url("/fonts/Inter/Inter-SemiBoldItalic.woff2") format("woff2"),
2021-11-18 06:24:52 +08:00
url("/fonts/Inter/Inter-SemiBoldItalic.woff") format("woff");
2021-08-20 03:11:12 +08:00
}
@font-face {
2021-11-18 06:24:52 +08:00
font-family: "Inter";
font-style: normal;
2021-08-20 03:11:12 +08:00
font-weight: 700;
font-display: swap;
unicode-range: var(--inter-unicode-range);
2023-10-11 22:42:04 +08:00
src:
url("/fonts/Inter/Inter-Bold.woff2") format("woff2"),
2021-11-18 06:24:52 +08:00
url("/fonts/Inter/Inter-Bold.woff") format("woff");
2021-08-20 03:11:12 +08:00
}
@font-face {
2021-11-18 06:24:52 +08:00
font-family: "Inter";
font-style: italic;
2021-08-20 03:11:12 +08:00
font-weight: 700;
font-display: swap;
unicode-range: var(--inter-unicode-range);
2023-10-11 22:42:04 +08:00
src:
url("/fonts/Inter/Inter-BoldItalic.woff2") format("woff2"),
2021-11-18 06:24:52 +08:00
url("/fonts/Inter/Inter-BoldItalic.woff") format("woff");
2021-08-20 03:11:12 +08:00
}
2021-07-17 05:22:03 +08:00
body {
background-color: var(--cpd-color-bg-canvas-default);
background-size: calc(max(1440px, 100vw)) calc(max(800px, 100vh));
background-repeat: no-repeat;
background-position: center;
color: var(--cpd-color-text-primary);
color-scheme: dark;
2021-07-17 05:22:03 +08:00
margin: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-tap-highlight-color: transparent;
2021-07-17 05:22:03 +08:00
}
/* We use this to not render the page at all until we know the theme.*/
.no-theme {
opacity: 0;
}
2021-07-27 07:58:31 +08:00
2021-11-18 06:24:52 +08:00
html,
body,
#root {
/* We use !important here to override vaul drawers, which have a side effect
of setting height: auto; on the body element and messing up our layouts */
height: 100% !important;
2021-07-27 07:58:31 +08:00
}
2021-08-20 08:49:45 +08:00
#root {
display: flex;
flex-direction: column;
2023-12-02 06:43:09 +08:00
/* The root should be a separate stacking context so that portalled elements
like modals and menus always appear over top of it */
isolation: isolate;
2021-07-27 07:58:31 +08:00
}
2023-09-18 21:48:02 +08:00
/* On Android and iOS, prefer native system fonts. The global.css file of
Compound Web is where these variables ultimately get consumed to set the page's
font-family. */
body[data-platform="android"] {
--cpd-font-family-sans: "Roboto", "Noto", "Inter", sans-serif;
}
body[data-platform="ios"] {
--cpd-font-family-sans: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
}
body[data-platform="desktop"] {
--cpd-font-family-sans: "Inter", sans-serif;
}
2022-01-05 08:00:13 +08:00
h1,
h2,
h3,
h4,
h5,
h6,
p,
a {
margin-top: 0;
}
/* Headline Semi Bold */
h1 {
font-weight: 600;
font-size: var(--font-size-headline);
2022-01-05 08:00:13 +08:00
}
/* Title */
h2 {
font-weight: 600;
font-size: var(--font-size-title);
2022-01-05 08:00:13 +08:00
}
/* Subtitle */
h3 {
font-weight: 600;
font-size: var(--font-size-subtitle);
}
/* Body Semi Bold */
h4 {
font-weight: 600;
font-size: var(--font-size-body);
}
h1,
h2,
h3 {
line-height: 1.2;
2022-01-05 08:00:13 +08:00
}
/* Body */
p {
font-size: var(--font-size-body);
line-height: var(--font-size-title);
2022-01-05 08:00:13 +08:00
}
2021-07-27 07:58:31 +08:00
a {
color: var(--cpd-color-text-action-accent);
2021-12-15 08:12:58 +08:00
text-decoration: none;
2021-07-27 07:58:31 +08:00
}
2021-11-18 06:24:52 +08:00
a:hover,
a:active {
2021-08-21 07:36:41 +08:00
opacity: 0.8;
2021-07-28 03:27:59 +08:00
}
2021-11-18 06:24:52 +08:00
2021-12-15 08:12:58 +08:00
hr {
width: calc(100% - 24px);
border: none;
border-top: 1px solid var(--cpd-color-border-interactive-secondary);
color: var(--cpd-color-border-interactive-secondary);
2021-12-15 08:12:58 +08:00
overflow: visible;
text-align: center;
height: 5px;
font-weight: 600;
font-size: var(--font-size-body);
2021-12-15 08:12:58 +08:00
line-height: 24px;
margin: 0 12px;
}
2021-11-18 06:24:52 +08:00
summary {
font-size: var(--font-size-body);
2021-11-18 06:24:52 +08:00
}
details > :not(summary) {
margin-left: var(--font-size-body);
2021-11-18 06:24:52 +08:00
}
details[open] > summary {
margin-bottom: var(--font-size-body);
2021-11-18 06:24:52 +08:00
}
2021-12-04 08:42:29 +08:00
2021-12-11 02:54:18 +08:00
#root > [data-overlay-container] {
position: relative;
height: 100%;
2021-12-04 08:42:29 +08:00
}
/* normalize.css sets the focus rings on buttons in Firefox to an unusual custom
outline, which is inconsistent with our other components and is not sufficiently
visible to be accessible. This resets it back to 'auto'. */
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: auto;
}