beautify css by claude

This commit is contained in:
qcrao
2024-07-08 15:52:37 +08:00
parent bf3795ec7e
commit b733dbe9c0

192
popup.css
View File

@@ -1,79 +1,125 @@
body { body {
width: 240px; width: 280px;
padding: 15px; padding: 20px;
font-family: Arial, sans-serif; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background-color: #f0f2f5;
color: #333;
} }
.header { .header {
margin-bottom: 10px; margin-bottom: 20px;
width: 100%; width: 100%;
border-bottom: 1px solid #ccc; border-bottom: 2px solid #e1e4e8;
padding-bottom: 10px; padding-bottom: 15px;
} }
.header h1 { .header h1 {
font-size: 16px; font-size: 18px;
font-weight: bold; font-weight: 600;
text-align: center; text-align: center;
margin: 0; margin: 0;
} color: #2c3e50;
.buttons-row {
display: flex;
justify-content: space-between;
width: 100%;
margin-bottom: 10px;
align-items: flex-start;
}
button {
padding: 8px 12px;
font-size: 14px;
cursor: pointer;
background-color: #1abc9c;
color: white;
border: 1px solid #16a085;
border-radius: 6px;
text-align: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition-duration: 0.4s;
margin: 0; /* 去掉左右外边距 */
}
button:hover {
background-color: #16a085;
border-color: #14967f;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
button#bulk-delete,
button#toggle-checkboxes,
button#bulk-archive {
font-size: 16px;
background-color: #e74c3c;
border-color: #c0392b;
margin-top: 10px;
width: calc(
200px + 40px
); /* bulk-delete 宽度等于 body 的宽度减去左右内边距再加上两者之间的距离 */
} }
.buttons-wrapper { .buttons-wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
margin-top: 10px; gap: 15px;
}
.buttons-row {
display: flex;
justify-content: space-between;
width: 100%;
gap: 10px;
}
button {
padding: 10px 15px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
background-color: #3498db;
color: white;
border: none;
border-radius: 8px;
text-align: center;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
outline: none;
position: relative;
overflow: hidden;
}
button::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 5px;
height: 5px;
background: rgba(255, 255, 255, 0.5);
opacity: 0;
border-radius: 100%;
transform: scale(1, 1) translate(-50%);
transform-origin: 50% 50%;
}
button:hover {
transform: translateY(-3px);
box-shadow: 0 7px 14px rgba(0, 0, 0, 0.18);
}
button:hover::after {
animation: ripple 1s ease-out;
}
@keyframes ripple {
0% {
transform: scale(0, 0);
opacity: 0.5;
}
20% {
transform: scale(25, 25);
opacity: 0.3;
}
100% {
opacity: 0;
transform: scale(40, 40);
}
} }
.buttons-row button { .buttons-row button {
width: 120px; /* 将 remove-checkboxes 和 add-checkboxes 按钮的宽度增加到 120px */ flex: 1;
} }
.buttons-row button:first-child { button#bulk-delete,
margin-right: 10px; /* 添加一个右外边距来增加两个按钮之间的距离 */ button#toggle-checkboxes,
button#bulk-archive {
font-size: 16px;
width: 100%;
margin-top: 5px;
padding: 12px 15px;
}
button#add-checkboxes {
background-color: #2ecc71;
}
button#remove-checkboxes {
background-color: #e74c3c;
}
button#toggle-checkboxes {
background-color: #f39c12;
}
button#bulk-delete {
background-color: #e74c3c;
}
button#bulk-archive {
background-color: #9b59b6;
} }
.footer { .footer {
@@ -81,46 +127,40 @@ button#bulk-archive {
width: 100%; width: 100%;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
border-top: 1px solid #ccc; border-top: 2px solid #e1e4e8;
padding-top: 10px; padding-top: 15px;
display: flex; /* 添加这一行使得.footer下的直接子元素并排排列 */ display: flex;
justify-content: center; /* 使得子元素在中心对齐 */ justify-content: center;
gap: 10px; /* 如果需要,可以添加这一行以在子元素之间创建一些空间 */ gap: 20px;
}
button#remove-checkboxes {
background-color: #badb34;
border-color: #b6b929;
}
button#toggle-checkboxes {
background-color: #2287da;
border-color: #2758ab;
}
button#bulk-archive {
background-color: #da6922;
border-color: #dc661c;
} }
#sponsorLink { #sponsorLink {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
padding: 10px 20px; padding: 8px 15px;
background-color: #383e46; background-color: #34495e;
border-color: #78838f;
border-radius: 5px; border-radius: 5px;
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
transition: background-color 0.3s ease; transition: all 0.3s ease;
font-weight: 500;
}
#sponsorLink:hover {
background-color: #2c3e50;
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
} }
#sponsorLink .icon-text { #sponsorLink .icon-text {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px;
} }
#sponsorLink:hover { #sponsorLink:hover {
background-color: #993366; background-color: #993366;
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
} }