Skip to content

Commit 6c05613

Browse files
committed
style(ui): refine modal close buttons to align with Quiet Sanctuary aesthetic
1 parent 70f31ed commit 6c05613

3 files changed

Lines changed: 69 additions & 53 deletions

File tree

‎frontend/css/style.css‎

Lines changed: 67 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,19 +2059,45 @@ display: grid;
20592059
}
20602060

20612061
.close-genre-modal {
2062-
background: none;
2063-
border: none;
2062+
width: 44px;
2063+
height: 44px;
2064+
background: transparent;
2065+
border: 1px solid transparent;
20642066
font-size: 1.5rem;
2065-
color: var(--text-main);
2067+
color: var(--text-muted, rgba(0, 0, 0, 0.6));
20662068
cursor: pointer;
2067-
padding: 0.5rem;
2069+
padding: 0;
2070+
line-height: 1;
20682071
border-radius: 50%;
2069-
transition: all 0.2s ease;
2072+
flex-shrink: 0;
2073+
aspect-ratio: 1 / 1;
2074+
display: flex;
2075+
align-items: center;
2076+
justify-content: center;
2077+
transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
20702078
}
20712079

20722080
.close-genre-modal:hover {
2073-
background: rgba(0, 0, 0, 0.1);
2074-
transform: rotate(90deg);
2081+
background-color: rgba(220, 53, 69, 0.08);
2082+
color: #c9302c;
2083+
transform: scale(1.04);
2084+
}
2085+
2086+
.close-genre-modal:active {
2087+
transform: scale(0.96);
2088+
}
2089+
2090+
[data-theme="night"] .close-genre-modal {
2091+
background-color: transparent;
2092+
border: 1px solid transparent;
2093+
color: rgba(255, 255, 255, 0.7);
2094+
}
2095+
2096+
[data-theme="night"] .close-genre-modal:hover {
2097+
background-color: rgba(255, 99, 104, 0.12);
2098+
border-color: rgba(255, 99, 104, 0.25);
2099+
color: #ffb3b3;
2100+
transform: scale(1.04);
20752101
}
20762102

20772103
.genre-modal-body {
@@ -2641,28 +2667,48 @@ display: grid;
26412667

26422668
.modal-close-btn {
26432669
position: absolute;
2644-
top: 10px;
2645-
right: 10px;
2670+
top: 15px;
2671+
right: 15px;
26462672
width: 36px;
26472673
height: 36px;
2648-
font-size: 1rem;
26492674
border-radius: 50%;
2650-
background: var(--glass-bg);
2651-
border: 1px solid var(--glass-border);
2652-
cursor: pointer;
2675+
flex-shrink: 0;
2676+
aspect-ratio: 1 / 1;
26532677
display: flex;
26542678
align-items: center;
26552679
justify-content: center;
2656-
font-size: 1.5rem;
2657-
color: var(--text-muted);
2658-
transition: all 0.3s ease;
2659-
z-index: 10;
2680+
padding: 0;
2681+
font-size: 1.25rem;
2682+
line-height: 1;
2683+
cursor: pointer;
2684+
z-index: 100;
2685+
transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
2686+
background-color: transparent;
2687+
border: 1px solid transparent;
2688+
color: var(--text-muted, rgba(0, 0, 0, 0.6));
26602689
}
26612690

26622691
.modal-close-btn:hover {
2663-
background: var(--accent-gold);
2664-
color: white;
2665-
transform: rotate(90deg);
2692+
background-color: rgba(220, 53, 69, 0.08);
2693+
color: #c9302c;
2694+
transform: scale(1.04);
2695+
}
2696+
2697+
.modal-close-btn:active {
2698+
transform: scale(0.96);
2699+
}
2700+
2701+
[data-theme="night"] .modal-close-btn {
2702+
background-color: transparent;
2703+
border: 1px solid transparent;
2704+
color: rgba(255, 255, 255, 0.7);
2705+
}
2706+
2707+
[data-theme="night"] .modal-close-btn:hover {
2708+
background-color: rgba(255, 99, 104, 0.12);
2709+
border-color: rgba(255, 99, 104, 0.25);
2710+
color: #ffb3b3;
2711+
transform: scale(1.04);
26662712
}
26672713

26682714
.book-detail-grid {
@@ -3763,30 +3809,7 @@ display: grid;
37633809
pointer-events: auto;
37643810
}
37653811

3766-
#modal-close-btn {
3767-
position: absolute;
3768-
top: 10px;
3769-
right: 10px;
3770-
background: rgba(255, 255, 255, 0.1);
3771-
border: 1px solid rgba(255, 255, 255, 0.2);
3772-
color: #fff;
3773-
width: 32px;
3774-
height: 32px;
3775-
border-radius: 50%;
3776-
font-size: 0.9rem;
3777-
cursor: pointer;
3778-
z-index: 2005;
3779-
transition: all 0.3s ease;
3780-
pointer-events: auto;
3781-
display: flex;
3782-
align-items: center;
3783-
justify-content: center;
3784-
}
37853812

3786-
#modal-close-btn:hover {
3787-
background: rgba(255, 255, 255, 0.25);
3788-
transform: rotate(90deg);
3789-
}
37903813

37913814
.book-expanded-layout {
37923815
display: flex;
@@ -4263,14 +4286,7 @@ display: grid;
42634286
max-height: 300px;
42644287
}
42654288

4266-
#modal-close-btn {
4267-
top: 15px;
4268-
right: 15px;
4269-
background: rgba(0, 0, 0, 0.5);
4270-
/* Contrast on white if scrolled */
4271-
position: fixed;
4272-
/* Keep it visible */
4273-
}
4289+
42744290
}
42754291

42764292
/* 404 Page Styles */

‎frontend/css/style_main.css‎

-3.22 KB
Binary file not shown.

‎frontend/pages/library.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ <h1 id="selected-collection-name" style="font-family: 'Playfair Display', serif;
286286

287287
<!-- Book Detail Modal -->
288288
<div class="book-detail-modal" id="book-detail-modal">
289-
<button class="modal-close-btn" id="modal-close-btn" title="Close details">
290-
<i class="fa-solid fa-times"></i>
289+
<button class="modal-close-btn" id="modal-close-btn" aria-label="Close details" title="Close details">
290+
<i class="fa-solid fa-xmark"></i>
291291
</button>
292292
<div class="book-detail-content">
293293
<div class="book-expanded-layout">

0 commit comments

Comments
 (0)