_dark.scss 18 KB

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