form-quill-editor.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. @import '../../bootstrap-extended/include'; // Bootstrap includes
  2. @import '../../components/include'; // Components includes
  3. /* Set dropdown font-families */
  4. .ql-toolbar .ql-font span[data-label='Sailec Light']::before {
  5. font-family: 'Sailec Light';
  6. }
  7. .ql-toolbar .ql-font span[data-label='Sofia Pro']::before {
  8. font-family: 'Sofia';
  9. }
  10. .ql-toolbar .ql-font span[data-label='Slabo 27px']::before {
  11. font-family: 'Slabo 27px';
  12. }
  13. .ql-toolbar .ql-font span[data-label='Roboto Slab']::before {
  14. font-family: 'Roboto Slab';
  15. }
  16. .ql-toolbar .ql-font span[data-label='Inconsolata']::before {
  17. font-family: 'Inconsolata';
  18. }
  19. .ql-toolbar .ql-font span[data-label='Ubuntu Mono']::before {
  20. font-family: 'Ubuntu Mono';
  21. }
  22. /* Set content font-families */
  23. .ql-font-sofia {
  24. font-family: 'Sofia';
  25. }
  26. .ql-font-slabo {
  27. font-family: 'Slabo 27px';
  28. }
  29. .ql-font-roboto {
  30. font-family: 'Roboto Slab';
  31. }
  32. .ql-font-inconsolata {
  33. font-family: 'Inconsolata';
  34. }
  35. .ql-font-ubuntu {
  36. font-family: 'Ubuntu Mono';
  37. }
  38. // Quill Editor
  39. .ql-toolbar {
  40. border-color: $custom-control-border-color !important;
  41. .ql-formats {
  42. &:focus,
  43. *:focus {
  44. outline: 0;
  45. }
  46. // button and label hover
  47. .ql-picker-label,
  48. button {
  49. &:hover,
  50. &:focus {
  51. color: $primary !important;
  52. .ql-stroke {
  53. stroke: $primary !important;
  54. }
  55. .ql-fill {
  56. fill: $primary !important;
  57. }
  58. }
  59. &.ql-active {
  60. color: $primary !important;
  61. }
  62. }
  63. .ql-picker-item.ql-selected {
  64. color: $primary !important;
  65. }
  66. // quill dropdown item hover
  67. .ql-picker-options {
  68. .ql-picker-item:hover {
  69. color: $primary !important;
  70. }
  71. .ql-active {
  72. color: $primary !important;
  73. }
  74. }
  75. }
  76. }
  77. .ql-bubble {
  78. .ql-picker {
  79. color: $white !important;
  80. }
  81. // stroke options color
  82. .ql-stroke {
  83. stroke: $white !important;
  84. }
  85. // fill options color
  86. .ql-fill {
  87. fill: $white !important;
  88. }
  89. }
  90. .ql-container {
  91. border-color: $custom-control-border-color !important;
  92. font-family: $font-family-monospace;
  93. }
  94. .ql-editor {
  95. a {
  96. color: $primary;
  97. }
  98. }
  99. // default picker options
  100. .ql-picker {
  101. color: $headings-color !important;
  102. }
  103. // stroke options color
  104. .ql-stroke {
  105. stroke: $headings-color !important;
  106. }
  107. .ql-active {
  108. .ql-stroke {
  109. stroke: $primary !important;
  110. }
  111. .ql-fill {
  112. fill: $primary !important;
  113. }
  114. }
  115. // fill options color
  116. .ql-fill {
  117. fill: $headings-color !important;
  118. }
  119. // Border rounded for editor
  120. .ql-toolbar,
  121. .ql-container {
  122. border-top-right-radius: $border-radius;
  123. border-top-left-radius: $border-radius;
  124. }
  125. .ql-toolbar {
  126. + .ql-container,
  127. .ql-container + & {
  128. // ? If container/toolbar is below container/toolbar add bottom radius
  129. border-bottom-right-radius: $border-radius;
  130. border-bottom-left-radius: $border-radius;
  131. // ? If container/toolbar is above container/toolbar remove top radius
  132. border-top-right-radius: unset;
  133. border-top-left-radius: unset;
  134. }
  135. }
  136. // Dark Layout
  137. .dark-layout {
  138. // Quill Editor
  139. .quill-toolbar,
  140. .ql-toolbar {
  141. background-color: $theme-dark-input-bg;
  142. border-color: $theme-dark-border-color !important;
  143. // toolbar color
  144. .ql-picker {
  145. color: $white !important;
  146. }
  147. .ql-stroke {
  148. stroke: $white !important;
  149. }
  150. .ql-fill {
  151. fill: $white !important;
  152. }
  153. // toolbar options colors
  154. .ql-picker-options,
  155. .ql-picker-label {
  156. background-color: $theme-dark-input-bg;
  157. .ql-active {
  158. color: $primary !important;
  159. }
  160. }
  161. }
  162. .ql-active {
  163. .ql-stroke {
  164. stroke: $primary !important;
  165. }
  166. .ql-fill {
  167. fill: $primary !important;
  168. }
  169. }
  170. .ql-bubble {
  171. .ql-toolbar {
  172. background: $theme-dark-border-color;
  173. border-radius: 2rem;
  174. }
  175. }
  176. .ql-container {
  177. border-color: $theme-dark-border-color !important;
  178. background-color: $theme-dark-input-bg;
  179. }
  180. // syntax color
  181. .ql-editor {
  182. .ql-syntax {
  183. background-color: $theme-dark-body-bg;
  184. }
  185. &.ql-blank {
  186. &:before {
  187. color: $theme-dark-body-color;
  188. }
  189. }
  190. }
  191. }
  192. // RTL
  193. [data-textdirection='rtl'] {
  194. .ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) {
  195. i,
  196. svg {
  197. left: auto !important;
  198. right: 0;
  199. }
  200. }
  201. }