_dark.scss 18 KB

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