index.less 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. @import "~antd/lib/style/themes/default.less";
  2. .header {
  3. padding: 0 12px 0 0;
  4. background: #fff;
  5. box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
  6. position: relative;
  7. }
  8. :global {
  9. .ant-layout {
  10. overflow-x: hidden;
  11. }
  12. }
  13. .logo {
  14. height: 64px;
  15. line-height: 58px;
  16. vertical-align: top;
  17. display: inline-block;
  18. padding: 0 0 0 24px;
  19. cursor: pointer;
  20. font-size: 20px;
  21. img {
  22. display: inline-block;
  23. vertical-align: middle;
  24. }
  25. }
  26. .menu {
  27. :global(.anticon) {
  28. margin-right: 8px;
  29. }
  30. :global(.ant-dropdown-menu-item) {
  31. text-align: center;
  32. width: 100%;
  33. }
  34. }
  35. i.trigger {
  36. font-size: 20px;
  37. line-height: 64px;
  38. cursor: pointer;
  39. transition: all .3s, padding 0s;
  40. padding: 0 24px;
  41. &:hover {
  42. background: @primary-1;
  43. }
  44. }
  45. .right {
  46. float: right;
  47. height: 100%;
  48. .action {
  49. cursor: pointer;
  50. padding: 0 12px;
  51. display: inline-block;
  52. transition: all .3s;
  53. height: 100%;
  54. > i {
  55. font-size: 16px;
  56. vertical-align: middle;
  57. }
  58. &:global(.ant-popover-open),
  59. &:hover {
  60. background: @primary-1;
  61. }
  62. }
  63. .search {
  64. padding: 0;
  65. margin: 0 12px;
  66. &:hover {
  67. background: transparent;
  68. }
  69. }
  70. .account {
  71. .avatar {
  72. margin: 20px 8px 20px 0;
  73. color: @primary-color;
  74. background: rgba(255, 255, 255, .85);
  75. vertical-align: middle;
  76. }
  77. }
  78. }
  79. @media only screen and (max-width: @screen-md) {
  80. .header {
  81. :global(.ant-divider-vertical) {
  82. vertical-align: unset;
  83. }
  84. .name {
  85. display: none;
  86. }
  87. i.trigger {
  88. padding: 0 12px;
  89. }
  90. .logo {
  91. padding-right: 12px;
  92. position: relative;
  93. }
  94. .right {
  95. position: absolute;
  96. right: 12px;
  97. top: 0;
  98. background: #fff;
  99. .account {
  100. .avatar {
  101. margin-right: 0;
  102. }
  103. }
  104. }
  105. }
  106. }