diff --git a/src/styles/theme.css b/src/styles/theme.css index bfba3a7..893c04b 100644 --- a/src/styles/theme.css +++ b/src/styles/theme.css @@ -1,4 +1,4 @@ -@import './tippy-tailwind.css'; +@import 'tippy.js/dist/tippy.css' layer(components); /* load tailwind forms plugin, used in some components */ @plugin '@tailwindcss/forms'; @@ -68,3 +68,29 @@ cursor: pointer; } } + +@layer components { + .tippy-box[data-theme~='tailwind'] { + @apply border border-gray-800 bg-gray-800 text-gray-50 shadow-2xl dark:border-gray-100 dark:bg-gray-100 dark:text-gray-900; + } + + /* top placement */ + .tippy-box[data-theme~='tailwind'][data-placement^='top'] > .tippy-arrow { + @apply before:border-t-gray-800 dark:before:border-t-gray-100; + } + + /* bottom placement */ + .tippy-box[data-theme~='tailwind'][data-placement^='bottom'] > .tippy-arrow { + @apply before:border-b-gray-800 dark:before:border-b-gray-100; + } + + /* left placement */ + .tippy-box[data-theme~='tailwind'][data-placement^='left'] > .tippy-arrow { + @apply before:border-l-gray-800 dark:before:border-l-gray-100; + } + + /* right placement */ + .tippy-box[data-theme~='tailwind'][data-placement^='right'] > .tippy-arrow { + @apply before:border-r-gray-800 dark:before:border-r-gray-100; + } +} diff --git a/src/styles/tippy-tailwind.css b/src/styles/tippy-tailwind.css deleted file mode 100644 index ca1bcb8..0000000 --- a/src/styles/tippy-tailwind.css +++ /dev/null @@ -1,27 +0,0 @@ -@import 'tippy.js/dist/tippy.css' layer(components); - -@layer components { - .tippy-box[data-theme~='tailwind'] { - @apply border border-gray-800 bg-gray-800 text-gray-50 shadow-2xl dark:border-gray-100 dark:bg-gray-100 dark:text-gray-900; - } - - /* top placement */ - .tippy-box[data-theme~='tailwind'][data-placement^='top'] > .tippy-arrow { - @apply before:border-t-gray-800 dark:before:border-t-gray-100; - } - - /* bottom placement */ - .tippy-box[data-theme~='tailwind'][data-placement^='bottom'] > .tippy-arrow { - @apply before:border-b-gray-800 dark:before:border-b-gray-100; - } - - /* left placement */ - .tippy-box[data-theme~='tailwind'][data-placement^='left'] > .tippy-arrow { - @apply before:border-l-gray-800 dark:before:border-l-gray-100; - } - - /* right placement */ - .tippy-box[data-theme~='tailwind'][data-placement^='right'] > .tippy-arrow { - @apply before:border-r-gray-800 dark:before:border-r-gray-100; - } -}