Skip to content

Commit 8d6f133

Browse files
committed
fix: add support of dark theme for the table
1 parent 5e33c6e commit 8d6f133

1 file changed

Lines changed: 98 additions & 0 deletions

File tree

custom/quillEditor.vue

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,105 @@ function removeCompletionOnBlur() {
712712
713713
}
714714
715+
.ql-table-button-disabled {
716+
background-color: theme('colors.lightInputBackground') !important;
717+
svg path {
718+
opacity: 0.5;
719+
}
720+
svg .ql-stroke, svg .ql-fill {
721+
stroke: theme('colors.lightPrimary') !important;
722+
opacity: 0.5 !important;
723+
}
724+
}
725+
726+
.dark .ql-table-button-disabled {
727+
background-color: theme('colors.darkInputBackground') !important;
728+
svg path {
729+
opacity: 0.5;
730+
}
731+
svg .ql-stroke, svg .ql-fill {
732+
stroke: theme('colors.darkPrimary') !important;
733+
opacity: 0.5 !important;
734+
}
735+
}
736+
737+
.ql-table-better svg path {
738+
@apply dark:fill-darkPrimary;
739+
@apply fill-lightPrimary;
740+
}
741+
742+
.ql-table-select-container {
743+
@apply dark:bg-darkForm;
744+
@apply bg-lightForm;
745+
}
746+
747+
.ql-table-select-label {
748+
@apply dark:text-darkInputText;
749+
@apply text-lightInputText;
750+
}
751+
752+
.ql-table-select-list span {
753+
@apply dark:border-darkInputBorder;
754+
@apply border-lightInputBorder;
755+
@apply bg-lightInputBackground;
756+
@apply dark:bg-darkInputBackground;
757+
}
758+
759+
.ql-table-menus-container, .ql-table-dropdown-list {
760+
@apply dark:bg-darkForm;
761+
@apply bg-lightForm;
762+
@apply dark:border-darkInputBorder;
763+
@apply border-lightInputBorder;
764+
765+
.ql-table-dropdown svg path {
766+
@apply fill-lightPrimary;
767+
@apply dark:fill-darkPrimary;
768+
@apply stroke-lightInputText;
769+
@apply dark:stroke-darkInputText;
770+
}
715771
772+
.ql-table-dropdown[data-category="delete"] svg path {
773+
@apply fill-lightForm;
774+
@apply dark:fill-darkForm;
775+
@apply stroke-lightPrimary;
776+
@apply dark:stroke-darkPrimary;
777+
}
778+
779+
.ql-table-dropdown[data-category="delete"]:hover svg path {
780+
@apply fill-lightInputBackground;
781+
@apply dark:fill-darkInputBackground;
782+
}
716783
784+
.ql-table-dropdown > span.ql-table-tooltip-hover svg:nth-of-type(2) path {
785+
@apply fill-lightForm stroke-lightPrimary;
786+
@apply dark:fill-darkForm dark:stroke-darkPrimary;
787+
}
788+
789+
.ql-table-dropdown:hover > span.ql-table-tooltip-hover svg:nth-of-type(2) path {
790+
@apply fill-lightInputBackground stroke-lightPrimary;
791+
@apply dark:fill-darkInputBackground dark:stroke-darkPrimary;
792+
}
793+
794+
}
795+
796+
.ql-table-dropdown, li {
797+
&:hover {
798+
@apply dark:bg-darkInputBackground;
799+
@apply bg-lightInputBackground;
800+
}
801+
}
802+
803+
.ql-table-switch-inner[aria-checked="true"] {
804+
@apply dark:bg-darkPrimary;
805+
@apply bg-lightPrimary;
806+
}
807+
808+
.ql-table-triangle-down::before, .ql-table-triangle-down::after {
809+
border-bottom: theme('colors.lightForm') !important;
810+
}
811+
812+
.dark .ql-table-triangle-down::before,.dark .ql-table-triangle-down::after {
813+
border-bottom: theme('colors.darkForm') !important;
814+
}
717815
718816
</style>

0 commit comments

Comments
 (0)