DuckDuckGo - Wider, Prettier and Customizable

Customizable UserCSS for DuckDuckGo

  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.9
  9. @license unlicense
  10. @preprocessor stylus
  11. @var checkbox ibm-plex-font "Use 'IBM Plex Sans' font (needs installation)" 0
  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 & promo related links" 0
  17. ==/UserStyle== */
  18.  
  19. @-moz-document domain("duckduckgo.com") {
  20.  
  21. /* ==============================================================
  22. === [TOGGLE] Use "IBM Plex Sans" font (needs installation) ===
  23. ============================================================== */
  24. if ibm-plex-font {
  25. /*
  26. ###################
  27. ## INSTALL FONTS ##
  28. ###################
  29. - Get the fonts:
  30. https://github.com/IBM/plex/releases/latest
  31. (TrueType recommended for Windows, for others use OpenType)
  32. - Go to "IBM-Plex-Sans" folder and install AT LEAST these fonts:
  33. - Bold
  34. - BoldItalic
  35. - Italic
  36. - Medium
  37. - MediumItalic
  38. - Regular
  39. - SemiBold
  40. - SemiBoldItalic
  41. */
  42. :root {
  43. --ibm-fontstack-1: "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", "Segoe UI", "Roboto", "Helvetica Neue", "Lucida Grande", sans-serif;
  44. --ibm-fontstack-2: "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", "Segoe UI", "Roboto", "Helvetica Neue", "Lucida Grande", sans-serif;
  45. --ibm-fontstack-3: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Segoe UI", "Roboto", "Helvetica Neue", "Lucida Grande", sans-serif;
  46. }
  47. body, *:not(.play_pause) a { font-family: var(--ibm-fontstack-1); }
  48. input, textarea { font-family: var(--ibm-fontstack-1) !important; }
  49.  
  50. #zero_click_wrapper *:not(option):not(a) { font-family: var(--ibm-fontstack-2); }
  51. #zero_click_wrapper option { font-family: var(--ibm-fontstack-3); }
  52. .zci--timer .corner_btn.add_minute { line-height: 1.5em; }
  53. .zci--timer .corner_btn.close {
  54. top: -5px !important;
  55. right: 5px !important;
  56. }
  57. :is(#links, [data-testid="result"]) :where(h2, h3) {
  58. padding-bottom: 2px;
  59. font-weight: 500 !important;
  60. }
  61. [data-testid="result-title-a"] {
  62. font-weight: 500 !important;
  63. }
  64. .about-profiles__link { font-size: 0.8em; }
  65. .about-profiles__item { padding-top: 13px; }
  66. }
  67.  
  68.  
  69. /* ===========================================================
  70. === [TOGGLE] Wider layout (for 1920px+ wide resolution) ===
  71. =========================================================== */
  72.  
  73. if wideScreen {
  74. @media (min-width: 1460px) {
  75. .cw { max-width: 1700px; }
  76.  
  77. .header__search-wrap, .zcm-wrap--header { max-width: 905px; }
  78.  
  79. .header__search-wrap, .content__internal { padding-right: 0; }
  80.  
  81. .modal--dropdown--settings.is-showing { margin-left: -108px; }
  82.  
  83. .results--main, [data-testid="mainline"] {
  84. max-width: 900px !important;
  85. margin-right: 50px;
  86. }
  87. [data-testid="mainline"] {
  88. -webkit-flex: 0 0 900px !important;
  89. flex: 0 0 900px !important;
  90. }
  91. .result__sitelink-col { width: 415px !important; }
  92.  
  93. .result--more {
  94. width: 920px;
  95. margin-left: -10px;
  96. }
  97.  
  98. .module--carousel__item:not(:last-child) { margin-right: 1.6%; }
  99. .module--places { max-width: inherit; }
  100. .sitelink {
  101. width: 265px;
  102. padding-left: 35px;
  103. }
  104. .sitelink:nth-child(2n-1) { padding-right: inherit; }
  105. .is-link-style-exp:not(.is-mobile):not(.is-mobile-device) #links .results_links_deep { max-width: unset !important; }
  106. }
  107. }
  108.  
  109.  
  110. /* =========================================================================
  111. === [TOGGLE] Bigger font (recommended when "Wider layout" is enabled) ===
  112. ========================================================================= */
  113. if biggerFont {
  114. html { font-size: 99%; }
  115. #zci-color_picker { font-size: 14px; }
  116. .module__link--two-line { font-size: 1.6em; }
  117. .zci--stopwatch .goodie-pane { width: 39.5%; }
  118. if ibm-plex-font {
  119. .result__sitelink-title {
  120. font-size: 1.12em;
  121. letter-spacing: 0.01em;
  122. }
  123. }
  124. }
  125.  
  126.  
  127. /* ==================================================
  128. === [TOGGLE] Force hide visited link checkmark ===
  129. ================================================== */
  130.  
  131. if hideCheckmark {
  132. .result__check { display: none; }
  133. }
  134.  
  135. /* ======================================================
  136. === [TOGGLE] Delay showing sidebar in the pageload ===
  137. ====================================================== */
  138.  
  139. if sidebarAnimation {
  140. .results--sidebar {
  141. animation: showSidebar 0.65s ease-in-out 0.65s forwards;
  142. /* animation time = approximated load time for search results links */
  143. opacity: 0;
  144. }
  145.  
  146. @keyframes showSidebar { to { opacity: 1; } }
  147. }
  148.  
  149.  
  150. /* ====================================================
  151. === [TOGGLE] Hide feedback & promo related links ===
  152. ==================================================== */
  153.  
  154. if hideFeedback {
  155. .feedback-btn, [class^="feedback-prompt"], .header--text_promo, [data-layout="spreadCTA"] { display: none; }
  156. }
  157.  
  158.  
  159. /* ===============
  160. === Results ===
  161. =============== */
  162.  
  163. :is(#links, .react-results--main) article:hover {
  164. background: hsl(0, 0%, 98%);
  165. border-color: var(--theme-col-border-ui);
  166. }
  167.  
  168. :is(#links, .react-results--main) h3:hover { text-decoration: underline; }
  169.  
  170. #links img[src^="//external-content.duckduckgo.com"],
  171. .react-results--main [src^="/assets/icons/favicons/"] { margin-top: -4px; }
  172.  
  173. .result__a, [data-testid="result-title-a"] { line-height: 1.3; }
  174.  
  175.  
  176. /* =========================
  177. === Results seperator ===
  178. ========================= */
  179.  
  180. .result__pagenum, [arial-label^="Page "] span {
  181. font-size: 15px !important;
  182. margin-top: -4px;
  183. min-width: unset !important;
  184. }
  185.  
  186. .result__pagenum--side {
  187. padding: 5px 10px;
  188. background-color: #fafafa;
  189. border-radius: 50%;
  190. border: 1px solid #d9d9d9;
  191. }
  192.  
  193. [arial-label^="Page "] span {
  194. padding: 5px 12px;
  195. background-color: #fafafa !important;
  196. border-radius: 50%;
  197. border: 1px solid #d9d9d9 !important;
  198. }
  199.  
  200. .result--sep { margin: 1em auto 1.25em; }
  201.  
  202. .result--sep--hr::before, [arial-label^="Page "] hr {
  203. background-color: #d9d9d9 !important;
  204. border-top: 1px solid #d9d9d9 !important;
  205. }
  206.  
  207.  
  208. /* ==============================
  209. === Instant Answer modules ===
  210. ============================== */
  211.  
  212. .zci--calculator .tile__calc .tile__past-calc { height: 60px; }
  213.  
  214. .zci--timer .name { margin-top: 27px; }
  215.  
  216. .zci--timer .time_display { margin-top: -20px; }
  217.  
  218. .zci--timer .corner_btn.reset { top: 5px; }
  219.  
  220. .zci--timer .corner_btn.close { top: -3px; }
  221.  
  222. .zci--timer .play_pause a {
  223. left: calc(50% + 2px);
  224. top: calc(50% + 2px);
  225. }
  226.  
  227. .tile__ctrl__btn {
  228. -moz-user-select: none;
  229. -webkit-user-select: none;
  230. user-select: none;
  231. }
  232.  
  233. .zci--stopwatch .goodie-pane *, .zci--stopwatch #split_list * { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace !important; }
  234.  
  235. .zci--stopwatch .goodie-pane { width: 38.5% !important; }
  236.  
  237. .zci--stopwatch .time {
  238. font-size: 32px !important;
  239. font-variant-numeric: tabular-nums;
  240. }
  241.  
  242. .zci--stopwatch #split_list .lap-num { font-weight: bold !important; }
  243.  
  244.  
  245. /* =========================
  246. === Userscript Tweaks ===
  247. ========================= */
  248. /* -------------------------------
  249. Try Google on Duck Duck Go - WF
  250. ------------------------------- */
  251.  
  252. /*
  253. This userscript adds button that allows quick Google search with same search query.
  254. These tweaks restyle the button and adds better spacing.
  255. INSTALLATION PAGE:
  256. https://gf.qytechs.cn/en/scripts/389801-try-google-on-duck-duck-go-wf
  257. */
  258.  
  259. .header__search a[style*="background: #4285F4;"][href^="https://www.google.com/search?"] {
  260. padding: 3px 8px !important;
  261. margin: 4px 11px 0 0;
  262. border-radius: 3px;
  263. }
  264.  
  265. .header__search a[style*="background: #4285F4;"][href^="https://www.google.com/search?"]:hover {
  266. background: #0e61ea !important;
  267. text-decoration: none !important;
  268. }
  269.  
  270.  
  271. /* =============
  272. === Misc. ===
  273. ============= */
  274.  
  275. .zcm__sep--h:before { top: 0.2em; }
  276. .zcm__sep--h+.zcm__item { padding-left: 0.85em; }
  277. .dropdown__switch { margin-top: 10.5px; }
  278.  
  279. .dropdown__button::after { margin-top: -5px; }
  280.  
  281. .about-profiles, .module__link--two-line { padding-bottom: 5px; }
  282. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址