Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,15 @@ <h2 id="dialogs-title">Dialog & Accordion</h2>
</article>
</section>

<dialog id="confirm-dialog">
<dialog
id="confirm-dialog"
class="native-dialog floating-surface"
aria-labelledby="confirm-dialog-title"
aria-describedby="confirm-dialog-description"
>
<form method="dialog">
<h2>네이티브 dialog</h2>
<p>이 예제는 commandfor 지원 브라우저에서 JavaScript 없이 열립니다.</p>
<h2 id="confirm-dialog-title">네이티브 dialog</h2>
<p id="confirm-dialog-description">이 예제는 commandfor 지원 브라우저에서 JavaScript 없이 열립니다.</p>
<button value="close">닫기</button>
</form>
</dialog>
Expand Down
32 changes: 32 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@

.command-dialog {
width: min(560px, calc(100vw - 32px));
max-width: none;
padding: clamp(20px, 4vw, 30px);
}

Expand Down Expand Up @@ -732,6 +733,37 @@
dialog::backdrop {
background: rgba(15, 23, 42, 0.45);
}

.native-dialog {
width: min(420px, calc(100vw - 32px));
max-width: none;
padding: 0;
}

.native-dialog form {
display: grid;
gap: 16px;
padding: clamp(22px, 5vw, 30px);
}

.native-dialog h2,
.native-dialog p {
margin: 0;
}

.native-dialog h2 {
font-size: clamp(24px, 6vw, 30px);
line-height: 1.2;
}

.native-dialog p {
color: var(--color-muted);
line-height: 1.65;
}

.native-dialog button {
justify-self: start;
}
}

@media (max-width: 820px) {
Expand Down
Loading