Skip to content

Commit

Permalink
More tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpdesigns committed Feb 14, 2023
1 parent 7657631 commit 8345b03
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
31 changes: 20 additions & 11 deletions src/_includes/components/custom-dialog.webc
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
<dialog
class="border__all color__bg--contrast color__border--base--light radius__s"
oncancel="toggleDialog()"
onclick="toggleDialog()"
>
<header
class="border__bottom color__bg--contrast color__border--base--light flow__flex flow__align--h-between flow__align--v-center padding__m"
>
<h3 class="color__type--base--ish" @text="title"></h3>
<button class="button__tertiary radius__all" onclick="toggleDialog()">
<icon name="cancel" webc:nokeep></icon>
</button>
</header>
<nav class="padding__l">
<slot></slot>
</nav>
<section onclick="preventAutoClose(event)">
<header
class="border__bottom color__bg--contrast color__border--base--light flow__flex flow__align--h-between flow__align--v-center padding__m"
>
<h3 class="color__type--base--ish" @text="title"></h3>
<button class="button__tertiary radius__all" onclick="toggleDialog()">
<icon name="cancel" webc:nokeep></icon>
</button>
</header>
<nav class="padding__l">
<slot></slot>
</nav>
</section>
</dialog>
<script>
function preventAutoClose(e) {
e.stopPropagation();
}
</script>
<style>
dialog {
inline-size: calc(100% - var(--size__l));
Expand Down
4 changes: 3 additions & 1 deletion src/pages/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@
inline-size: 100%;
margin-inline: auto;
max-inline-size: var(--maxWidth);
padding: var(--size__l);
padding-block: var(--size__l);
padding-inline-start: calc(var(--size__l) + env(safe-area-inset-left));
padding-inline-end: calc(var(--size__l) + env(safe-area-inset-right));

> * {
min-inline-size: 0;
Expand Down

0 comments on commit 8345b03

Please sign in to comment.