tooltip.css 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. :where([data-pc-name~="tooltip"]) {
  2. @apply absolute max-w-50;
  3. &:where([data-p-position="right"]), &:where([data-p-position="left"]) {
  4. @apply px-1 py-0;
  5. }
  6. &:where([data-p-position="top"]), &:where([data-p-position="bottom"]) {
  7. @apply px-0 py-1;
  8. }
  9. & > :where([data-pc-section~="text"]) {
  10. @apply rounded-md bg-primary-700 px-3 py-2 break-normal whitespace-pre-line
  11. text-surface shadow-[0_4px_6px_-1px_rgba(0,0,0,0.1),0_2px_4px_-2px_rgba(0,0,0,0.1)];
  12. }
  13. & > :where([data-pc-section~="arrow"]) {
  14. @apply absolute h-0 w-0 border-4 border-solid border-transparent;
  15. }
  16. &:where([data-p-position="right"]) > &:where([data-pc-section~="arrow"]) {
  17. @apply -mt-1 border-l-0 border-r-surface-700;
  18. }
  19. &:where([data-p-position="left"]) > &:where([data-pc-section~="arrow"]) {
  20. @apply -mt-1 border-r-0 border-l-surface-700;
  21. }
  22. &:where([data-p-position="top"]) > &:where([data-pc-section~="arrow"]) {
  23. @apply -ml-1 border-b-0 border-y-surface-700;
  24. }
  25. &:where([data-p-position="bottom"]) > &:where([data-pc-section~="arrow"]) {
  26. @apply -ml-1 border-t-0 border-y-surface-700;
  27. }
  28. }