Tailwind Help #160
Replies: 5 comments 1 reply
-
hi, first of all thank you for this, how to apply tailwind dark mode? |
Beta Was this translation helpful? Give feedback.
-
Link is broken |
Beta Was this translation helpful? Give feedback.
-
I can't get this to work on my Rails 6 + Tailwind App! |
Beta Was this translation helpful? Give feedback.
-
Laravel livewire and tailwind (Light and Dark mode) .ts-control {
@apply !p-2.5;
}
.ts-wrapper:focus {
@apply rounded;
}
.ts-dropdown-content:focus {
@apply shadow-xl;
}
.ts-wrapper.plugin-remove_button .item {
@apply rounded-md;
}
.ts-wrapper.multi .ts-control > div {
@apply p-0 m-0 pl-1;
}
.ts-wrapper.plugin-remove_button .item .remove {
@apply border-none text-lg leading-none py-1 rounded-r-lg;
}
.ts-dropdown {
@apply rounded-md border border-solid border-t border-gray-300 dark:border-gray-600 shadow-xl;
}
.ts-dropdown [data-selectable].option:first-child {
@apply rounded-t-md;
}
.ts-dropdown [data-selectable].option:last-child {
@apply rounded-b-md;
}
.ts-dropdown .create:hover,
.ts-dropdown .option:hover,
.ts-dropdown .active {
@apply bg-blue-600 text-white dark:text-white;
}
.ts-wrapper .option .title {
display: block;
}
.ts-wrapper .option .url {
font-size: 12px;
display: block;
color: #a0a0a0;
}
.ts-dropdown-content {
@apply bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white;
}
.customDropDown {
@apply bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white cursor-default;
}
.ts-dropdown-content {
@apply border-gray-300 dark:border-gray-600;
border-radius: inherit;
}
.ts-wrapper.single .ts-control, .ts-dropdown.single {
border-radius: 8px !important;
@apply dark:bg-gray-700 dark:border-gray-600 bg-gray-50 border-gray-300 !important;
}
.item {
@apply text-gray-900 dark:text-white;
}
.ts-wrapper.single .ts-control {
box-shadow: none !important;
background-image: none !important;
} |
Beta Was this translation helpful? Give feedback.
-
You can see something I've done on this subject : #693 |
Beta Was this translation helpful? Give feedback.
-
For those trying to get a Tailwind theme/styles applied this might help. This is how I got it looking:
In Webpack or webpacker import tom select and plugins:
Then in your custom stylesheet file (stylesheets/tom-select) apply the tailwind classes you need to the selectors
The full list of classes is here: https://github.com/orchidjs/tom-select/blob/master/dist/css/tom-select.css but that got me as far as I needed.
Beta Was this translation helpful? Give feedback.
All reactions