Wiki source code of Flamingo Design System

Last modified by Manuel Leduc on 2026/08/25 10:09

Show last authors
1 This Webjar provides an implementation of the [[Abstract Design System>>doc:documentation.xs.dev.front-end.design-systems.api.WebHome]] for [[Flamingo>>doc:extensions:Extension.Flamingo Skin]].
2
3 == ComponentInit ==
4
5 An initialization method to register the design in the client-side components.
6
7 {{version since="18.7.0RC1"}}
8 == CSS Variables ==
9
10 The Webjar declares the [[Design System CSS variables>>doc:documentation.xs.dev.front-end.design-systems.api.WebHome||anchor="HCSSVariables"]] by deriving them from the [[style variables>>doc:documentation.xs.dev.flamingo-skin.style-variables.WebHome]] of the skin, so a change of Color Theme reaches the Design System components too.
11
12 {{code language="css"}}
13 :root {
14 /* Sizes */
15 --cr-sizes-max-page-width: calc(var(--max-screen-size) * 1px); /*This value controls the width of the main content. It should be 100% for spanning text along the whole width or an arbitrary value*/
16 --cr-sizes-main-sidebar-width: var(--panel-column-left-width); /*The default width of the main sidebar*/
17 --cr-sizes-main-sidebar-min-width: 0; /*The minimum width of the main sidebar*/
18
19 /* Base */
20 --cr-base-font-size: var(--font-size-base);
21 --cr-base-text-color: var(--text-color);
22 --cr-base-link-color: var(--link-color);
23 --cr-base-visited-link-color: var(--link-color);
24 --cr-mute-text-color: var(--text-muted);
25
26 /* Fonts */
27 --cr-font-mono: var(--font-family-monospace);
28 --cr-font-sans: var(--font-family-sans-serif);
29 --cr-font-serif: var(--font-family-serif);
30
31 /* Font sizes */
32 --cr-font-size-2x-small: calc(var(--cr-base-font-size) * 0.625);
33 --cr-font-size-x-small: calc(var(--cr-base-font-size) * 0.75);
34 --cr-font-size-small: calc(var(--cr-base-font-size) * 0.875);
35 --cr-font-size-medium: var(--cr-base-font-size);
36 --cr-font-size-large: calc(var(--cr-base-font-size) * 1.25);
37 --cr-font-size-x-large: calc(var(--cr-base-font-size) * 1.5);
38 --cr-font-size-2x-large: calc(var(--cr-base-font-size) * 2.25);
39 --cr-font-size-3x-large: calc(var(--cr-base-font-size) * 3);
40 --cr-font-size-4x-large: calc(var(--cr-base-font-size) * 4.5);
41
42 /* Font weights */
43 --cr-font-weight-light: calc(var(--font-weight-regular) -100); /* deriving it because we currently don't define it*/
44 --cr-font-weight-normal: var(--font-weight-regular);
45 --cr-font-weight-semibold: var(--font-weight-semibold);
46 --cr-font-weight-bold: var(--font-weight-bold);
47
48 /* Letter spacings */
49 --cr-letter-spacing-denser: -0.05em;
50 --cr-letter-spacing-dense: -0.025em;
51 --cr-letter-spacing-normal: 0;
52 --cr-letter-spacing-loose: 0.05em;
53 --cr-letter-spacing-looser: 0.1em;
54
55 /* Line heights */
56 --cr-line-height-denser: 1;
57 --cr-line-height-dense: 1.25;
58 --cr-line-height-normal: 1.42857143;
59 --cr-line-height-loose: 1.6;
60 --cr-line-height-looser: 2;
61
62 /* Neutral colors */
63 --cr-color-neutral-50: color-mix(in srgb, white 97.5%, var(--text-color));
64 --cr-color-neutral-100: color-mix(in srgb, white 95.9%, var(--text-color));
65 --cr-color-neutral-200: color-mix(in srgb, white 90%, var(--text-color));
66 --cr-color-neutral-300: color-mix(in srgb, white 83.9%, var(--text-color));
67 --cr-color-neutral-400: color-mix(in srgb, white 64.9%, var(--text-color));
68 --cr-color-neutral-500: color-mix(in srgb, white 46.1%, var(--text-color));
69 --cr-color-neutral-600: color-mix(in srgb, white 33.9%, var(--text-color));
70 --cr-color-neutral-700: color-mix(in srgb, white 26.1%, var(--text-color));
71 --cr-color-neutral-800: color-mix(in srgb, white 15.9%, var(--text-color));
72 --cr-color-neutral-900: color-mix(in srgb, white 10%, var(--text-color));
73 --cr-color-neutral-950: color-mix(in srgb, white 8%, var(--text-color));
74
75 /* Border radii */
76 --cr-border-radius-small: 0.1875rem; /* 3px */
77 --cr-border-radius-medium: 0.25rem; /* 4px */
78 --cr-border-radius-large: 0.5rem; /* 8px */
79 --cr-border-radius-x-large: 1rem; /* 16px */
80 --cr-border-radius-circle: 50%;
81 --cr-border-radius-pill: 9999px;
82
83 /* Spacings */
84 --cr-spacing-3x-small: calc(var(--button-spacing) * 0.25);
85 --cr-spacing-2x-small: calc(var(--button-spacing) * 0.5);
86 --cr-spacing-x-small: calc(var(--button-spacing) * 0.75);
87 --cr-spacing-small: var(--button-spacing);
88 --cr-spacing-medium: calc(var(--button-spacing) * 1.5);
89 --cr-spacing-large: calc(var(--button-spacing) * 2);
90 --cr-spacing-x-large: calc(var(--button-spacing) * 3);
91 --cr-spacing-2x-large: calc(var(--button-spacing) * 4);
92 --cr-spacing-3x-large: calc(var(--button-spacing) * 6);
93 --cr-spacing-4x-large: calc(var(--button-spacing) * 8);
94
95 /* Input */
96 --cr-input-border-color: var(--cr-color-neutral-400);
97 --cr-input-border-width: 1px;
98 }
99 {{/code}}
100
101 Bootstrap and Flamingo define no equivalent for the letter spacings, the line heights, the border radii and the minimum width of the main sidebar, so those values are fixed and a Color Theme does not change them.
102
103 The declarations live in a stylesheet that the load component of the Webjar imports.
104 {{/version}}

Get Connected