Skip to content

Commit cef6745

Browse files
committed
style
1 parent 106a79e commit cef6745

1 file changed

Lines changed: 67 additions & 19 deletions

File tree

github-pages/assets/css/style.css

Lines changed: 67 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -737,51 +737,77 @@ body.dark .reading-time {
737737

738738
/* Details/Summary (collapsible sections) */
739739
details {
740-
background: #F5F3F7;
740+
background: #FFFFFF;
741741
border: 1px solid #E8E5EB;
742-
border-radius: 8px;
743-
margin-bottom: 12px;
744-
overflow: hidden;
742+
border-radius: 12px;
743+
margin-bottom: 16px;
744+
box-shadow: 0 2px 8px rgba(39, 35, 42, 0.04);
745+
transition: box-shadow 0.2s, border-color 0.2s;
746+
}
747+
748+
details:hover {
749+
box-shadow: 0 4px 16px rgba(39, 35, 42, 0.08);
745750
}
746751

747752
details[open] {
748-
background: #FFFFFF;
749753
border-color: #785D8F;
754+
box-shadow: 0 4px 16px rgba(120, 93, 143, 0.12);
750755
}
751756

752757
summary {
753-
padding: 14px 18px;
758+
padding: 18px 22px;
754759
cursor: pointer;
755-
font-weight: 500;
756-
color: #353D4C;
760+
font-weight: 600;
761+
font-size: 16px;
762+
color: #27232A;
757763
display: flex;
758764
align-items: center;
759-
gap: 10px;
765+
gap: 12px;
760766
transition: background 0.2s, color 0.2s;
761767
list-style: none;
768+
border-radius: 12px;
762769
}
763770

764771
summary::-webkit-details-marker {
765772
display: none;
766773
}
767774

768775
summary::before {
769-
content: "▶";
770-
font-size: 10px;
771-
color: #785D8F;
772-
transition: transform 0.2s;
776+
content: "";
777+
width: 20px;
778+
height: 20px;
779+
min-width: 20px;
780+
background: #F5F3F7;
781+
border-radius: 6px;
782+
display: flex;
783+
align-items: center;
784+
justify-content: center;
785+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23785D8F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
786+
background-repeat: no-repeat;
787+
background-position: center;
788+
transition: transform 0.2s, background-color 0.2s;
773789
}
774790

775791
details[open] > summary::before {
776792
transform: rotate(90deg);
793+
background-color: #785D8F;
794+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
777795
}
778796

779797
summary:hover {
780-
background: rgba(120, 93, 143, 0.1);
798+
background: #F5F3F7;
799+
}
800+
801+
details[open] > summary {
802+
color: #785D8F;
803+
border-bottom: 1px solid #E8E5EB;
804+
border-radius: 12px 12px 0 0;
781805
}
782806

783807
details > *:not(summary) {
784-
padding: 14px 18px 18px 18px;
808+
padding: 18px 22px 22px 54px;
809+
color: #4a4a4a;
810+
line-height: 1.7;
785811
}
786812

787813
details pre {
@@ -794,25 +820,47 @@ details p:last-child {
794820

795821
/* Dark mode details */
796822
body.dark details {
797-
background: #2a2a2a;
823+
background: #1a1a1a;
798824
border-color: #333;
825+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
826+
}
827+
828+
body.dark details:hover {
829+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
799830
}
800831

801832
body.dark details[open] {
802-
background: #1a1a1a;
803833
border-color: #a88bc4;
834+
box-shadow: 0 4px 16px rgba(168, 139, 196, 0.2);
804835
}
805836

806837
body.dark summary {
807838
color: #e0e0e0;
808839
}
809840

810841
body.dark summary::before {
811-
color: #a88bc4;
842+
background: #2a2a2a;
843+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a88bc4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
844+
background-repeat: no-repeat;
845+
background-position: center;
846+
}
847+
848+
body.dark details[open] > summary::before {
849+
background-color: #a88bc4;
850+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
812851
}
813852

814853
body.dark summary:hover {
815-
background: rgba(168, 139, 196, 0.15);
854+
background: #2a2a2a;
855+
}
856+
857+
body.dark details[open] > summary {
858+
color: #a88bc4;
859+
border-bottom-color: #333;
860+
}
861+
862+
body.dark details > *:not(summary) {
863+
color: #b0b0b0;
816864
}
817865

818866
/* Print styles */

0 commit comments

Comments
 (0)