From 52519161f5e7e17735d9b67aceb33d6a64cedfe5 Mon Sep 17 00:00:00 2001 From: Leo McArdle Date: Thu, 26 Sep 2024 14:36:38 +0000 Subject: [PATCH] wip(scrim-inline): small design tweaks --- client/src/curriculum/scrim-inline.scss | 22 ++++---- client/src/curriculum/scrim-inline.ts | 72 +++++++++++++------------ 2 files changed, 49 insertions(+), 45 deletions(-) diff --git a/client/src/curriculum/scrim-inline.scss b/client/src/curriculum/scrim-inline.scss index 650485dcbc79..6618fb42ac2f 100644 --- a/client/src/curriculum/scrim-inline.scss +++ b/client/src/curriculum/scrim-inline.scss @@ -40,16 +40,12 @@ dialog { .inner { background-color: #000; + border: 1px solid #000; container-type: size; display: flex; flex-direction: column; height: 100%; - position: relative; width: 100%; - - > * { - font-size: 4cqmin; - } } .header { @@ -61,7 +57,6 @@ dialog { min-height: 1.75rem; padding: 0 0.5rem; width: 100%; - z-index: 1; span { color: #fff; @@ -106,13 +101,19 @@ dialog { mask-size: 75%; } +.body { + flex: 1; + font-size: 4cqmin; + position: relative; +} + .background { background-color: #453c78; background-image: url("../assets/curriculum/scrimba-logo.svg"), url("../assets/curriculum/scrim-hexagons.svg"), url("../assets/curriculum/scrim-bg.png"); background-position: - calc(100% - 3em) calc(100% - 3.2em), + 1.5em 1.5em, right, center; background-repeat: no-repeat; @@ -131,7 +132,7 @@ dialog { font-weight: 600; left: 0; line-height: 1; - margin: 1em; + margin: 0.5em; position: absolute; text-transform: uppercase; text-wrap: balance; @@ -148,10 +149,10 @@ dialog { .open, iframe { - border: 1px solid #000; + border: none; height: 100%; + position: absolute; width: 100%; - z-index: 1; } .open { @@ -161,6 +162,7 @@ iframe { background-repeat: no-repeat; background-size: cover; cursor: pointer; + font-size: inherit; &:hover { --color: #8cb4ffe5; diff --git a/client/src/curriculum/scrim-inline.ts b/client/src/curriculum/scrim-inline.ts index 65c40625e401..196a88ee6204 100644 --- a/client/src/curriculum/scrim-inline.ts +++ b/client/src/curriculum/scrim-inline.ts @@ -84,41 +84,43 @@ class ScrimInline extends LitElement { Open on Scrimba - ${this._scrimLoaded - ? html` - - ` - : html` - ${this.scrimTitle && !this.img - ? html`
-
- - - - - -
-

${this.scrimTitle}

-
` - : null} - - `} +
+ ${this._scrimLoaded + ? html` + + ` + : html` + ${this.scrimTitle && !this.img + ? html`
+
+ + + + + +
+

${this.scrimTitle}

+
` + : null} + + `} +
`;