DuckDuckGo - Wider, Prettier and Customizable

Customizable UserCSS for DuckDuckGo

Versão de: 27/07/2020. Veja: a última versão.

  1. /* ==UserStyle==
  2. @name DuckDuckGo - Wider, Prettier and Customizable
  3. @description Customizable UserCSS for DuckDuckGo
  4. @author krisu (https://github.com/krisu5)
  5. @namespace github.com/krisu5/userstyles
  6. @homepageURL https://github.com/krisu5/userstyles/tree/master/DuckDuckGo%20-%20Wider%20Prettier%20and%20Customizable
  7. @supportURL https://github.com/krisu5/userstyles/issues
  8. @version 1.0.4
  9. @license unlicense
  10. @preprocessor stylus
  11. @var checkbox ibm-plex-font "Use 'IBM Plex' font (external load)" 1
  12. @var checkbox wideScreen "Wider layout (for 1920px+ wide resolution)" 1
  13. @var checkbox biggerFont "Bigger font (recommended when 'Wider layout' is enabled)" 1
  14. @var checkbox hideCheckmark "Force hide visited link checkmark" 0
  15. @var checkbox sidebarAnimation "Delay showing sidebar in the pageload" 1
  16. @var checkbox hideFeedback "Hide feedback related links" 0
  17. ==/UserStyle== */
  18.  
  19. @-moz-document domain("duckduckgo.com") {
  20. /* ====================================================
  21. === [TOGGLE] Use "IBM Plex" font (external load) ===
  22. ==================================================== */
  23. if ibm-plex-font {
  24. /* ibm-plex-sans-400normal - all */
  25. @font-face {
  26. font-family: 'IBM Plex Sans';
  27. font-style: normal;
  28. font-display: swap;
  29. font-weight: 400;
  30. src:
  31. local('IBM Plex Sans'),
  32. local('IBMPlexSans'),
  33. url('https://cdn.jsdelivr.net/npm/@openfonts/ibm-plex-sans_all@1.44.0/files/ibm-plex-sans-all-400.woff2') format('woff2');
  34. }
  35.  
  36. /* ibm-plex-sans-500normal - all */
  37. @font-face {
  38. font-family: 'IBM Plex Sans';
  39. font-style: normal;
  40. font-display: swap;
  41. font-weight: 500;
  42. src:
  43. local('IBM Plex Sans Medium'),
  44. local('IBMPlexSans-Medium'),
  45. url('https://cdn.jsdelivr.net/npm/@openfonts/ibm-plex-sans_all@1.44.0/files/ibm-plex-sans-all-500.woff2') format('woff2');
  46. }
  47.  
  48. /* ibm-plex-sans-600normal - all */
  49. @font-face {
  50. font-family: 'IBM Plex Sans';
  51. font-style: normal;
  52. font-display: swap;
  53. font-weight: 600;
  54. src:
  55. local('IBM Plex Sans SemiBold'),
  56. local('IBMPlexSans-SemiBold'),
  57. url('https://cdn.jsdelivr.net/npm/@openfonts/ibm-plex-sans_all@1.44.0/files/ibm-plex-sans-all-600.woff2') format('woff2');
  58. }
  59. body, input, textarea, .search__input--adv { font-family: "IBM Plex Sans", "DDG_ProximaNova", "DDG_ProximaNova_UI_0", "DDG_ProximaNova_UI_1", "DDG_ProximaNova_UI_2", "DDG_ProximaNova_UI_3", "DDG_ProximaNova_UI_4", "DDG_ProximaNova_UI_5", "DDG_ProximaNova_UI_6", "Proxima Nova", system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; }
  60.  
  61. #zero_click_wrapper *:not(option):not(a) { font-family: "DDG_ProximaNova", "DDG_ProximaNova_UI_0", "DDG_ProximaNova_UI_1", "DDG_ProximaNova_UI_2", "DDG_ProximaNova_UI_3", "DDG_ProximaNova_UI_4", "DDG_ProximaNova_UI_5", "DDG_ProximaNova_UI_6", "Proxima Nova", system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; }
  62. #zero_click_wrapper option { font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; }
  63.  
  64. .result__title, #links .result__title b, #links .result__title strong {
  65. padding-bottom: 1px !important;
  66. font-weight: 500 !important;
  67. }
  68. }
  69.  
  70.  
  71. /* ===========================================================
  72. === [TOGGLE] Wider layout (for 1920px+ wide resolution) ===
  73. =========================================================== */
  74.  
  75. if wideScreen {
  76. @media only screen and (min-width: 1460px) {
  77. .cw { max-width: 1700px; }
  78.  
  79. .has-zcm .header { width: 1063px; }
  80.  
  81. .header__search-wrap { max-width: 905px; }
  82.  
  83. .zcm-wrap--header { max-width: inherit; }
  84.  
  85. .header__search-wrap, .content__internal { padding-right: 0; }
  86.  
  87. .modal--dropdown--settings.is-showing { margin-left: -108px; }
  88.  
  89. .results--main {
  90. max-width: 900px;
  91. margin-right: 50px;
  92. }
  93. .result__sitelink-col { width: 415px !important; }
  94.  
  95. .result--more {
  96. width: 920px;
  97. margin-left: -10px;
  98. }
  99.  
  100. .module--carousel__item:not(:last-child) { margin-right: 1.6%; }
  101. }
  102. }
  103.  
  104.  
  105. /* =========================================================================
  106. === [TOGGLE] Bigger font (recommended when "Wider layout" is enabled) ===
  107. ========================================================================= */
  108. if biggerFont {
  109. html { font-size: 99%; }
  110. #zci-color_picker { font-size: 14px; }
  111. }
  112.  
  113.  
  114. /* ==================================================
  115. === [TOGGLE] Force hide visited link checkmark ===
  116. ================================================== */
  117.  
  118. if hideCheckmark { .result__check { display: none; } }
  119.  
  120. /* ======================================================
  121. === [TOGGLE] Delay showing sidebar in the pageload ===
  122. ====================================================== */
  123.  
  124. if sidebarAnimation {
  125. .results--sidebar {
  126. animation: showSidebar 0.75s ease-in-out 0.75s forwards;
  127. /* animation time = approximated load time for search results links */
  128. opacity: 0;
  129. }
  130.  
  131. @keyframes showSidebar { to { opacity: 1; } }
  132. }
  133.  
  134.  
  135. /* ============================================
  136. === [TOGGLE] Hide feedback related links ===
  137. ============================================ */
  138.  
  139. if hideFeedback { .feedback-btn, .feedback-prompt__link { display: none; } }
  140.  
  141.  
  142. /* ===============
  143. === Results ===
  144. =============== */
  145.  
  146. .result.highlight { background: hsl(0, 0%, 98%); }
  147.  
  148. .result__a { line-height: 1.3; }
  149.  
  150. .result__icon { margin-top: -6px; }
  151.  
  152.  
  153. /* =========================
  154. === Results seperator ===
  155. ========================= */
  156.  
  157. .result__pagenum {
  158. font-size: 15px;
  159. margin-top: -4px;
  160. }
  161.  
  162. .result__pagenum--side {
  163. padding: 5px 10px;
  164. background-color: #fafafa;
  165. border-radius: 50%;
  166. border: 1px solid #d9d9d9;
  167. }
  168.  
  169. .result--sep { margin: 1em auto 1.25em; }
  170.  
  171. .result--sep--hr::before {
  172. background-color: #d9d9d9;
  173. right: 0px;
  174. }
  175.  
  176.  
  177. /* ==============================
  178. === Instant Answer modules ===
  179. ============================== */
  180.  
  181. .zci--calculator .tile__calc .tile__past-calc { height: 60px; }
  182.  
  183. .zci--timer .name { margin-top: 27px; }
  184.  
  185. .zci--timer .time_display { margin-top: -20px; }
  186.  
  187. .zci--timer .corner_btn.reset { top: 5px; }
  188.  
  189. .zci--timer .corner_btn.close { top: -3px; }
  190.  
  191. .zci--timer .play_pause a {
  192. left: calc(50% + 2px);
  193. top: calc(50% + 2px);
  194. }
  195.  
  196. .tile__ctrl__btn {
  197. -moz-user-select: none;
  198. -webkit-user-select: none;
  199. user-select: none;
  200. }
  201.  
  202.  
  203. /* =============
  204. === Misc. ===
  205. ============= */
  206.  
  207. .zcm__sep--h:before { top: 0.2em; }
  208. .zcm__sep--h+.zcm__item { padding-left: 0.85em; }
  209. .dropdown__switch { margin-top: 10.5px; }
  210.  
  211. .dropdown__button::after { margin-top: -5px; }
  212.  
  213. .module__link--two-line { padding-bottom: 5px; }
  214. .about-profiles { padding-bottom: 5px; }
  215. }