Repository navigation
Expand file tree
/
Copy pathbutton.css
More file actions
59 lines (52 loc) · 3.62 KB
/
Copy pathbutton.css
File metadata and controls
59 lines (52 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@import "../../design-system/styles/components/button.css";
/* Qdrant Button for creatives. Main / Default only.
Load primitives/colors/colors.css, primitives/typography/typography.css and
guidelines/layout/layout.css first. The button must sit inside a .qd-canvas.
The look (fill, inner highlight, label color and weight) comes from the design system,
design-system/styles/components/button.css, imported above: the same values as the web Button.
This file only sizes the button for the canvas.
Every number below is px at the shape's reference canvas. The canvas scales it with
--qd-canvas-u, so the button works at any size.
Based on the Qdrant Web Design button (Figma ubPe8s8pViytom0Mapcno8, node 793-2956). The Brand Design
System's Figma button isn't used: Figma's buttons follow this repo (design lead, 2026-11-18). */
/* Text size per shape. Height, padding and radius follow the text size
(2.25×, 1.25× and 0.5×, rounded to the 8px grid). */
.qd-canvas[data-shape="ultrawide"] { --qd-button-text: 32; --qd-button-height: 72; --qd-button-pad: 40; --qd-button-radius: 16; }
.qd-canvas[data-shape="wide"],
.qd-canvas[data-shape="square"],
.qd-canvas[data-shape="portrait"] { --qd-button-text: 36; --qd-button-height: 80; --qd-button-pad: 48; --qd-button-radius: 16; }
.qd-canvas[data-shape="story"] { --qd-button-text: 48; --qd-button-height: 112; --qd-button-pad: 64; --qd-button-radius: 24; }
/* Top-right, level with the logo: same height as the logo, never taller (visual designer, 2026-11-04).
Text, padding and corners keep the 2.25 / 1.25 / 0.5 proportions. Needs brand-assets/logo/logo.css. */
.qd-button.qd-button--beside-logo {
--qd-button-h: var(--qd-logo-height);
height: var(--qd-logo-height);
font-size: calc(var(--qd-logo-height) / 2.25);
padding: 0 calc(var(--qd-logo-height) * 1.25 / 2.25);
border-radius: calc(var(--qd-logo-height) * 0.5 / 2.25);
}
.qd-button {
display: inline-flex;
align-items: center;
justify-content: center;
align-self: flex-start;
height: calc(var(--qd-button-height) * var(--qd-canvas-u));
padding: 0 calc(var(--qd-button-pad) * var(--qd-canvas-u));
border-radius: calc(var(--qd-button-radius) * var(--qd-canvas-u));
/* The look, from the design system: a flat fill on a raised surface, like the web button (2026-11-19).
The edge and shadow sizes are shares of the button's height, so they scale with the canvas. */
--qd-button-h: calc(var(--qd-button-height) * var(--qd-canvas-u));
background: var(--qd-ui-button-fill);
box-shadow:
0 calc(var(--qd-button-h) * var(--qd-ui-button-raised-drop-y)) calc(var(--qd-button-h) * var(--qd-ui-button-raised-drop-blur)) 0 var(--qd-ui-button-drop-color),
inset 0 calc(var(--qd-button-h) * var(--qd-ui-button-raised-edge)) 0 0 color-mix(in oklab, var(--qd-ui-button-edge-color) calc(4% * var(--qd-ui-button-edge-strength)), transparent),
inset 0 0 0 calc(var(--qd-button-h) * var(--qd-ui-button-raised-edge)) color-mix(in oklab, var(--qd-ui-button-edge-color) calc(6% * var(--qd-ui-button-edge-strength)), transparent),
inset 0 0 0 calc(var(--qd-button-h) * var(--qd-ui-button-raised-edge)) color-mix(in oklab, var(--qd-ui-button-edge-color) calc(10% * var(--qd-ui-button-edge-strength)), transparent);
color: var(--qd-ui-button-text-color);
font-family: var(--qd-ui-button-font);
font-weight: var(--qd-ui-button-weight); /* SemiBold, same as headings. Not Bold. */
font-size: calc(var(--qd-button-text) * var(--qd-canvas-u));
line-height: 1.625; /* leading-relaxed, as the web button */
white-space: nowrap;
font-feature-settings: var(--qd-font-features); /* ss05 + ss06, as typography/ requires */
}