diff --git a/packages/bun-landing/index.css b/packages/bun-landing/index.css index 6c2a6a9d731..3af3361b152 100644 --- a/packages/bun-landing/index.css +++ b/packages/bun-landing/index.css @@ -65,6 +65,7 @@ main { max-width: var(--max-width); display: grid; grid-template-columns: auto auto; + overflow-y: hidden; } main, @@ -226,15 +227,12 @@ header { align-items: center; border: 1px solid var(--orange); margin-top: 1rem; - display: grid; + display: flex; + justify-content: space-between; align-content: center; white-space: nowrap; margin-bottom: 1rem; -} - -#code-box { font-family: var(--monospace-font); - position: relative; } #curl:hover { @@ -244,7 +242,7 @@ header { #curl::before { display: block; - content: "$"; + content: "$" / ""; color: var(--orange); pointer-events: none; width: 1ch; @@ -267,21 +265,20 @@ header { } #code-box-copy { - position: absolute; - right: 16px; - top: 0; - bottom: 0; height: 100%; display: flex; align-items: center; - z-index: 5; color: var(--orange-light); transition: transform 0.05s linear; transition-property: color, transform; transform-origin: center center; cursor: pointer; + background: transparent; + border: none; + font-size: inherit; + font-family: inherit; } #code-box-copy:hover { @@ -302,6 +299,8 @@ header { align-items: center; width: min-content; white-space: nowrap; + list-style-type: none; + padding: 0; } .Tab { @@ -311,15 +310,25 @@ header { padding-bottom: 8px; border-bottom: 1px solid #ccc; cursor: pointer; + padding: 0; +} + +.TabButton { + background: transparent; + border: none; padding: 16px 16px; + color: inherit; + font-size: inherit; + font-family: inherit; + cursor: inherit; } -.Tab[data-tab="react"]:hover, -.Graphs--active-react .Tab[data-tab="react"], -.Tab[data-tab="sqlite"]:hover, -.Graphs--active-sqlite .Tab[data-tab="sqlite"], -.Tab[data-tab="ffi"]:hover, -.Graphs--active-ffi .Tab[data-tab="ffi"] { +.TabButton[data-tab="react"]:hover, +.Graphs--active-react .TabButton[data-tab="react"], +.TabButton[data-tab="sqlite"]:hover, +.Graphs--active-sqlite .TabButton[data-tab="sqlite"], +.TabButton[data-tab="ffi"]:hover, +.Graphs--active-ffi .TabButton[data-tab="ffi"] { border-bottom-color: aquamarine; background-color: rgba(130, 216, 247, 0.1); border-right-color: aquamarine; @@ -335,11 +344,14 @@ header { .BarGraph-heading { font-weight: 500; font-size: 1.5rem; + margin: 0; } .BarGraphList { flex: 1; position: relative; + list-style-type: none; + padding: 0; } .BarGraph, .ActiveTab, @@ -350,6 +362,7 @@ header { .BarGraph-subheading { font-size: 0.9rem; color: rgb(135, 134, 134); + margin: 0; } .BarGraphList { @@ -390,15 +403,18 @@ header { height: var(--opposite); background-color: rgb(93, 89, 134); - transform-origin: bottom center; - transform: scaleY(var(--level)); position: relative; + height: calc(200px * var(--level)); } .BarGraphItem { border-right: 1px dashed var(--dark-border); border-top: 1px dashed var(--dark-border); border-bottom: 1px dashed var(--dark-border); + min-height: 200px; + display: flex; + flex-direction: column; + justify-content: flex-end; } .BarGraphItem--deno { @@ -406,7 +422,6 @@ header { } .BarGraph--horizontal .BarGraphBar { - min-height: 200px; } .BarGraph--vertical .BarGraphBar { @@ -434,8 +449,7 @@ header { } .BarGraph--horizontal .BarGraphBar-label { - transform: scaleY(var(--inverse)); - top: calc(-20px * var(--inverse)); + top: -22px; } .BarGraphItem--bun .BarGraphBar { @@ -484,13 +498,13 @@ header { } .BarGraphKeyItem-value { - color: #666; + color: #7a7a7a; margin-top: 0.5rem; } .BarGraphKeyItem-viewSource { margin-top: 0.5rem; - color: #666; + color: #7a7a7a; text-transform: lowercase; font-weight: thin; font-size: 0.8rem; @@ -520,7 +534,7 @@ header { } .DemphasizedLabel { - color: #666; + color: #7a7a7a; font-weight: 300; } @@ -572,7 +586,7 @@ header { } .Tag--Command:before { - content: "❯"; + content: "❯" / ""; color: rgba(255, 255, 255, 0.35); margin-top: auto; margin-bottom: auto; @@ -603,12 +617,12 @@ header { .Tag--React:before { color: rgba(130, 216, 247, 0.5); - content: "<"; + content: "<" / ""; } .Tag--React:after { color: rgba(130, 216, 247, 0.5); - content: ">"; + content: ">" / ""; } .Tag--Bun { @@ -852,16 +866,17 @@ li { margin: 0; gap: 0rem; width: 100%; + border-top: 1px solid rgba(200, 200, 200, 0.1); } .Tab { width: 100%; - padding-top: 16px; - padding-bottom: 16px; + border-bottom-color: #333; } - .Tab { - border-bottom-color: #333; + .TabButton { + padding-top: 16px; + padding-bottom: 16px; } #pitch-content { @@ -873,10 +888,6 @@ li { .Graphs--active-ffi .Tab[data-tab="ffi"] { background-color: rgba(100, 100, 100, 0.1); } - - .Tabs { - border-top: 1px solid rgba(200, 200, 200, 0.1); - } } #explain p > code { @@ -926,3 +937,13 @@ li { img { object-fit: contain; } + +.visually-hidden { + clip: rect(0 0 0 0); + clip-path: inset(50%); + height: 1px; + overflow: hidden; + position: absolute; + white-space: nowrap; + width: 1px; +} \ No newline at end of file diff --git a/packages/bun-landing/page.tsx b/packages/bun-landing/page.tsx index a27f293db4f..fc38ffdab6c 100644 --- a/packages/bun-landing/page.tsx +++ b/packages/bun-landing/page.tsx @@ -64,14 +64,15 @@ const Label = ({ children, replace }) => { }; const BarGraphItem = ({ type, amount = 0, label, max = 0 }) => ( -
HTTP requests per second (Linux AMD64) -
Average queries per second -
Operations per second
-Bun is a modern JavaScript runtime like Node or Deno. It was built from scratch to focus on three main things: @@ -487,7 +496,7 @@ export default ({ inlineCSS }) => ( future infrastructure, as well as developer productivity through better, simpler tooling.
-Bun.js uses the{" "} @@ -584,7 +593,7 @@ export default ({ inlineCSS }) => ( transpiler, npm client, bundler, SQLite client, HTTP client, WebSocket client and more.
-An enourmous amount of time spent profiling, benchmarking and optimizing things. The answer is different for every part of Bun, @@ -598,7 +607,7 @@ export default ({ inlineCSS }) => ( Sponsor the Zig Software Foundation
-To install bun, run this{" "} @@ -654,8 +663,8 @@ export default { Bun's Discord
-The same command for running JavaScript & TypeScript files @@ -675,7 +684,7 @@ export default {
bun install is an npm-compatible package manager. You probably @@ -705,11 +714,11 @@ export default {
MIT License, excluding dependencies which have various licenses.
-Bun is on GitHub
@@ -722,10 +731,49 @@ export default {