Rounded Square Label Badges for New Gmail

Loosely based on https://userstyles.org/styles/109101/gmail-badges-rounded-in-message-indexes with some modifications: labels do not expand on hover, and are now displayed as square "badges" to better fit within the new Gmail styling

当前为 2020-10-31 提交的版本,查看 最新版本

  1. /* ==UserStyle==
  2. * @name Rounded Square Label Badges for New Gmail
  3. * @namespace github.com/exterrestris
  4. * @version 0.3.0
  5. * @description Loosely based on https://userstyles.org/styles/109101/gmail-badges-rounded-in-message-indexes with some modifications: labels do not expand on hover, and are now displayed as square "badges" to better fit within the new Gmail styling
  6. * @match https://mail.google.com/*
  7. ==/UserStyle== */
  8.  
  9. @namespace url(http://www.w3.org/1999/xhtml);
  10.  
  11. /****************
  12. * Message List *
  13. ****************/
  14. .ar.as {
  15. position: relative;
  16. box-sizing: border-box;
  17. background-color: transparent;
  18. margin-top: 0;
  19. padding-right: 0;
  20. margin-right: 5px;
  21. }
  22.  
  23. .ar.as:nth-of-type(6) ~ .ar.as {
  24. display: none;
  25. }
  26.  
  27. .ar.as .at {
  28. width: 2.9ex;
  29. overflow: hidden;
  30. height: 2.9ex;
  31. }
  32. .ar.as .at .av {
  33. width: 0;
  34. padding: 0;
  35. }
  36.  
  37. .ar.as .at[title="Inbox"], .ar.as .at[title="Bin"] {
  38. width: auto;
  39. overflow: visible;
  40. }
  41. .ar.as .at[title="Inbox"] .av, .ar.as .at[title="Bin"] .av {
  42. width: auto;
  43. padding: 0 8px;
  44. }
  45. .ar.as .at[title="Inbox"] .av {
  46. font-weight: bold;
  47. }
  48. .ar.as .at[title="Bin"] .av {
  49. font-style: italic;
  50. }
  51.  
  52. .ar.as .au {
  53. border-width: 0;
  54. }
  55.  
  56. .as {
  57. position: relative;
  58. }
  59.  
  60. .ar.as .at .au .av {
  61. overflow: hidden;
  62. }
  63.  
  64. .Zs .yi {
  65. max-width: none;
  66. }
  67.  
  68. .y6 {
  69. line-height: 1.5;
  70. }
  71.  
  72. .xT {
  73. justify-content: right;
  74. }
  75.  
  76. /*********************
  77. * Add Custom Colour *
  78. *********************/
  79. .Kj-JD-Jz .ar.as .at {
  80. width: auto;
  81. overflow: visible;
  82. position: relative;
  83. margin-left: 4.3ex;
  84. }
  85.  
  86. .Kj-JD-Jz .ar.as .at:before {
  87. content: '';
  88. width: 2.9ex;
  89. height: 2.9ex;
  90. position: absolute;
  91. left: -4.3ex;
  92. top: 0;
  93. background-color: inherit;
  94. border-radius: 3em;
  95. border: 1px solid rgba(51,51,51,0.4) !important;
  96. }
  97.  
  98. .Kj-JD-Jz .ar.as .at .av {
  99. width: auto;
  100. padding: 0 8px;
  101. }
  102.  
  103. /****************
  104. * Preview Pane *
  105. ****************/
  106. .hX {
  107. border-collapse: separate;
  108. border-spacing: 0;
  109. border: 0;
  110. }
  111.  
  112. .hX .hM {
  113. border: 1px solid transparent;
  114. }
  115.  
  116. .hX .hU.hM {
  117. border-right: 0;
  118. padding-left: 0.5em;
  119. padding-right: 0.4em;
  120.  
  121. }
  122.  
  123. .hX .hV.hM {
  124. border-left: 0;
  125. padding-right: 0.8em;
  126. padding-left: 0.3em;
  127. }
  128.  
  129. .hX .hV.hM .hO {
  130. padding: 0;
  131. vertical-align: top;
  132. top: -1px;
  133. position: relative;
  134. }
  135.  
  136. .hX .hS.hM {
  137. border-width: 0;
  138. }
  139.  
  140. .hU.hM {
  141. position: relative;
  142. box-sizing: border-box;
  143. }
  144.  
  145. .hU.hM .hN {
  146. overflow: hidden;
  147. height: 3ex;
  148. }