_dark.scss 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845
  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-search--inline .select2-search__field,
  489. .select2-container--default .select2-selection--single .select2-selection__rendered {
  490. color: $body-dark-font-color!important;
  491. }
  492. .select2-container--default .select2-search--dropdown .select2-search__field {
  493. background: $body-dark-bg!important;
  494. color: $body-dark-font-color!important;
  495. }
  496. .select2-container--default .select2-search--dropdown .select2-search__field,
  497. .select2-container--default .select2-selection--multiple {
  498. border-color: $body-dark-border-color!important;
  499. }
  500. //.select2-container--default .select2-selection--multiple .select2-selection__rendered li:first-child.select2-search.select2-search--inline .select2-search__field {
  501. // color: $body-dark-font-color!important;
  502. //}
  503. .select2-container--default .select2-results>.select2-results__options {
  504. background: $body-dark-color!important;
  505. }
  506. .select2-dropdown {
  507. background: $body-dark-color!important;
  508. }
  509. .select2-container--default .select2-results__option[aria-selected=true],
  510. .select2-container--default .select2-results__option--highlighted[aria-selected] {
  511. background: $body-darker-color!important;
  512. color: $body-dark-font-color!important;
  513. }
  514. .dataTables_filter .form-control {
  515. background: $body-dark-table-bg;
  516. color: $body-dark-font-color;
  517. }
  518. // ------ layer
  519. // 滚动条
  520. @include dark-scrollbar('.layui-layer-page .layui-layer-content');
  521. .layui-layer {
  522. background-color: lighten($body-dark-color, 1%)!important;
  523. }
  524. .layui-layer-page {
  525. .layui-layer-btn,
  526. .layui-layer-content{
  527. background-color: $body-dark-modal-bg!important;
  528. }
  529. }
  530. .layui-layer-title {
  531. background-color: lighten($body-dark-color, 1%)!important;
  532. border-bottom: 1px solid $body-dark-border-color!important;
  533. color: $body-dark-font-color!important;
  534. }
  535. .layui-layer-btn1 {
  536. border-color: $body-dark-color!important;
  537. background: $body-dark-color!important;
  538. }
  539. .layui-layer-setwin .layui-layer-min cite:before,
  540. .layui-layer-setwin .layui-layer-max:before,
  541. .layui-layer-setwin .layui-layer-close1:before {
  542. color: $body-dark-font-color!important;
  543. }
  544. .web-uploader {
  545. .placeholder {
  546. border-width: 2px;
  547. border-color: darken($body-dark-font-color, 7%)!important;
  548. }
  549. .filelist li {
  550. background: $body-dark-color!important;
  551. }
  552. .queueList {
  553. border-color: $body-dark-border-color!important;
  554. }
  555. .statusBar .info,
  556. .filelist li p.title {
  557. color: $body-dark-font-color!important;
  558. }
  559. }
  560. // ----- slider
  561. .slider-panel {
  562. background-color: lighten($body-dark-color, 1.1%);
  563. }
  564. .right-side-filter-container .header {
  565. border-color: $body-dark-border-color;
  566. background-color: lighten($body-dark-color, 1.1%);;
  567. }
  568. // ----- sweet2
  569. .swal2-popup {
  570. background: $body-dark-color;
  571. h2 {
  572. color: $body-dark-font-color
  573. }
  574. }
  575. .swal2-content {
  576. color: darken($body-dark-font-color, 1.5%)
  577. }
  578. // ---- quick create
  579. .quick-create {
  580. td {
  581. background-color: $body-dark-modal-bg!important;
  582. color: darken($body-dark-font-color, 5%)
  583. }
  584. }
  585. // ----- iconpicker
  586. @include dark-scrollbar('.iconpicker .iconpicker-items');
  587. .iconpicker-popover.popover .popover-title,
  588. .iconpicker .iconpicker-items,
  589. .iconpicker-popover.popover {
  590. background: $body-dark-color!important;
  591. border-color: $body-dark-border-color!important;
  592. }
  593. .iconpicker-popover.popover .popover-title,
  594. .iconpicker-popover.popover.bottom>.arrow:after,
  595. .iconpicker-popover.popover.bottomRight>.arrow:after, .iconpicker-popover.popover.bottomLeft>.arrow:after {
  596. border-color: $body-dark-color;
  597. }
  598. // ----- alert
  599. .alert.alert-danger {
  600. h3, h4, h5 {
  601. color: $danger;
  602. }
  603. }
  604. .alert.alert-success {
  605. h3, h4, h5 {
  606. color: $success;
  607. }
  608. }
  609. .alert.alert-info {
  610. h3, h4, h5 {
  611. color: $info;
  612. }
  613. }
  614. .alert.alert-primary {
  615. h3, h4, h5 {
  616. color: $primary-darker;
  617. }
  618. }
  619. .alert.alert-warning {
  620. h3, h4, h5 {
  621. color: darken($warning, 5%);
  622. }
  623. }
  624. .callout {
  625. background: darken($body-dark-bg, 3%);
  626. border-color: #8e9aac;
  627. h3, h4, h5 {
  628. color: lighten($body-dark-font-color, 5%);
  629. }
  630. }
  631. // ----- apexcharts
  632. .apexcharts-legend-series {
  633. .apexcharts-legend-text {
  634. color: $body-dark-font-color !important;
  635. }
  636. }
  637. .apexcharts-radialbar-track {
  638. path {
  639. stroke: $body-dark-bg;
  640. }
  641. }
  642. .apexcharts-inner {
  643. polygon {
  644. stroke: $body-dark-table-bg !important;
  645. fill: $body-dark-bg !important;
  646. }
  647. }
  648. .apexcharts-pie-series {
  649. path {
  650. stroke: $body-dark-bg;
  651. }
  652. }
  653. .apexcharts-menu {
  654. background-color: $body-dark-bg;
  655. border: 0;
  656. }
  657. .apexcharts-toolbar {
  658. .apexcharts-zoom-in-icon,
  659. .apexcharts-zoom-out-icon,
  660. .apexcharts-zoom-icon,
  661. .apexcharts-menu-icon,
  662. .apexcharts-reset-zoom-icon {
  663. &:hover {
  664. svg {
  665. fill: $body-dark-font-color;
  666. }
  667. }
  668. }
  669. }
  670. // ---- login
  671. .login-page {
  672. background-color: $body-dark-bg!important;
  673. }
  674. .login-card-body, .register-card-body {
  675. background-color: $body-dark-color;
  676. color: $body-dark-font-color
  677. }
  678. // ----- selector
  679. .custom-data-table .grid-selector {
  680. .wrap {
  681. background-color: $body-dark-color;
  682. }
  683. .select-label {
  684. color: darken($body-dark-font-color, 5%);
  685. }
  686. ul > li a {
  687. color: $body-dark-font-color;
  688. }
  689. .select-options a.active {
  690. color: $primary
  691. }
  692. }
  693. // ----- switchery
  694. .switchery {
  695. background-color: lighten($body-dark-font-color, 4%)!important;
  696. border-color: lighten($body-dark-font-color, 4%)!important;
  697. box-shadow: $shadow-200;
  698. }
  699. .switchery>small {
  700. background-color: lighten($body-dark-font-color, 10%)!important;
  701. }
  702. // ----- rwd table
  703. //.no-touch .dropdown-menu>.checkbox-row:active,
  704. .dropdown-menu li.checkbox-row:hover {
  705. background-color: $body-darker-color!important;
  706. }
  707. // ---- step
  708. .dcat-step {
  709. .dcat-step-title {
  710. color: $body-dark-font-color;
  711. }
  712. .active > .dcat-step-item-container > .dcat-step-content > .dcat-step-title,
  713. .done > .dcat-step-item-container > .dcat-step-content > .dcat-step-title {
  714. color: lighten($body-dark-font-color, 8%);
  715. }
  716. .dcat-step-icons {
  717. border-color: lighten($body-dark-font-color, 4%);
  718. > .dcat-step-icon {
  719. color: lighten($body-dark-font-color, 4%);
  720. }
  721. }
  722. .dcat-step-title:after {
  723. background-color: $body-dark-font-color;
  724. }
  725. .active > .dcat-step-item-container > .dcat-step-content > .dcat-step-title:after {
  726. background-color: lighten($body-dark-font-color, 4%);
  727. }
  728. .done .dcat-step-icons {
  729. background-color: transparent;
  730. border-color: $primary;
  731. }
  732. .done .dcat-step-icons > .dcat-step-icon {
  733. color: $primary
  734. }
  735. }
  736. .dcat-done-step .st-title {
  737. color: $body-dark-heading-color
  738. }
  739. .dcat-done-step .st-desc {
  740. color: $body-dark-font-color;
  741. }
  742. // ------- fixed-columns
  743. @include dark-scrollbar('.table-main');
  744. .table-fixed-left {
  745. box-shadow: 6px 0 5px -5px rgba(0,0,0,.24);
  746. }
  747. .table-fixed-right {
  748. box-shadow: -5px 0 5px -5px rgba(0,0,0,.24);
  749. }
  750. }