Files
ColdBreeze-chat-web/src/assets/index.css
T
2023-02-07 09:25:05 +08:00

239 lines
5.1 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.flex-center {
@apply flex items-center justify-center;
}
}
@layer utilities {
.checkbox {
appearance: none;
margin: 0;
}
.checkbox::before {
content: "";
display: block;
width: 10px;
height: 10px;
margin: 4px;
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
transform: scale(0);
transform-origin: bottom left;
transition: 120ms transform ease-in-out;
box-shadow: inset 10px 10px #1fe1f9;
}
.checkbox:checked::before {
transform: scale(1);
}
/* markdown editor */
.md-editor {
position: relative;
width: 100%;
/* width: -webkit-fill-available; */
margin-top: 16px;
grid-column: span 2;
}
.md-editor > div {
transition: height 0.5s ease 0s;
}
.md-editor .toastui-editor-defaultUI {
border-bottom: none;
border-radius: 0;
border-top: 1px solid #d0d5dd;
border-left: none;
border-right: none;
}
.md-editor .toastui-editor {
padding: 16px 0;
}
.md-editor .toastui-editor [contenteditable="true"] {
padding: 0;
}
.md-editor .toastui-editor-md-preview {
padding-top: 16px;
}
.md-editor .toastui-editor-md-preview .toastui-editor-contents {
padding: 0;
}
.md-editor .toastui-editor-toolbar {
display: none;
}
.md-editor .send {
position: absolute;
bottom: 15px;
right: 15px;
}
/* setting container */
.setting-container {
position: relative;
width: 512px;
height: 100%;
display: flex;
flex-direction: column;
gap: 24px;
}
.setting-container .inputs {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 32px;
}
.setting-container .inputs .input {
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 16px;
}
.setting-container .inputs .input .row {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.setting-container .inputs .input .row.inputs {
flex-direction: column;
gap: 8px;
}
.setting-container .inputs .input .row .title {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.setting-container .inputs .input .row .title .txt {
display: flex;
flex-direction: row;
align-items: center;
gap: 8px;
}
.setting-container .inputs .input .row .title .txt .icon {
cursor: pointer;
}
.setting-container .inputs .input .row .title .desc {
font-weight: 400;
font-size: 14px;
line-height: 20px;
color: #667085;
}
.setting-container .tip {
display: flex;
gap: 8px;
align-items: center;
}
.setting-container .tip .link {
font-weight: 600;
font-size: 14px;
line-height: 20px;
color: #06b6d4;
}
/* context menu */
.context-menu {
display: flex;
flex-direction: column;
gap: 2px;
padding: 4px;
background-color: #fff;
box-shadow: 0 20px 25px 20px rgba(31, 41, 55, 0.1), 0 10px 10px rgba(31, 41, 55, 0.04);
border-radius: 12px;
min-width: 200px;
}
.context-menu .item {
position: relative;
display: flex;
align-items: center;
gap: 14px;
white-space: nowrap;
cursor: pointer;
border-radius: 6px;
padding: 6px;
font-style: normal;
font-weight: 600;
font-size: 14px;
line-height: 20px;
color: #616161;
}
.context-menu .item .icon {
width: 20px;
height: 20px;
}
.context-menu .item .icon path {
fill: #475467;
}
.context-menu .item.sb {
justify-content: space-between;
}
.context-menu .item:hover {
background-color: #22ccee;
color: #fff;
}
.context-menu .item:hover .icon path {
fill: #fff;
}
.context-menu .item.bottom_line {
margin-bottom: 9px;
}
.context-menu .item.bottom_line:before {
position: absolute;
content: "";
left: 6px;
bottom: -4px;
display: block;
padding: 0 6px;
box-sizing: border-box;
width: calc(88%);
height: 1px;
background-color: #f2f4f7;
}
.context-menu .item.danger {
color: #a11043;
}
.context-menu .item.danger:hover {
background-color: #b42318;
color: #fff;
}
.context-menu .item[data-disabled="true"] {
color: #a4a8b3;
}
.context-menu .item[data-disabled="true"] .icon path {
fill: #a4a8b3;
}
/* text fill transparent */
.text-fill-transparent {
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-fill-color: transparent;
}
}
/* 全局设置滚动条 */
::-webkit-scrollbar-thumb {
background: #ddd;
border-radius: 4px;
}
::-webkit-scrollbar {
background: transparent;
width: 5px;
height: 5px;
}
html.dark ::-webkit-scrollbar-thumb {
background: #1c1c1e;
}
:root {
/* border radius */
--br: 8px;
---navs-bg: #e5e7eb;
---body-bg: #f5f6f7;
---chat-bg: #fff;
---channel-text-color: #1c1c1e;
---msg-text-color: #374151;
}
/* overrides */
#MARKDOWN_CONTAINER .toastui-editor-contents {
display: flex;
flex-direction: column;
align-items: flex-start;
}