_dark.scss 19 KB

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