Skip to content

Commit f62a9f1

Browse files
committed
[Workers] Use correct diagram component for isolates
1 parent 39f6eee commit f62a9f1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/components/WorkersIsolateDiagram.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,20 +262,20 @@ let range = (n: number) => [...Array(n).keys()];
262262
right: 0;
263263
bottom: 0;
264264
left: 0;
265-
background: rgba(var(--sl-color-text-accent), 0.25);
265+
background: color-mix(in srgb, var(--sl-color-accent-high) 25%, transparent);
266266
}
267267

268268
.ArchitectureDiagram--user-code {
269269
position: relative;
270270
z-index: 1;
271271
width: var(--user-code-size);
272272
height: var(--user-code-size);
273-
background: rgba(var(--accent-color-rgb), 0.9);
273+
background: color-mix(in srgb, var(--sl-color-accent-high) 90%, transparent);
274274
}
275275

276276
.ArchitectureDiagram--process-overhead-background,
277277
.ArchitectureDiagram--user-code {
278-
--box-shadow: inset 0 0 0 1px rgb(var(--background-color-rgb));
278+
--box-shadow: inset 0 0 0 1px var(--sl-color-bg);
279279
box-shadow: var(--box-shadow);
280280
}
281281

@@ -288,7 +288,7 @@ let range = (n: number) => [...Array(n).keys()];
288288
height: 100%;
289289
width: 100%;
290290
text-align: center;
291-
color: rgba(var(--background-color-rgb), 0.7);
291+
color: color-mix(in srgb, var(--sl-color-bg) 70%, transparent);
292292
}
293293

294294
.ArchitectureDiagram--key-user-code {

src/content/docs/workers/reference/how-workers-works.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: The difference between the Workers runtime versus traditional
77

88
---
99

10-
import { Render, NetworkMap, WorkersArchitectureDiagram } from "~/components"
10+
import { Render, NetworkMap, WorkersIsolateDiagram } from "~/components"
1111

1212
Though Cloudflare Workers behave similarly to [JavaScript](https://www.cloudflare.com/learning/serverless/serverless-javascript/) in the browser or in Node.js, there are a few differences in how you have to think about your code. Under the hood, the Workers runtime uses the [V8 engine](https://www.cloudflare.com/learning/serverless/glossary/what-is-chrome-v8/) — the same engine used by Chromium and Node.js. The Workers runtime also implements many of the standard [APIs](/workers/runtime-apis/) available in most modern browsers.
1313

@@ -27,7 +27,7 @@ The three largest differences are: Isolates, Compute per Request, and Distribute
2727

2828
<Render file="isolate-description" />
2929

30-
<WorkersArchitectureDiagram/>
30+
<WorkersIsolateDiagram/>
3131

3232
A given isolate has its own scope, but isolates are not necessarily long-lived. An isolate may be spun down and evicted for a number of reasons:
3333

0 commit comments

Comments
 (0)