sri-yantra 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ github: evoluteur
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Olivier Giulieri
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # Sri-Yantra
2
+
3
+ Draw a Sri Yantra right in your browser: nine interlocking triangles around a central point, ringed by lotus petals, circles and a gated square. Change the colors, build it up one triangle at a time, and save it as an SVG or a PNG. No sign-up and no libraries.
4
+
5
+ - [Draw the Sri Yantra](https://evoluteur.github.io/sri-yantra/)
6
+
7
+ ![Sri Yantra](sri-yantra.png)
8
+
9
+ ## What it does
10
+
11
+ The Sri Yantra is the best known of the sacred diagrams of the Indian tantric traditions. Four triangles point up and five point down. The upward ones are usually read as Shiva and the downward ones as Shakti, and together they meet at the bindu, the central point.
12
+
13
+ - **Build it up**: a slider draws the triangles from the smallest to the largest, and a button plays it as an animation. Show only the upward or only the downward triangles if you like.
14
+ - **Layers**: the bindu, the nine triangles, the eight-petal lotus, the sixteen-petal lotus, the circles and the square with four gates can each be switched on and off.
15
+ - **Look**: nine color palettes (gold, temple, night, ink, saffron, emerald, slate, parchment, rose), filled or in outline, and a line weight slider.
16
+ - **Save**: **Download PNG** (2000 pixels square) or **Download SVG**.
17
+
18
+ The page also lists the nine enclosures (avaranas) from the outside in, with their Sanskrit names and their usual glosses.
19
+
20
+ ## About the drawing
21
+
22
+ The triangle coordinates come from the [Sri Yantra example on TeXample.net](https://texample.net/tikz/examples/sri-yantra/) (CC BY-SA 4.0). The two largest triangles have their corners on the circle and every triangle is symmetric left to right. The lotus petals follow the same example. Practitioners may prefer other proportions, and there are several schools of drawing. A hand-drawn yantra is a matter of practice and not just geometry.
23
+
24
+ ## How it is built
25
+
26
+ The pages are plain HTML, CSS and JavaScript, with no dependencies and no build step. Just open `index.html`. It is also a small installable web app: add it to your home screen or desktop and it works offline.
27
+
28
+ - The whole yantra is one SVG built from the triangle data in [js/yantra-data.js](https://github.com/evoluteur/sri-yantra/blob/main/js/yantra-data.js), and the app logic is in [js/yantra.js](https://github.com/evoluteur/sri-yantra/blob/main/js/yantra.js).
29
+ - Three color themes (dark, light and blue) are shared with my other projects.
30
+ - Your settings are kept in the browser's local storage.
31
+
32
+ Sri-Yantra is open source at [GitHub](https://github.com/evoluteur/sri-yantra) with MIT license.
33
+
34
+ Had fun browsing the app? [Buy me a coffee by becoming a sponsor](https://github.com/sponsors/evoluteur).
35
+
36
+ You may also be interested in my other sacred geometry projects [Mandala-Maker](https://github.com/evoluteur/mandala-maker) ([demo](https://evoluteur.github.io/mandala-maker/)) and [Sacred-Geometry](https://github.com/evoluteur/sacred-geometry) ([demo](https://evoluteur.github.io/sacred-geometry/)). For more mystic arts as small web apps, see [Esoterica](https://evoluteur.github.io/projects/esoterica.html).
37
+
38
+ Copyright (c) 2026 [Olivier Giulieri](https://evoluteur.github.io/).
package/about.html ADDED
@@ -0,0 +1,175 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>What Is the Sri Yantra? Meaning and Origins - Sri Yantra</title>
7
+ <meta
8
+ name="description"
9
+ content="What the Sri Yantra is, its nine interlocking triangles and nine enclosures, and where the diagram comes from."
10
+ />
11
+ <meta
12
+ name="keywords"
13
+ content="what is a Sri Yantra, Sri Yantra meaning, Sri Yantra history, Sri Chakra, Shri Yantra, Sri Vidya, nine enclosures, avaranas, Shiva Shakti triangles, bindu, tantra"
14
+ />
15
+ <meta name="robots" content="index, follow, max-image-preview:large" />
16
+ <meta name="author" content="Olivier Giulieri" />
17
+ <link rel="canonical" href="https://evoluteur.github.io/sri-yantra/about.html" />
18
+ <link rel="icon" type="image/png" href="favicon.png" />
19
+ <link rel="manifest" href="manifest.json" />
20
+ <link rel="apple-touch-icon" href="icon-192.png" />
21
+ <meta name="theme-color" content="#1a212d" />
22
+
23
+ <link
24
+ rel="stylesheet"
25
+ href="https://fonts.googleapis.com/css?family=Overpass"
26
+ />
27
+ <link id="omg-core-css" rel="stylesheet" href="css/core.css" />
28
+ <link id="omg-theme-css" rel="stylesheet" href="css/themes/dark/dark.css" />
29
+ <link id="omg-density-css" rel="stylesheet" href="css/densities.css" />
30
+ <link rel="stylesheet" href="css/common.css" />
31
+ <link rel="stylesheet" href="css/about.css" />
32
+
33
+ <script src="js/omg.js"></script>
34
+ <script>
35
+ if ("serviceWorker" in navigator) {
36
+ addEventListener("load", () => navigator.serviceWorker.register("sw.js"));
37
+ }
38
+ </script>
39
+ <meta property="og:type" content="article" />
40
+ <meta property="og:site_name" content="Evoluteur" />
41
+ <meta property="og:title" content="What Is the Sri Yantra? Meaning and Origins" />
42
+ <meta property="og:description" content="What the Sri Yantra is, its nine interlocking triangles and nine enclosures, and where the diagram comes from." />
43
+ <meta property="og:url" content="https://evoluteur.github.io/sri-yantra/about.html" />
44
+ <meta property="og:image" content="https://raw.githubusercontent.com/evoluteur/sri-yantra/main/sri-yantra.png" />
45
+ <meta property="og:image:alt" content="Sri Yantra: nine interlocking triangles, lotus petals, circles and a gated square" />
46
+ <meta name="twitter:card" content="summary_large_image" />
47
+ <meta name="twitter:title" content="What Is the Sri Yantra? Meaning and Origins" />
48
+ <meta name="twitter:description" content="What the Sri Yantra is, its nine interlocking triangles and nine enclosures, and where the diagram comes from." />
49
+ <meta name="twitter:image" content="https://raw.githubusercontent.com/evoluteur/sri-yantra/main/sri-yantra.png" />
50
+ <script type="application/ld+json">
51
+ {
52
+ "@context": "https://schema.org",
53
+ "@graph": [
54
+ {
55
+ "@type": "Article",
56
+ "headline": "What Is the Sri Yantra? Meaning and Origins",
57
+ "description": "What the Sri Yantra is, its nine interlocking triangles and nine enclosures, and where the diagram comes from.",
58
+ "mainEntityOfPage": "https://evoluteur.github.io/sri-yantra/about.html",
59
+ "image": "https://raw.githubusercontent.com/evoluteur/sri-yantra/main/sri-yantra.png",
60
+ "author": {
61
+ "@type": "Person",
62
+ "name": "Olivier Giulieri",
63
+ "url": "https://evoluteur.github.io/"
64
+ },
65
+ "publisher": {
66
+ "@type": "Person",
67
+ "name": "Olivier Giulieri",
68
+ "url": "https://evoluteur.github.io/"
69
+ },
70
+ "isPartOf": {
71
+ "@type": "WebApplication",
72
+ "name": "Sri Yantra",
73
+ "url": "https://evoluteur.github.io/sri-yantra/"
74
+ }
75
+ },
76
+ {
77
+ "@type": "BreadcrumbList",
78
+ "itemListElement": [
79
+ {
80
+ "@type": "ListItem",
81
+ "position": 1,
82
+ "name": "Sri Yantra",
83
+ "item": "https://evoluteur.github.io/sri-yantra/"
84
+ },
85
+ {
86
+ "@type": "ListItem",
87
+ "position": 2,
88
+ "name": "About the Sri Yantra",
89
+ "item": "https://evoluteur.github.io/sri-yantra/about.html"
90
+ }
91
+ ]
92
+ }
93
+ ]
94
+ }
95
+ </script>
96
+ </head>
97
+
98
+ <body onload="setupPage('about');" id="omg-body">
99
+ <div id="omg-header">
100
+ <h1><a href="index.html">Sri Yantra</a></h1>
101
+ <div id="omg-header-tools">
102
+ <div id="omg-theme-picker"></div>
103
+ <a id="omg-github" href="https://github.com/evoluteur/sri-yantra" target="_blank" rel="noopener" title="Sri Yantra on GitHub" aria-label="Sri Yantra on GitHub"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg></a>
104
+ </div>
105
+ </div>
106
+ <h2>About the Sri Yantra</h2>
107
+ <div class="content about primer">
108
+ <p class="tagline">
109
+ What the Sri Yantra is, and where it comes from.
110
+ <button type="button" class="btn-go" onclick="location.href='index.html'">Draw one now</button>
111
+ </p>
112
+
113
+ <img class="plate" src="sri-yantra.png" alt="Sri Yantra: nine interlocking triangles, lotus petals, circles and a gated square" width="220" height="220" loading="lazy" />
114
+
115
+ <h3>What is the Sri Yantra?</h3>
116
+ <p class="lede">The Sri Yantra, also called the Sri Chakra, is a geometric diagram from the Hindu tantric traditions, built from nine interlocking triangles arranged around a single point.</p>
117
+ <p><em class="sanskrit">Sri</em> means auspicious or venerable, and a <em class="sanskrit">yantra</em> is an instrument or diagram used as a support for worship and meditation, so the name means roughly "venerable instrument." It is the central diagram of Sri Vidya, a tradition of goddess (Devi or Shakti) worship within Shaktism. Practitioners meditate on it, trace it in ritual (<em class="sanskrit">puja</em>), and sometimes install it as a three-dimensional pyramid (<em class="sanskrit">Meru</em>) in temples. It is read on two levels at once: as a map of the outer cosmos and as a map of the subtle body, so that worshipping it outwardly and looking inward are treated as the same act.</p>
118
+ <p>However it is read, the figure is built from a small set of parts:</p>
119
+ <dl class="anatomy">
120
+ <dt>Bindu</dt><dd>The central point, where Shiva and Shakti are said to unite as one.</dd>
121
+ <dt>Nine triangles</dt><dd>Four pointing up and five pointing down, overlapping to form 43 smaller triangles in all.</dd>
122
+ <dt>Lotus rings</dt><dd>An eight-petal ring and a sixteen-petal ring, read as agitation and the fulfillment of desires.</dd>
123
+ <dt>Circles</dt><dd>Three concentric rings enclosing the lotuses and triangles.</dd>
124
+ <dt>Bhupura</dt><dd>The outer square with a T-shaped gate on each side, marking the diagram as sacred ground with an entrance facing each direction.</dd>
125
+ </dl>
126
+
127
+ <h3>Shiva and Shakti</h3>
128
+ <p>The four upward-pointing triangles are read as Shiva, the masculine or consciousness principle, and the five downward-pointing ones as Shakti, feminine and active energy. Together they meet at the bindu, where the two are said to become one. This is the same union celebrated across Shakta and tantric thought more broadly: static awareness and dynamic energy as two aspects of a single reality, rather than opposites.</p>
129
+
130
+ <h3>The nine enclosures</h3>
131
+ <p>Tradition reads the completed yantra as nine enclosures, called <em class="sanskrit">avaranas</em>, counted from the outside in. Each is named for what it is said to grant a worshipper who reaches it in meditation.</p>
132
+ <ol class="enclosures">
133
+ <li><span class="sa">Trailokya Mohana</span> <span class="en">&ndash; the square with four gates: enchanter of the three worlds</span></li>
134
+ <li><span class="sa">Sarva Asha Paripuraka</span> <span class="en">&ndash; the sixteen petals: fulfiller of all hopes</span></li>
135
+ <li><span class="sa">Sarva Sankshobhana</span> <span class="en">&ndash; the eight petals: agitator of all</span></li>
136
+ <li><span class="sa">Sarva Saubhagyadayaka</span> <span class="en">&ndash; the fourteen triangles: giver of all good fortune</span></li>
137
+ <li><span class="sa">Sarvartha Sadhaka</span> <span class="en">&ndash; the outer ten triangles: accomplisher of all aims</span></li>
138
+ <li><span class="sa">Sarva Rakshakara</span> <span class="en">&ndash; the inner ten triangles: protector of all</span></li>
139
+ <li><span class="sa">Sarva Rogahara</span> <span class="en">&ndash; the eight triangles: remover of all disease</span></li>
140
+ <li><span class="sa">Sarva Siddhiprada</span> <span class="en">&ndash; the central triangle: bestower of all powers</span></li>
141
+ <li><span class="sa">Sarva Anandamaya</span> <span class="en">&ndash; the bindu: full of all bliss</span></li>
142
+ </ol>
143
+ <p>In the Sri Vidya tradition each enclosure is also linked to its own form of the Goddess and its own group of attendant deities, with the details, and even the exact count and arrangement of triangles, varying somewhat between lineages and texts.</p>
144
+
145
+ <h3>Where the Sri Yantra comes from</h3>
146
+ <p class="lede">The Sri Yantra belongs to a tantric current that took shape over roughly a thousand years, and scholars continue to debate the precise dating of its early sources.</p>
147
+ <p>Diagrams and mantras for goddess worship appear in tantric texts from the early medieval period, and the Sri Yantra in something close to its familiar form is described and prescribed for worship in later Sri Vidya literature. It became especially associated with the <em class="sanskrit">Saundarya Lahari</em> ("Wave of Beauty"), a devotional poem to the goddess traditionally attributed to the philosopher Adi Shankaracharya, though many scholars think at least part of it is a later composition. From South India, Sri Vidya worship of the yantra spread through monastic centers such as the Shankaracharya mathas, where large stone or metal Meru-shaped Sri Yantras are still installed and worshipped today.</p>
148
+
149
+ <ul class="timeline">
150
+ <li><span class="when">First millennium CE</span><span>Tantric traditions of goddess (Shakta) worship develop across the Indian subcontinent, with yantras used as supports for mantra and meditation.</span></li>
151
+ <li><span class="when">Medieval period</span><span>Sri Vidya crystallizes as a distinct tradition centered on the Sri Yantra and the goddess Tripura Sundari; exact dating of its foundational texts is debated.</span></li>
152
+ <li><span class="when">Traditionally, 8th c.</span><span>The <em>Saundarya Lahari</em>, closely associated with the Sri Yantra, is traditionally attributed to Adi Shankaracharya; scholars debate how much of it is his.</span></li>
153
+ <li><span class="when">Ongoing</span><span>Sri Vidya worship of the Sri Yantra continues in South Indian monastic centers and temples, including large three-dimensional Meru installations, and among practitioners worldwide.</span></li>
154
+ </ul>
155
+
156
+ <h3>About this drawing</h3>
157
+ <p>This app takes its triangle coordinates from a published construction shared on <a href="https://texample.net/tikz/examples/sri-yantra/" target="_blank" rel="noopener">TeXample.net</a> (CC BY-SA 4.0). In it, the two largest triangles have every corner on the outer circle, and the whole figure is symmetric left to right. Other constructions exist and give slightly different proportions; drawing a Sri Yantra by hand is traditionally treated as a discipline in its own right, not just a matter of geometry.</p>
158
+
159
+ <div class="footer">
160
+ <p><a href="about.html">About the Sri Yantra</a></p>
161
+ <p>The code of this page is <a href="https://github.com/evoluteur/sri-yantra">Open source</a> with MIT license.</p>
162
+ <p>Had fun browsing the app? <a href="https://github.com/sponsors/evoluteur">Buy me a coffee by becoming a sponsor</a>.</p>
163
+ <p>
164
+ You may also like
165
+ <a href="https://evoluteur.github.io/mandala-maker/" target="_blank" rel="noopener">Mandala Maker</a>,
166
+ <a href="https://evoluteur.github.io/sacred-geometry/" target="_blank" rel="noopener">Sacred Geometry</a>,
167
+ <a href="https://evoluteur.github.io/platonic-solids/" target="_blank" rel="noopener">Platonic Solids</a>,
168
+ and <a href="https://evoluteur.github.io/archimedean-solids/" target="_blank" rel="noopener">Archimedean Solids</a>.
169
+ See them all on <a href="https://evoluteur.github.io/esoterica.html" target="_blank" rel="noopener">Esoterica</a>.
170
+ </p>
171
+ <p class="copyright">&#169; 2026 <a href="https://evoluteur.github.io/">Olivier Giulieri</a></p>
172
+ </div>
173
+ </div>
174
+ </body>
175
+ </html>
package/css/about.css ADDED
@@ -0,0 +1,132 @@
1
+ /* "About the Sri Yantra" page */
2
+ .about {
3
+ max-width: 720px;
4
+ }
5
+ .about h3 {
6
+ margin: 34px 0 10px;
7
+ }
8
+ .about p,
9
+ .about li {
10
+ line-height: 1.6;
11
+ }
12
+ .about ul,
13
+ .about ol {
14
+ padding-left: 22px;
15
+ margin: 8px 0 16px;
16
+ }
17
+ .about li {
18
+ margin-bottom: 8px;
19
+ }
20
+ #omg-header h1 a {
21
+ color: inherit;
22
+ text-decoration: none;
23
+ }
24
+ /* the dark theme renders <strong> at normal weight */
25
+ .about strong {
26
+ font-weight: bold;
27
+ }
28
+
29
+ /* primer: "What is the Sri Yantra?" + origins content, themed via the site's variables */
30
+ .primer .lede {
31
+ font-size: 1.15em;
32
+ opacity: 0.9;
33
+ }
34
+ .primer .sanskrit {
35
+ font-style: italic;
36
+ color: var(--accent, #ffa500);
37
+ }
38
+ .primer .anatomy {
39
+ display: grid;
40
+ grid-template-columns: auto 1fr;
41
+ gap: 6px 18px;
42
+ margin: 0 0 20px;
43
+ padding: 14px 0;
44
+ border-block: 1px solid var(--card-border);
45
+ }
46
+ .primer .anatomy dt {
47
+ font-weight: bold;
48
+ color: var(--card-strong); /* black in the light theme, white in the dark ones */
49
+ }
50
+ .primer .anatomy dd {
51
+ margin: 0 0 10px;
52
+ opacity: 0.85;
53
+ }
54
+
55
+ .primer .enclosures {
56
+ padding-left: 0;
57
+ list-style: none;
58
+ counter-reset: enc;
59
+ }
60
+ .primer .enclosures li {
61
+ counter-increment: enc;
62
+ padding: 10px 0 10px 2.4em;
63
+ position: relative;
64
+ border-top: 1px solid var(--card-border);
65
+ }
66
+ .primer .enclosures li:last-child {
67
+ border-bottom: 1px solid var(--card-border);
68
+ }
69
+ .primer .enclosures li::before {
70
+ content: counter(enc);
71
+ position: absolute;
72
+ left: 0;
73
+ top: 10px;
74
+ width: 1.7em;
75
+ height: 1.7em;
76
+ line-height: 1.7em;
77
+ text-align: center;
78
+ border-radius: 50%;
79
+ border: 1px solid var(--card-border);
80
+ font-size: 0.8em;
81
+ font-weight: bold;
82
+ }
83
+ .primer .enclosures .sa {
84
+ font-weight: bold;
85
+ color: var(--card-strong);
86
+ }
87
+ .primer .enclosures .en {
88
+ opacity: 0.85;
89
+ }
90
+
91
+ .primer .timeline {
92
+ list-style: none;
93
+ margin: 0 0 22px;
94
+ padding: 0;
95
+ }
96
+ .primer .timeline li {
97
+ display: grid;
98
+ grid-template-columns: 11rem 1fr;
99
+ gap: 14px;
100
+ margin: 0;
101
+ padding: 12px 0;
102
+ border-top: 1px solid var(--card-border);
103
+ font-size: 0.95em;
104
+ line-height: 1.55;
105
+ }
106
+ .primer .timeline li:last-child {
107
+ border-bottom: 1px solid var(--card-border);
108
+ }
109
+ .primer .timeline .when {
110
+ font-weight: bold;
111
+ color: var(--card-strong);
112
+ font-variant-numeric: tabular-nums;
113
+ }
114
+ @media only screen and (max-width: 480px) {
115
+ .primer .timeline li {
116
+ grid-template-columns: 1fr;
117
+ gap: 2px;
118
+ }
119
+ }
120
+
121
+ /* "Draw one now": a real theme button, without the default top margin so it lines up with the tagline */
122
+ .tagline .btn-go {
123
+ margin: 0 0 0 8px;
124
+ white-space: nowrap;
125
+ }
126
+
127
+ .about .plate {
128
+ display: block;
129
+ max-width: 220px;
130
+ margin: 0 auto 28px;
131
+ border-radius: 8px;
132
+ }
package/css/common.css ADDED
@@ -0,0 +1,305 @@
1
+ /* Shared styles for the omg-themed apps: header, theme picker, panels,
2
+ controls, buttons, tabs. Each app adds its own stylesheet on top. */
3
+
4
+ #omg-header {
5
+ z-index: 450;
6
+ }
7
+
8
+ /* Theme toggle + GitHub link as one row, anchored top right (core.css
9
+ normally anchors #omg-theme-picker there directly; "static" here lets it
10
+ sit inline instead, with the 20px gap coming from the flex row). */
11
+ #omg-header-tools {
12
+ position: absolute;
13
+ top: 5px;
14
+ right: 5px;
15
+ z-index: 200;
16
+ display: flex;
17
+ align-items: center;
18
+ gap: 20px;
19
+ }
20
+ #omg-header-tools #omg-theme-picker {
21
+ position: static;
22
+ }
23
+
24
+ /* GitHub link, same look as the theme toggle's icons */
25
+ #omg-github {
26
+ display: inline-flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ width: 36px;
30
+ height: 36px;
31
+ border-radius: 50%;
32
+ opacity: 0.75;
33
+ }
34
+ #omg-github svg {
35
+ width: 28px; /* same size in every theme (the themes' generic svg rule differs) */
36
+ height: 28px;
37
+ }
38
+ html[data-theme="evol-blue"] #omg-github svg {
39
+ fill: white; /* like the theme toggle icons on the blue background */
40
+ }
41
+ #omg-github:hover,
42
+ #omg-github:focus-visible {
43
+ opacity: 1;
44
+ }
45
+
46
+ /* core.css is shared across other projects, so the theme-picker's swatch
47
+ styling stays untouched there -- this overrides it to render icons
48
+ (sun/moon/spiral, same set as react-morph-charts' ThemeToggle) instead of
49
+ plain colored circles, without needing to edit the shared file. */
50
+ #omg-theme-picker {
51
+ gap: 2px;
52
+ }
53
+ #omg-theme-picker > a {
54
+ display: inline-flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ height: 28px;
58
+ width: 28px;
59
+ border-radius: 50%;
60
+ border: 1px solid transparent;
61
+ background: none;
62
+ color: currentColor;
63
+ opacity: 0.75;
64
+ }
65
+ #omg-theme-picker > a:hover,
66
+ #omg-theme-picker > a.selected {
67
+ opacity: 1;
68
+ }
69
+
70
+ h1 {
71
+ overflow: hidden;
72
+ text-overflow: ellipsis;
73
+ white-space: nowrap;
74
+ }
75
+ .tagline {
76
+ opacity: 0.85;
77
+ margin: 0 0 20px;
78
+ max-width: 680px;
79
+ }
80
+ .sr-only {
81
+ position: absolute;
82
+ width: 1px;
83
+ height: 1px;
84
+ overflow: hidden;
85
+ clip: rect(0 0 0 0);
86
+ white-space: nowrap;
87
+ }
88
+
89
+ /* The themes ship a generic svg rule (22px, tan fill, orange on hover) meant
90
+ for icons; drawings opt out of it with the "plain" class. */
91
+ svg.plain {
92
+ display: block;
93
+ width: 100%;
94
+ height: auto;
95
+ fill: none;
96
+ cursor: inherit;
97
+ }
98
+ svg.plain:hover {
99
+ fill: none;
100
+ }
101
+
102
+ /* Layout: a stage next to a panel of controls, stacked on narrow screens */
103
+ .layout {
104
+ display: flex;
105
+ flex-wrap: wrap;
106
+ align-items: flex-start;
107
+ gap: 24px;
108
+ margin: 10px 0 20px;
109
+ }
110
+ .stage {
111
+ flex: 1 1 420px;
112
+ min-width: 0;
113
+ max-width: 720px;
114
+ }
115
+ .side {
116
+ flex: 1 1 280px;
117
+ min-width: 0;
118
+ max-width: 420px;
119
+ }
120
+ .panel {
121
+ box-sizing: border-box;
122
+ background-color: var(--card-bg);
123
+ border: 3px solid var(--card-border);
124
+ border-radius: 10px;
125
+ padding: 14px 18px 16px;
126
+ margin: 0 0 16px;
127
+ }
128
+ .panel h3 {
129
+ margin: 0 0 10px;
130
+ font-size: 0.8em;
131
+ text-transform: uppercase;
132
+ letter-spacing: 0.05em;
133
+ opacity: 0.8;
134
+ font-weight: normal;
135
+ }
136
+
137
+ /* Controls */
138
+ .ctl {
139
+ display: grid;
140
+ grid-template-columns: 1fr auto;
141
+ align-items: center;
142
+ gap: 2px 10px;
143
+ margin: 0 0 12px;
144
+ font-size: 0.9em;
145
+ }
146
+ .ctl label {
147
+ opacity: 0.9;
148
+ }
149
+ .ctl .val {
150
+ font-variant-numeric: tabular-nums;
151
+ opacity: 0.85;
152
+ }
153
+ .ctl input[type="range"] {
154
+ grid-column: 1 / -1;
155
+ width: 100%;
156
+ padding: 0;
157
+ margin: 4px 0 0;
158
+ accent-color: #ffa500;
159
+ background: none;
160
+ border: none;
161
+ }
162
+ .ctl select,
163
+ .ctl input[type="number"],
164
+ .ctl input[type="text"],
165
+ .ctl input[type="date"] {
166
+ grid-column: 1 / -1;
167
+ width: 100%;
168
+ box-sizing: border-box;
169
+ }
170
+ .opt {
171
+ display: flex;
172
+ align-items: center;
173
+ gap: 8px;
174
+ margin: 0 0 8px;
175
+ font-size: 0.9em;
176
+ cursor: pointer;
177
+ }
178
+ .opt input {
179
+ width: 1.1em;
180
+ height: 1.1em;
181
+ padding: 0;
182
+ accent-color: #ffa500;
183
+ }
184
+
185
+ .btns {
186
+ display: flex;
187
+ flex-wrap: wrap;
188
+ gap: 8px;
189
+ }
190
+ .btns button,
191
+ .chips button {
192
+ margin: 0;
193
+ }
194
+ button.ghost,
195
+ .chips button {
196
+ background-color: transparent;
197
+ color: inherit;
198
+ border: 2px solid var(--card-border);
199
+ }
200
+ button.ghost:hover,
201
+ button.ghost:focus,
202
+ .chips button:hover,
203
+ .chips button:focus {
204
+ background-color: var(--card-bg);
205
+ border-color: color-mix(in srgb, var(--card-border), white 40%);
206
+ }
207
+ .chips {
208
+ display: flex;
209
+ flex-wrap: wrap;
210
+ gap: 8px;
211
+ margin: 0 0 12px;
212
+ }
213
+ .chips button {
214
+ line-height: 1.2;
215
+ padding: 6px 12px;
216
+ }
217
+ .chips button.selected,
218
+ .chips button[aria-pressed="true"] {
219
+ background-color: var(--card-bg);
220
+ border-color: #ffa500;
221
+ }
222
+ button:disabled {
223
+ opacity: 0.6;
224
+ cursor: default;
225
+ }
226
+ .btns.tight {
227
+ gap: 6px;
228
+ }
229
+
230
+ /* Tabs */
231
+ .tabs {
232
+ display: flex;
233
+ flex-wrap: wrap;
234
+ gap: 8px;
235
+ margin: 0 0 16px;
236
+ }
237
+ .tabs button {
238
+ margin: 0;
239
+ background-color: transparent;
240
+ color: inherit;
241
+ border: 2px solid var(--card-border);
242
+ border-radius: 10px;
243
+ }
244
+ .tabs button:hover,
245
+ .tabs button:focus {
246
+ background-color: var(--card-bg);
247
+ }
248
+ .tabs button.selected {
249
+ background-color: var(--card-bg);
250
+ border-color: #ffa500;
251
+ }
252
+
253
+ /* Small stat tiles */
254
+ .stats {
255
+ display: grid;
256
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
257
+ gap: 10px;
258
+ margin: 0 0 16px;
259
+ }
260
+ .stat {
261
+ border: 2px solid var(--card-border);
262
+ border-radius: 10px;
263
+ padding: 8px 12px;
264
+ }
265
+ .stat .k {
266
+ font-size: 0.7em;
267
+ text-transform: uppercase;
268
+ letter-spacing: 0.05em;
269
+ opacity: 0.75;
270
+ }
271
+ .stat .v {
272
+ font-size: 1.15em;
273
+ font-weight: bold;
274
+ color: var(--card-strong);
275
+ font-variant-numeric: tabular-nums;
276
+ word-break: break-all;
277
+ }
278
+ .note {
279
+ font-size: 0.85em;
280
+ opacity: 0.8;
281
+ max-width: 680px;
282
+ line-height: 1.45;
283
+ }
284
+ .footer {
285
+ margin-top: 40px;
286
+ }
287
+ .footer p {
288
+ margin: 0 0 6px;
289
+ line-height: 1.5;
290
+ }
291
+ .footer p.copyright {
292
+ margin-top: 20px;
293
+ }
294
+
295
+ @media only screen and (max-width: 560px) {
296
+ h1 {
297
+ font-size: 1.6rem;
298
+ padding-right: 125px;
299
+ white-space: normal;
300
+ overflow: visible;
301
+ }
302
+ .panel {
303
+ padding: 12px 14px 14px;
304
+ }
305
+ }