Skip to content

Instantly share code, notes, and snippets.

@kuloud
Created May 17, 2024 05:02
Show Gist options
  • Select an option

  • Save kuloud/f6cfceb424c17c692fe8f518d85bfc06 to your computer and use it in GitHub Desktop.

Select an option

Save kuloud/f6cfceb424c17c692fe8f518d85bfc06 to your computer and use it in GitHub Desktop.
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
div, p {
@apply text-dark1;
}
[type=checkbox],[type=radio] {
@apply border border-dark1 bg-white p-0 cursor-pointer select-none w-5 h-5 rounded appearance-none;
}
[type=checkbox]:checked,[type=radio]:checked {
background-color: currentColor;
background-position: 50%;
background-repeat: no-repeat;
background-size: .55em .55em;
border-color: transparent;
}
[type=radio]:checked {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E");
background-size: 18px 18px;
}
[type=checkbox] {
border-radius: 4px;
}
[type=checkbox]:checked {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3E%3Cpath stroke='%2322FCBA' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3E%3C/svg%3E");
background-size: 9px 9px;
}
[type=radio] {
border-radius: 100%;
}
.scroller {
--scrollbar-color-thumb: theme('colors.gray.400');
--scrollbar-color-track: transparent;
--scrollbar-width: 4px;
}
@supports selector(::-webkit-scrollbar) {
.scroller::-webkit-scrollbar-thumb {
background: var(--scrollbar-color-thumb);
border-radius: 16px;
}
.scroller::-webkit-scrollbar-track {
background: var(--scrollbar-color-track);
}
.scroller::-webkit-scrollbar {
max-width: var(--scrollbar-width);
max-height: var(--scrollbar-width);
}
}
.groupToolTips:hover .absolute {
display: block;
/* transform: translateX(-50%); */
transition: opacity 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes floatUpDown {
0%, 100% {
transform: translateY(2%);
animation-timing-function: cubic-bezier(0.8,0,1,1);
}
50% {
transform: translateY(-2%);
animation-timing-function: cubic-bezier(0,0,0.2,1);
}
}
.animate-float-up-down {
animation: fadeIn 600ms ease-out forwards, floatUpDown 6s infinite;
opacity: 0;
transition: opacity 1s;
}
}
.ant-tooltip {
z-index: 2147483647 !important;
}
/* 隐藏 Ant Design 默认的number输入框控件按钮 */
.ant-input[step="0"]::-webkit-outer-spin-button,
.ant-input[step="0"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment