mirror of
https://github.com/tester-army/e2e.git
synced 2026-11-26 02:27:16 +08:00
265 lines
7.7 KiB
CSS
265 lines
7.7 KiB
CSS
/*
|
|
* e2e on Mintlify: one foreground on paper, no accent color.
|
|
*
|
|
* docs.json carries the palette (near-white on near-black; the site is dark
|
|
* only, `appearance.strict`) and the Geist type. This file adds what the
|
|
* config cannot express: square corners, text weight capped at medium, a
|
|
* foreground rule over the page title, hairlines above every h2, neutral code
|
|
* surfaces and callouts, and Geist Mono in code. The light values stay so a
|
|
* light mode needs no CSS work, only a dark logo. Mintlify includes every
|
|
* .css file next to docs.json on every page.
|
|
*/
|
|
|
|
@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500&display=swap');
|
|
|
|
@font-face {
|
|
font-family: 'DM Mono';
|
|
src: url('https://tester.army/fonts/dm-mono-latin-500-normal.woff2') format('woff2');
|
|
font-weight: 500;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
|
|
:root {
|
|
--e2e-ink: rgb(23 23 23);
|
|
--e2e-muted: rgb(115 115 115);
|
|
--e2e-hairline: rgb(232 232 232);
|
|
--e2e-ta-orange: rgb(255 128 1);
|
|
--e2e-ta-orange-ink: rgb(22 22 22);
|
|
}
|
|
|
|
.dark {
|
|
--e2e-ink: rgb(250 250 250);
|
|
--e2e-muted: rgb(163 163 163);
|
|
--e2e-hairline: rgb(78 78 78);
|
|
--e2e-surface: rgb(23 23 23);
|
|
}
|
|
|
|
body {
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
/* Square corners everywhere. Mintlify is Tailwind-built, so the rounded
|
|
utilities are the one place radii come from. */
|
|
[class*='rounded'] {
|
|
border-radius: 0 !important;
|
|
}
|
|
|
|
/* Text weight caps at medium. Emphasis reads through contrast, not weight. */
|
|
#content h1,
|
|
#content h2,
|
|
#content h3,
|
|
#content h4,
|
|
#content strong,
|
|
#content th,
|
|
#page-title h1,
|
|
#sidebar [data-active='true'] {
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* Mintlify renders the global anchor as `<a><div><svg/></div>{anchor}</a>`:
|
|
the text node is the title, ::after the pitch, the div the button. */
|
|
a[href*='utm_campaign=docs_sidebar_banner'] {
|
|
display: none;
|
|
justify-items: start;
|
|
gap: 0.375rem;
|
|
margin-block: 0.5rem;
|
|
padding: 1.75rem 0 0.875rem;
|
|
position: relative;
|
|
color: var(--e2e-ink) !important;
|
|
border-top: 1px solid var(--e2e-hairline);
|
|
background: transparent;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
line-height: 1.3;
|
|
text-decoration: none;
|
|
overflow-wrap: anywhere;
|
|
|
|
&::after {
|
|
content: 'TesterArmy runs your critical flows with AI agents and reports back after every deploy.';
|
|
margin-top: 0.25rem;
|
|
color: var(--e2e-muted);
|
|
font-size: 0.875rem;
|
|
font-weight: 400;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
& > div {
|
|
--e2e-pixel-unit: 12px;
|
|
--e2e-pixel-fill: linear-gradient(var(--e2e-ta-orange), var(--e2e-ta-orange));
|
|
|
|
all: unset;
|
|
order: 1;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
height: calc(var(--e2e-pixel-unit) * 3);
|
|
margin-top: 0.375rem;
|
|
padding: 0 calc(var(--e2e-pixel-unit) + 0.75rem);
|
|
box-sizing: border-box;
|
|
/* !important beats the inline background Mintlify sets on hover. */
|
|
background:
|
|
var(--e2e-pixel-fill) center / calc(100% - var(--e2e-pixel-unit) * 2) 100% no-repeat,
|
|
var(--e2e-pixel-fill) left bottom / var(--e2e-pixel-unit) calc(var(--e2e-pixel-unit) * 2) no-repeat,
|
|
var(--e2e-pixel-fill) right top / var(--e2e-pixel-unit) var(--e2e-pixel-unit) no-repeat,
|
|
var(--e2e-pixel-fill) right bottom / var(--e2e-pixel-unit) var(--e2e-pixel-unit) no-repeat !important;
|
|
color: var(--e2e-ta-orange-ink);
|
|
font-family: 'DM Mono', ui-monospace, monospace;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
line-height: 1rem;
|
|
letter-spacing: 0.07em;
|
|
text-transform: uppercase;
|
|
white-space: nowrap;
|
|
|
|
& > svg {
|
|
display: none !important;
|
|
}
|
|
|
|
&::before {
|
|
content: 'Start testing';
|
|
}
|
|
}
|
|
|
|
&:hover > div,
|
|
&:focus-visible > div {
|
|
background:
|
|
var(--e2e-pixel-fill) center / calc(100% - var(--e2e-pixel-unit) * 2) 100% no-repeat,
|
|
var(--e2e-pixel-fill) left top / var(--e2e-pixel-unit) var(--e2e-pixel-unit) no-repeat,
|
|
var(--e2e-pixel-fill) left bottom / var(--e2e-pixel-unit) var(--e2e-pixel-unit) no-repeat,
|
|
var(--e2e-pixel-fill) right top / var(--e2e-pixel-unit) calc(var(--e2e-pixel-unit) * 2) no-repeat !important;
|
|
}
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--e2e-ink);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
@media (min-width: 1280px) {
|
|
display: grid;
|
|
position: fixed;
|
|
top: 17rem;
|
|
right: 2rem;
|
|
z-index: 1;
|
|
box-sizing: border-box;
|
|
width: 16.5rem;
|
|
margin: 0;
|
|
|
|
@supports (anchor-name: --e2e-table-of-contents) and (position-anchor: --e2e-table-of-contents) {
|
|
position-anchor: --e2e-table-of-contents;
|
|
top: calc(anchor(bottom) + 0.5rem);
|
|
right: auto;
|
|
left: anchor(left);
|
|
}
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1280px) {
|
|
/* Above the z-21 TOC column so the card is clickable, below the z-30 navbar. */
|
|
#sidebar {
|
|
z-index: 22;
|
|
}
|
|
|
|
@supports (anchor-name: --e2e-table-of-contents) and (position-anchor: --e2e-table-of-contents) {
|
|
#table-of-contents {
|
|
anchor-name: --e2e-table-of-contents;
|
|
}
|
|
}
|
|
|
|
html:not(:has(#table-of-contents)) a[href*='utm_campaign=docs_sidebar_banner'] {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
ul:has(> li > a[href*='utm_campaign=docs_sidebar_banner']) + * {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
#content h2,
|
|
#content h3 {
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
/* The page title sits under a rule in the foreground color. */
|
|
#page-title {
|
|
padding-top: 1rem;
|
|
border-top: 2px solid var(--e2e-ink);
|
|
}
|
|
|
|
/* A hairline above every h2 separates sections. */
|
|
#content h2 {
|
|
padding-top: 1rem;
|
|
border-top: 1px solid var(--e2e-hairline);
|
|
}
|
|
|
|
/* Code renders in Geist Mono; the GitHub light/dark themes follow the color scheme (styling.codeblocks). */
|
|
code,
|
|
pre,
|
|
kbd,
|
|
samp {
|
|
font-family: 'Geist Mono', ui-monospace, monospace;
|
|
}
|
|
|
|
/* The code surface is the page's own grey, not the GitHub theme's blue-grey.
|
|
Mintlify paints it from `html.dark .code-block-background`; the `body` in the
|
|
selector is what outranks that rule. */
|
|
html.dark body .code-block-background {
|
|
background-color: var(--e2e-surface) !important;
|
|
}
|
|
|
|
/* The fade behind a code block's floating copy button ends in that same grey. */
|
|
html.dark body .code-block-fade-overlay {
|
|
background-image: linear-gradient(to right, transparent, var(--e2e-surface) 50%) !important;
|
|
}
|
|
|
|
/* Callouts are a hairline box in the foreground color; the icon tells a note
|
|
from a warning, not a hue. */
|
|
#content .callout {
|
|
background-color: transparent !important;
|
|
border-color: var(--e2e-hairline) !important;
|
|
}
|
|
|
|
#content .callout,
|
|
#content .callout * {
|
|
color: var(--e2e-ink) !important;
|
|
}
|
|
|
|
/* The assistant panel takes the table-of-contents column. Without a cap the
|
|
content column grows into that space (816px to 1120px at 1920 wide) and every
|
|
line rewraps; with it, only the panel moves. */
|
|
#content-area {
|
|
max-width: 816px;
|
|
margin-right: auto;
|
|
}
|
|
|
|
/* The "Copy page" menu shows titles only. docs.json requires a description on
|
|
every custom option and Mintlify renders one under each title, so the second
|
|
line is hidden here, on the built-in items too. The menu has no id; the
|
|
custom icons identify it. */
|
|
[role='menu']:has(img[src*='/images/contextual/']) [role='menuitem'] {
|
|
align-items: center;
|
|
}
|
|
|
|
[role='menu']:has(img[src*='/images/contextual/']) [role='menuitem'] > div:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
[role='menu']:has(img[src*='/images/contextual/']) [role='menuitem'] > div.flex-col > div:nth-child(2) {
|
|
display: none;
|
|
}
|
|
|
|
/* The custom icons load as <img>, so currentColor inside the SVG resolves to
|
|
black. Match the built-in icons: the item's text color at half opacity,
|
|
three quarters on hover. */
|
|
[role='menuitem'] img[src*='/images/contextual/'] {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.dark [role='menuitem'] img[src*='/images/contextual/'] {
|
|
filter: invert(1);
|
|
}
|
|
|
|
[role='menuitem']:hover img[src*='/images/contextual/'] {
|
|
opacity: 0.75;
|
|
}
|