_dark.scss 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. @mixin dark-scrollbar($selector) {
  2. #{$selector}::-webkit-scrollbar {
  3. width: 12px;
  4. }
  5. #{$selector}::-webkit-scrollbar-track {
  6. background-color: $body-dark-bg;
  7. }
  8. #{$selector}::-webkit-scrollbar-thumb {
  9. background-color: $body-darker-color;
  10. border-radius: .4rem;
  11. }
  12. }
  13. @include dark-scrollbar('body.dark-mode');
  14. body.dark-mode {
  15. background-color: $body-dark-bg;
  16. color: $body-dark-font-color;
  17. .content-wrapper, .main-footer {
  18. background: $body-dark-bg;
  19. }
  20. .bg-white {
  21. background: $body-dark-bg!important;
  22. }
  23. a {
  24. color: lighten($primary, 1%);
  25. &:hover {
  26. color: darken($primary, 4%);
  27. }
  28. }
  29. .grid-column-header a {
  30. color: darken($body-dark-font-color, 15%);
  31. }
  32. .grid-column-header a:hover, .grid-column-header a.active {
  33. color: lighten($primary, 1%);
  34. }
  35. h1, h2, h3, h4, h5, h6 {
  36. color: $body-dark-heading-color;
  37. }
  38. p, small, label {
  39. color: $body-dark-font-color;
  40. }
  41. .label {
  42. color: darken($white, 2.5%);
  43. }
  44. .dcat-loading {
  45. background-color: inherit!important;
  46. }
  47. // ------- button
  48. .btn.btn-white,
  49. .btn.btn-default,
  50. .btn.btn-light {
  51. color: $body-dark-font-color;
  52. background-color: $body-dark-color;
  53. border-color: $body-dark-color;
  54. }
  55. .btn.btn-white:hover,
  56. .btn.btn-white:focus,
  57. .btn.btn-default:hover,
  58. .btn.btn-light:hover {
  59. color: lighten($body-dark-font-color, 2%)!important;
  60. }
  61. .btn.btn-light,
  62. .bg-light {
  63. color: $body-dark-font-color!important;
  64. background-color: $body-dark-bg!important;
  65. border-color: $body-dark-bg!important;
  66. }
  67. .bg-default {
  68. background-color: $body-dark-color!important;
  69. color: $body-dark-font-color!important;
  70. }
  71. .btn-light:hover, .btn-light:focus {
  72. color: lighten($body-dark-font-color, 1.2%)!important;
  73. }
  74. .btn.btn-primary:not(.btn-outline),
  75. .btn.btn-warning:not(.btn-outline),
  76. .btn.btn-success:not(.btn-outline),
  77. .btn.btn-info:not(.btn-outline),
  78. .btn.btn-danger:not(.btn-outline),
  79. .btn.btn-custom:not(.btn-outline) {
  80. color: darken($white, 8%)
  81. }
  82. hr {
  83. border-color: $body-dark-border-color;
  84. }
  85. // ------ pre
  86. pre {
  87. background-color: $body-dark-color;
  88. border: 0;
  89. color: $body-dark-font-color;
  90. code {
  91. background-color: inherit;
  92. .operator,
  93. .url {
  94. background-color: $body-content-dark-bg;
  95. }
  96. }
  97. }
  98. code {
  99. background-color: $body-content-dark-bg;
  100. color: $gray-600!important;
  101. }
  102. kbd {
  103. background-color: $body-content-dark-bg;
  104. }
  105. .text-dark {
  106. color: $gray-600 !important;
  107. }
  108. .header-navbar {
  109. background-color: $body-dark-color;
  110. .navbar-container {
  111. .nav {
  112. .nav-item {
  113. .nav-link {
  114. color: $body-dark-font-color;
  115. background-color: transparent;
  116. i {
  117. color: $body-dark-font-color;
  118. }
  119. }
  120. }
  121. }
  122. }
  123. &.navbar-static-top {
  124. background-color: transparent;
  125. }
  126. &[class*="bg-"] {
  127. .navbar-nav {
  128. .nav-item {
  129. .nav-link {
  130. background-color: inherit;
  131. }
  132. }
  133. }
  134. }
  135. }
  136. // ------ dropdown
  137. .dropdown-toggle {
  138. &:hover {
  139. i,
  140. &:after {
  141. color: $white;
  142. }
  143. }
  144. }
  145. .dropdown .dropdown-menu {
  146. box-shadow: $shadow-200;
  147. }
  148. .dropdown-menu {
  149. background-color: $body-dark-color;
  150. &:before {
  151. background: $body-dark-color;
  152. }
  153. .dropdown-item:hover,
  154. .dropdown-item:focus {
  155. background: $body-darker-color;
  156. }
  157. .dropdown-item {
  158. color: $body-dark-font-color;
  159. }
  160. .form-control {
  161. background-color: $body-dark-color;
  162. }
  163. .dropdown-divider {
  164. border-color: $body-dark-border-color;
  165. }
  166. }
  167. .dropdown-item a, .dropdown-menu label {
  168. color: $body-dark-font-color;
  169. }
  170. .modal {
  171. .modal-header,
  172. .modal-header[class*="bg-"] {
  173. border-color: $body-dark-border-color;
  174. background-color: lighten($body-dark-color, 1%);
  175. .close {
  176. span {
  177. color: $white50;
  178. }
  179. }
  180. }
  181. .modal-content,
  182. .modal-body,
  183. .modal-footer {
  184. background-color: lighten($body-dark-color, 1%);
  185. }
  186. }
  187. .pagination {
  188. &:not([class*="pagination-"]) {
  189. .page-item {
  190. &.active {
  191. background-color: $body-content-dark-bg;
  192. .page-link {
  193. &:hover {
  194. color: $white;
  195. }
  196. }
  197. }
  198. .page-link {
  199. background-color: $body-content-dark-bg;
  200. color: $body-dark-font-color;
  201. }
  202. &.prev-item,
  203. &.next-item {
  204. .page-link:hover {
  205. color: $white;
  206. }
  207. }
  208. }
  209. }
  210. &[class*="pagination-"] {
  211. .page-item:not(.active):not(:hover) {
  212. .page-link {
  213. background-color: $body-darker-color;
  214. color: $body-dark-font-color;
  215. }
  216. }
  217. .page-item {
  218. &:not(.active) {
  219. .page-link:hover {
  220. background-color: $body-content-dark-bg;
  221. }
  222. }
  223. &.active {
  224. background-color: $body-dark-color;
  225. }
  226. }
  227. }
  228. }
  229. .nav {
  230. .nav-item {
  231. .nav-link {
  232. color: $body-dark-font-color;
  233. //&.active,
  234. //&:hover {
  235. // color: $primary;
  236. //}
  237. }
  238. }
  239. }
  240. // ------ popover
  241. .popover {
  242. &[x-placement="top"] {
  243. .arrow {
  244. &:after {
  245. border-top-color: $body-dark-color;
  246. }
  247. }
  248. }
  249. &[x-placement="bottom"] {
  250. .arrow {
  251. &:after {
  252. border-bottom-color: $body-dark-color;
  253. }
  254. }
  255. }
  256. &[x-placement="left"] {
  257. .arrow {
  258. &:after {
  259. border-left-color: $body-dark-color;
  260. }
  261. }
  262. }
  263. &[x-placement="right"] {
  264. .arrow {
  265. &:after {
  266. border-right-color: $body-dark-color;
  267. }
  268. }
  269. }
  270. .popover-body {
  271. background-color: $body-dark-color;
  272. color: $body-dark-font-color;
  273. }
  274. }
  275. // ------ tab
  276. .nav.nav-tabs {
  277. border-color: lighten($body-dark-border-color, 10%);
  278. }
  279. // ------ table
  280. @include dark-scrollbar('.table-responsive[data-pattern=priority-columns]');
  281. .table.default-table td,
  282. .table.default-table th {
  283. border-color: $body-dark-border-color!important;
  284. }
  285. .table.default-table {
  286. th {
  287. background: darken($body-dark-bg, 3%);
  288. }
  289. }
  290. .table {
  291. background-color: $body-dark-table-bg;
  292. padding: 0 1rem;
  293. th, td {
  294. border-color: $body-dark-border-color;
  295. }
  296. .thead,
  297. tbody {
  298. tr:not([class*="table-"]) {
  299. th,
  300. td {
  301. border: 0;
  302. color: $body-dark-font-color;
  303. code {
  304. background-color: $body-dark-color;
  305. }
  306. }
  307. }
  308. }
  309. thead {
  310. tr {
  311. th {
  312. border: 0;
  313. background-color: $body-dark-table-bg;
  314. color: $body-dark-font-color;
  315. }
  316. }
  317. }
  318. tbody {
  319. tr {
  320. background: $body-content-dark-bg!important;
  321. &[class*="table-"] {
  322. td,
  323. th {
  324. background-color: unset;
  325. color: $black;
  326. border-color: $body-dark-border-color;
  327. }
  328. }
  329. &.table-dark {
  330. td,
  331. th {
  332. color: $white;
  333. }
  334. }
  335. &.table-active {
  336. td,
  337. th {
  338. color: $body-dark-font-color;
  339. }
  340. }
  341. th {
  342. background-color: $body-content-dark-bg;
  343. }
  344. td {
  345. background-color: $body-content-dark-bg;
  346. color: $body-dark-font-color;
  347. }
  348. }
  349. }
  350. &.table-bordered {
  351. border: 1px solid $body-dark-border-color;
  352. thead,
  353. tbody {
  354. tr {
  355. th,
  356. td {
  357. border: 1px solid $body-dark-border-color;
  358. }
  359. }
  360. }
  361. }
  362. &.table-hover {
  363. tbody {
  364. tr {
  365. &:hover {
  366. background-color: $body-dark-color;
  367. }
  368. th,
  369. td {
  370. background-color: unset;
  371. }
  372. }
  373. }
  374. }
  375. &.table-striped {
  376. tbody {
  377. tr {
  378. &:nth-of-type(odd) {
  379. background-color: $body-dark-color;
  380. }
  381. td,
  382. th {
  383. background-color: unset;
  384. }
  385. }
  386. }
  387. }
  388. }
  389. .table.table-bordered {
  390. padding: 0;
  391. }
  392. .card, .box {
  393. background: $body-dark-color;
  394. }
  395. .box.box-solid.box-default {
  396. background-color: $body-dark-bg;
  397. }
  398. .dd-handle,
  399. .card.dcat-box .card-header,
  400. .box-header.with-border,
  401. .with-border,
  402. .box.box-solid.box-default {
  403. border-bottom: 1px solid $body-dark-border-color;
  404. border-color: $body-dark-border-color!important;
  405. }
  406. .box .box-footer, .card .box-footer {
  407. border-color: $body-dark-border-color;
  408. }
  409. .dd-handle {
  410. background: darken($body-dark-bg, 2%);
  411. color: $body-dark-font-color
  412. }
  413. .dd-item > button:before {
  414. color: $body-dark-font-color
  415. }
  416. // ----- 滚动条
  417. // ----- form
  418. .input-group-prepend,
  419. .input-group-append,
  420. .input-group-addon,
  421. .input-group-text {
  422. background-color: $body-dark-bg;
  423. border-color: $body-dark-border-color;
  424. color: $body-dark-font-color!important;
  425. }
  426. input::-webkit-input-placeholder{
  427. color: darken($body-dark-font-color, 1.2%)!important;
  428. }
  429. input:-moz-placeholder{
  430. color: darken($body-dark-font-color, 1.2%)!important;
  431. }
  432. input::-moz-placeholder{
  433. color: darken($body-dark-font-color, 1.2%)!important;
  434. }
  435. input:-ms-input-placeholder {
  436. color: darken($body-dark-font-color, 1.2%)!important;
  437. }
  438. .help-block {
  439. color: darken($body-dark-font-color, 1.2%)!important;
  440. }
  441. @include dark-scrollbar('.select2-container--default .select2-results>.select2-results__options');
  442. .select2-container--default .select2-selection--single,
  443. .select2-container--default .select2-selection--multiple,
  444. .form-control {
  445. background: $body-dark-bg;
  446. color: $body-dark-font-color!important;
  447. border-color: $body-dark-border-color!important;
  448. }
  449. .select2-container--default .select2-selection--single .select2-selection__rendered {
  450. color: $body-dark-font-color!important;
  451. }
  452. .select2-container--default .select2-search--dropdown .select2-search__field {
  453. background: $body-dark-bg!important;
  454. color: $body-dark-font-color!important;
  455. }
  456. .select2-container--default .select2-search--dropdown .select2-search__field,
  457. .select2-container--default .select2-selection--multiple {
  458. border-color: $body-dark-border-color!important;
  459. }
  460. //.select2-container--default .select2-selection--multiple .select2-selection__rendered li:first-child.select2-search.select2-search--inline .select2-search__field {
  461. // color: $body-dark-font-color!important;
  462. //}
  463. .select2-container--default .select2-results>.select2-results__options {
  464. background: $body-dark-color!important;
  465. }
  466. .select2-dropdown {
  467. background: $body-dark-color!important;
  468. }
  469. .select2-container--default .select2-results__option[aria-selected=true],
  470. .select2-container--default .select2-results__option--highlighted[aria-selected] {
  471. background: $body-darker-color!important;
  472. color: $body-dark-font-color!important;
  473. }
  474. .dataTables_filter .form-control {
  475. background: $body-dark-table-bg;
  476. color: $body-dark-font-color;
  477. }
  478. // 滚动条
  479. @include dark-scrollbar('.layui-layer-page .layui-layer-content');
  480. .layui-layer {
  481. background-color: lighten($body-dark-color, 1%)!important;
  482. }
  483. .layui-layer-title {
  484. background-color: lighten($body-dark-color, 1%)!important;
  485. border-bottom: 1px solid $body-dark-border-color!important;
  486. color: $body-dark-font-color!important;
  487. }
  488. .layui-layer-btn1 {
  489. border-color: $body-dark-color!important;
  490. background: $body-dark-color!important;
  491. }
  492. .layui-layer-setwin .layui-layer-min cite:before,
  493. .layui-layer-setwin .layui-layer-max:before,
  494. .layui-layer-setwin .layui-layer-close1:before {
  495. color: $body-dark-font-color!important;
  496. }
  497. .web-uploader {
  498. .placeholder {
  499. border-width: 2px;
  500. border-color: darken($body-dark-font-color, 7%)!important;
  501. }
  502. .filelist li {
  503. background: $body-dark-color!important;
  504. }
  505. .queueList {
  506. border-color: $body-dark-border-color!important;
  507. }
  508. .statusBar .info,
  509. .filelist li p.title {
  510. color: $body-dark-font-color!important;
  511. }
  512. }
  513. // ----- slider
  514. .slider-panel {
  515. background-color: lighten($body-dark-color, 1.1%);
  516. }
  517. .right-side-filter-container .header {
  518. border-color: $body-dark-border-color;
  519. background-color: lighten($body-dark-color, 1.1%);;
  520. }
  521. // ----- sweet2
  522. .swal2-popup {
  523. background: $body-dark-color;
  524. h2 {
  525. color: $body-dark-font-color
  526. }
  527. }
  528. .swal2-content {
  529. color: darken($body-dark-font-color, 1.5%)
  530. }
  531. // ---- quick create
  532. .quick-create {
  533. td {
  534. background-color: lighten($body-dark-color, 3%)!important;
  535. color: darken($body-dark-font-color, 5%)
  536. }
  537. }
  538. // ----- iconpicker
  539. @include dark-scrollbar('.iconpicker .iconpicker-items');
  540. .iconpicker-popover.popover .popover-title,
  541. .iconpicker .iconpicker-items,
  542. .iconpicker-popover.popover {
  543. background: $body-dark-color!important;
  544. border-color: $body-dark-border-color!important;
  545. }
  546. .iconpicker-popover.popover .popover-title,
  547. .iconpicker-popover.popover.bottom>.arrow:after,
  548. .iconpicker-popover.popover.bottomRight>.arrow:after, .iconpicker-popover.popover.bottomLeft>.arrow:after {
  549. border-color: $body-dark-color;
  550. }
  551. // ----- alert
  552. .alert.alert-danger {
  553. h3, h4, h5 {
  554. color: $danger;
  555. }
  556. }
  557. .alert.alert-success {
  558. h3, h4, h5 {
  559. color: $success;
  560. }
  561. }
  562. .alert.alert-info {
  563. h3, h4, h5 {
  564. color: $info;
  565. }
  566. }
  567. .alert.alert-primary {
  568. h3, h4, h5 {
  569. color: $primary-darker;
  570. }
  571. }
  572. .alert.alert-warning {
  573. h3, h4, h5 {
  574. color: darken($warning, 5%);
  575. }
  576. }
  577. .callout {
  578. background: darken($body-dark-bg, 3%);
  579. border-color: #8e9aac;
  580. h3, h4, h5 {
  581. color: lighten($body-dark-font-color, 5%);
  582. }
  583. }
  584. // ----- apexcharts
  585. .apexcharts-legend-series {
  586. .apexcharts-legend-text {
  587. color: $body-dark-font-color !important;
  588. }
  589. }
  590. .apexcharts-radialbar-track {
  591. path {
  592. stroke: $body-dark-bg;
  593. }
  594. }
  595. .apexcharts-inner {
  596. polygon {
  597. stroke: $body-dark-table-bg !important;
  598. fill: $body-dark-bg !important;
  599. }
  600. }
  601. .apexcharts-pie-series {
  602. path {
  603. stroke: $body-dark-bg;
  604. }
  605. }
  606. .apexcharts-menu {
  607. background-color: $body-dark-bg;
  608. border: 0;
  609. }
  610. .apexcharts-toolbar {
  611. .apexcharts-zoom-in-icon,
  612. .apexcharts-zoom-out-icon,
  613. .apexcharts-zoom-icon,
  614. .apexcharts-menu-icon,
  615. .apexcharts-reset-zoom-icon {
  616. &:hover {
  617. svg {
  618. fill: $body-dark-font-color;
  619. }
  620. }
  621. }
  622. }
  623. }