Skip to content

Commit

Permalink
Resize message
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-harding committed Oct 23, 2024
1 parent d4c3bdb commit 5991593
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
23 changes: 21 additions & 2 deletions pages/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ main {
grid-template-rows: minmax(32rem, 1fr);
grid-template-columns: 1fr 16rem;
grid-template-areas: "drag-area form";
gap: 2rem;

& > form {
grid-area: form;
Expand All @@ -207,7 +206,27 @@ main {
display: grid;
resize: both;
overflow: hidden;
padding: 1rem;
padding: 1.5rem;
position: relative;

@supports (resize: both) {
&::after {
content: "Resize me →";
display: block;
position: absolute;
font-weight: 500;
right: 1rem;
bottom: 0rem;
line-height: 1;
transition: opacity 250ms;
}
}
}

.squircle-container.hide-after {
&::after {
opacity: 0;
}
}

th-control {
Expand Down
7 changes: 5 additions & 2 deletions pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ <h1>Squircle</h1>

<main>
<div class="tester">
<div class="squircle-container">
<div
class="squircle-container"
onmousedown="this.classList.add('hide-after')"
>
<ce-squircle></ce-squircle>
</div>

Expand All @@ -103,7 +106,7 @@ <h1>Squircle</h1>
type="range"
min="0"
max="64"
value="4"
value="8"
/>
</th-control>

Expand Down

0 comments on commit 5991593

Please sign in to comment.