style.css 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. body {
  2. min-width: 20rem;
  3. }
  4. .logo {
  5. margin-top: 1rem;
  6. text-align: center;
  7. img {
  8. width: 4em;
  9. }
  10. &.disabled > img {
  11. opacity: .5;
  12. }
  13. }
  14. .menu {
  15. border-top: 1px solid silver;
  16. &-item {
  17. position: relative;
  18. display: flex;
  19. align-items: center;
  20. height: 2rem;
  21. padding-left: 1rem;
  22. padding-right: 1rem;
  23. cursor: pointer;
  24. text-align: center;
  25. white-space: nowrap;
  26. .submenu & {
  27. text-align: left;
  28. }
  29. &.disabled {
  30. color: gray;
  31. &:hover {
  32. color: silver;
  33. }
  34. }
  35. &:hover {
  36. background: cornflowerblue;
  37. color: white;
  38. }
  39. .icon {
  40. flex: 0 0 1rem;
  41. }
  42. > .icon:first-child {
  43. margin-right: 1rem;
  44. }
  45. > .flex-auto {
  46. &:first-child {
  47. padding-left: 1rem;
  48. }
  49. &:last-child {
  50. padding-right: 1rem;
  51. }
  52. }
  53. > .flex-1 {
  54. padding-right: 2rem;
  55. }
  56. }
  57. &.expand {
  58. background: #fbfbfb;
  59. > .submenu {
  60. display: block;
  61. }
  62. .icon-collapse {
  63. transform: rotateZ(90deg);
  64. }
  65. }
  66. }
  67. .submenu {
  68. display: none;
  69. min-height: 4rem;
  70. max-height: 16rem;
  71. margin-left: 2rem;
  72. overflow-y: auto;
  73. background: white;
  74. border-top: 1px dashed #ddd;
  75. > * {
  76. position: relative;
  77. &:not(:hover) > .submenu-buttons {
  78. visibility: hidden;
  79. }
  80. }
  81. &-buttons {
  82. display: flex;
  83. position: absolute;
  84. top: .3rem;
  85. right: 1rem;
  86. }
  87. &-button {
  88. padding: .2rem;
  89. background: white;
  90. cursor: pointer;
  91. &:hover {
  92. color: white;
  93. background: cornflowerblue;
  94. }
  95. .icon {
  96. display: block;
  97. }
  98. }
  99. }