DuckDuckGo - Wider, Prettier and Customizable

Customizable UserCSS for DuckDuckGo

Från och med 2022-01-17. Se den senaste versionen.

  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.8
  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. === [TOGGLE] Use "IBM Plex Sans" font (needs installation) ===
  22. ============================================================== */
  23. if ibm-plex-font {
  24. /*
  25. ###################
  26. ## INSTALL FONTS ##
  27. ###################
  28. - Get the fonts:
  29. https://github.com/IBM/plex/releases/latest
  30. (TrueType recommended for Windows, for others use OpenType)
  31. - Go to "IBM-Plex-Sans" folder and install AT LEAST these fonts:
  32. - Bold
  33. - BoldItalic
  34. - Italic
  35. - Medium
  36. - MediumItalic
  37. - Regular
  38. - SemiBold
  39. - SemiBoldItalic
  40. */
  41. body, input, textarea, a { 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", "Segoe UI", "Roboto", "Helvetica Neue", "Lucida Grande", sans-serif !important; }
  42.  
  43. #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", "Segoe UI", "Roboto", "Helvetica Neue", "Lucida Grande", sans-serif !important; }
  44. #zero_click_wrapper option { font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Segoe UI", "Roboto", "Helvetica Neue", "Lucida Grande", sans-serif !important; }
  45.  
  46. .result__title, #links .result__title b, #links .result__title strong, a.result__sitelink-title {
  47. padding-bottom: 1px;
  48. font-weight: 500 !important;
  49. }
  50. .about-profiles__link { font-size: 0.8em; }
  51. .about-profiles__item { padding-top: 13px; }
  52. }
  53.  
  54.  
  55. /* ===========================================================
  56. === [TOGGLE] Wider layout (for 1920px+ wide resolution) ===
  57. =========================================================== */
  58.  
  59. if wideScreen {
  60. @media (min-width: 1460px) {
  61. .cw { max-width: 1700px; }
  62.  
  63. .header__search-wrap { max-width: 905px; }
  64.  
  65. .zcm-wrap--header { max-width: inherit; }
  66.  
  67. .header__search-wrap, .content__internal { padding-right: 0; }
  68.  
  69. .modal--dropdown--settings.is-showing { margin-left: -108px; }
  70.  
  71. .results--main {
  72. max-width: 900px;
  73. margin-right: 50px;
  74. }
  75. .result__sitelink-col { width: 415px !important; }
  76.  
  77. .result--more {
  78. width: 920px;
  79. margin-left: -10px;
  80. }
  81.  
  82. .module--carousel__item:not(:last-child) { margin-right: 1.6%; }
  83. .module--places { max-width: inherit; }
  84. .sitelink {
  85. width: 265px;
  86. padding-left: 35px;
  87. }
  88. .sitelink:nth-child(2n-1) { padding-right: inherit; }
  89. .is-link-style-exp:not(.is-mobile):not(.is-mobile-device) #links .results_links_deep { max-width: unset !important; }
  90. }
  91. }
  92.  
  93.  
  94. /* =========================================================================
  95. === [TOGGLE] Bigger font (recommended when "Wider layout" is enabled) ===
  96. ========================================================================= */
  97. if biggerFont {
  98. html { font-size: 99%; }
  99. #zci-color_picker { font-size: 14px; }
  100. .module__link--two-line { font-size: 1.6em; }
  101. if ibm-plex-font {
  102. .result__sitelink-title {
  103. font-size: 1.12em;
  104. letter-spacing: 0.01em;
  105. }
  106. }
  107. }
  108.  
  109.  
  110. /* ==================================================
  111. === [TOGGLE] Force hide visited link checkmark ===
  112. ================================================== */
  113.  
  114. if hideCheckmark {
  115. .result__check { display: none; }
  116. }
  117.  
  118. /* ======================================================
  119. === [TOGGLE] Delay showing sidebar in the pageload ===
  120. ====================================================== */
  121.  
  122. if sidebarAnimation {
  123. .results--sidebar {
  124. animation: showSidebar 0.65s ease-in-out 0.65s forwards;
  125. /* animation time = approximated load time for search results links */
  126. opacity: 0;
  127. }
  128.  
  129. @keyframes showSidebar { to { opacity: 1; } }
  130. }
  131.  
  132.  
  133. /* ====================================================
  134. === [TOGGLE] Hide feedback & promo related links ===
  135. ==================================================== */
  136.  
  137. if hideFeedback {
  138. .feedback-btn, [class^="feedback-prompt"], .header--text_promo { display: none; }
  139. }
  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. === Userscript Tweaks ===
  205. ========================= */
  206. /* -------------------------------
  207. Try Google on Duck Duck Go - WF
  208. ------------------------------- */
  209.  
  210. /*
  211. This userscript adds button that allows quick Google search with same search query.
  212. These tweaks restyle the button and adds better spacing.
  213. INSTALLATION PAGE:
  214. https://greasyfork.org/en/scripts/389801-try-google-on-duck-duck-go-wf
  215. */
  216.  
  217. .header__search a[style*="background: #4285F4;"][href^="https://www.google.com/search?"] {
  218. padding: 3px 8px !important;
  219. margin: 4px 11px 0 0;
  220. border-radius: 3px;
  221. }
  222.  
  223. .header__search a[style*="background: #4285F4;"][href^="https://www.google.com/search?"]:hover {
  224. background: #0e61ea !important;
  225. text-decoration: none !important;
  226. }
  227.  
  228.  
  229. /* =============
  230. === Misc. ===
  231. ============= */
  232.  
  233. .zcm__sep--h:before { top: 0.2em; }
  234. .zcm__sep--h+.zcm__item { padding-left: 0.85em; }
  235. .dropdown__switch { margin-top: 10.5px; }
  236.  
  237. .dropdown__button::after { margin-top: -5px; }
  238.  
  239. .module__link--two-line { padding-bottom: 5px; }
  240. .about-profiles { padding-bottom: 5px; }
  241. }