From a7819e6f5894c78346ca3a1a6ed0601f57667b82 Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Tue, 19 Nov 2024 13:32:08 -0500 Subject: [PATCH 1/2] RWD fixes, brain is hurting now --- index.html | 13 ++++-------- js/slide-show.css | 50 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index badf19a4e..4e44ecf09 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@ } main, main > .full-width { display: grid; - grid-template-columns: 1fr [dash] 1px [main] auto 1px 1fr; + grid-template-columns: 1fr [dash] 1px [main] calc(100% - 4px) 1px 1fr; grid-template-rows: repeat(10,auto); } @@ -27,17 +27,12 @@ background-image: linear-gradient(42deg,hsl(0 80 0 / 0),40%,hsl(0 100 0 / 0.1),60%,hsl(0 80 0 / 0)); } -.use-cases { - --padding-left: 4rem; - --padding-right: 10rem; -} - .use-cases section { padding: 2rem; } .use-cases { - width: 50rem; + width: 100%; } .use-cases > section .spotlight > img { @@ -46,8 +41,8 @@ @media (min-width: 45rem) { .use-cases { - width: 100%; - --padding-right: 0; + --padding-left: 4rem; + --padding-right: 0; } .use-cases > section .spotlight { diff --git a/js/slide-show.css b/js/slide-show.css index 79bff603e..e51408211 100644 --- a/js/slide-show.css +++ b/js/slide-show.css @@ -3,4 +3,52 @@ By Stephen Band Built 2023-02-22 14:59 */ -slide-show{position:relative;box-sizing:border-box;padding:0;grid-auto-flow:column;grid-auto-columns:100%;grid-auto-rows:min-content;align-items:center;justify-items:stretch;scroll-snap-type:x mandatory;scroll-snap-stop:always;-webkit-scroll-behavior:smooth;scroll-behavior:smooth;overscroll-behavior-x:contain;-ms-overflow-style:none;scrollbar-width:none;padding-left:var(--padding-left, 0);padding-right:var(--padding-right, 0);scroll-padding-left:var(--padding-left, 0);scroll-padding-right:var(--padding-right, 0)}slide-show:not(:defined){display:grid;overflow:scroll;overflow-y:hidden}slide-show:not(:defined)>[slot]{display:none!important}.loading slide-show{-webkit-scroll-behavior:auto;scroll-behavior:auto}slide-show::-webkit-scrollbar{display:none}slide-show:not(:defined)>[slot]{display:none}slide-show>*{scroll-snap-align:center}slide-show:-webkit-full-screen{align-content:center}slide-show:fullscreen{align-content:center} + slide-show{ + position:relative; + box-sizing:border-box; + padding:0; + grid-auto-flow:column; + grid-auto-columns:100%; + grid-auto-rows:min-content; + align-items:center; + justify-items:stretch; + scroll-snap-type:x mandatory; + scroll-snap-stop:always; + -webkit-scroll-behavior:smooth; + scroll-behavior:smooth; + overscroll-behavior-x:contain; + -ms-overflow-style:none; + scrollbar-width:none; + padding-left:var(--padding-left, 0); + padding-right:var(--padding-right, 0); + scroll-padding-left:var(--padding-left, 0); + scroll-padding-right:var(--padding-right, 0) +} +slide-show:not(:defined){ + display:grid; + overflow:scroll; + overflow-y:hidden +} +slide-show:not(:defined)>[slot]{ + display:none!important +} +.loading slide-show{ + -webkit-scroll-behavior:auto; + scroll-behavior:auto +} +slide-show::-webkit-scrollbar{ + display:none +} +slide-show:not(:defined)>[slot]{ + display:none +} +slide-show>*{ + scroll-snap-align:center +} +slide-show:-webkit-full-screen{ + align-content:center +} +slide-show:fullscreen{ + align-content:center +} + \ No newline at end of file From 7c5ebb487346aac456a671ce49b73c3e4d30f120 Mon Sep 17 00:00:00 2001 From: "Eric A. Meyer" Date: Tue, 19 Nov 2024 15:53:24 -0500 Subject: [PATCH 2/2] Better slideshow CSS --- css/v2.css | 2 +- index.html | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/css/v2.css b/css/v2.css index 0d891dcbc..8b1ec6438 100755 --- a/css/v2.css +++ b/css/v2.css @@ -226,7 +226,7 @@ main::before { height: 1px; width: 100%; } -.full-width::after, .dotsep::after { +.full-width::after, .dotsep::after, h2:has(+slide-show)::after { content: url(../assets/img/border-dot-black.svg); position: absolute; z-index: 1234; diff --git a/index.html b/index.html index 4e44ecf09..8cf86705d 100644 --- a/index.html +++ b/index.html @@ -28,7 +28,7 @@ } .use-cases section { - padding: 2rem; + padding-inline: 3rem; } .use-cases { @@ -39,12 +39,23 @@ display: block; } +h2:has(+ .use-cases) { + margin-block: 0; + padding-block: 1.5em 0.5em; + padding-inline: 1.5rem 0; +} + @media (min-width: 45rem) { + h2:has(+ .use-cases) { + padding-inline-start: 5rem; + } .use-cases { - --padding-left: 4rem; + --padding-left: 2rem; --padding-right: 0; } - + .use-cases section { + padding-inline: 2.5rem; + } .use-cases > section .spotlight { display: grid; grid-template-columns: 1fr 1fr; @@ -82,7 +93,7 @@ main { padding-inline: 0; } -main > section { +main > * { background: var(--dashV); } main > section > * {