ListItem.less 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. @import "../styles/cfg";
  2. .list-item {
  3. position: relative;
  4. //padding: 7px 10px 7px 10px;
  5. cursor: pointer;
  6. -webkit-app-region: no-drag;
  7. // &.sys-hosts {
  8. //font-size: 14px;
  9. //padding: 8px 10px 8px 10px;
  10. // .item-icon {
  11. // width: 22px;
  12. // font-size: 12px;
  13. // margin: 0 3px 0 1px;
  14. // }
  15. // }
  16. .bg() {
  17. content: '';
  18. display: block;
  19. width: 800px;
  20. height: 30px;
  21. background: var(--swh-bg-color-selected);
  22. //opacity: 0.5;
  23. position: absolute;
  24. right: -5px;
  25. z-index: -1;
  26. margin-top: -4px;
  27. }
  28. &.selected {
  29. //background: @bg_left * 1.1;
  30. &:before {
  31. .bg();
  32. }
  33. &:hover {
  34. .icon-edit {
  35. display: inline-block;
  36. //color: #fff;
  37. }
  38. }
  39. }
  40. //&:hover {
  41. // .bg();
  42. // background: @color_hover;
  43. //}
  44. }
  45. .item-icon {
  46. margin-left: -8px;
  47. margin-right: 4px;
  48. width: 1.5em;
  49. }
  50. .icon-edit {
  51. margin-right: 0.5em;
  52. font-size: 1.5em;
  53. transform: scale(0.7);
  54. cursor: pointer;
  55. vertical-align: baseline !important;
  56. }
  57. .switcher {
  58. cursor: pointer;
  59. font-size: 2em;
  60. }
  61. .item-buttons {
  62. position: absolute;
  63. right: 4px;
  64. margin-top: -1px;
  65. }
  66. .title {
  67. display: inline-block;
  68. width: @left_width - 110px;
  69. overflow: hidden;
  70. white-space: nowrap;
  71. text-overflow: ellipsis;
  72. vertical-align: middle;
  73. }
  74. .sort-bg {
  75. //background: @sorg-bg-color;
  76. }
  77. .sys-hosts {
  78. margin-top: 10px;
  79. .item-icon {
  80. margin-left: 21px;
  81. }
  82. }
  83. .not-match {
  84. opacity: 0.5;
  85. }
  86. :global(.platform-darwin) {
  87. .sys-hosts {
  88. margin-top: 0;
  89. }
  90. }