Greasy Fork is available in English.

Mistral responsive + customizations

Mistral website is more suitable for wide screens.

  1. /* ==UserStyle==
  2. @name Mistral responsive + customizations
  3. @version 1.0.19
  4. @description Mistral website is more suitable for wide screens.
  5. @author BreatFR (https://breat.fr)
  6. @namespace https://gitlab.com/breatfr
  7. @homepageURL https://gitlab.com/breatfr/mistral
  8. @supportURL https://discord.gg/Q8KSHzdBxs
  9. @license AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
  10. @preprocessor stylus
  11.  
  12. @var checkbox chatmode "Chat mode" 1
  13. @var checkbox avatar "Custom avatar for us" 0
  14. @var text avatarurl "Custom avatar URL" "URL between quotes"
  15. @var checkbox cmmistralavatar "Custom Mistral avatar" 0
  16. @var text cmmistralavatarurl "Custom Mistral avatar URL" "URL between quotes"
  17. @var text cmmistralavatarsize "Custom Mistral avatar size" calc(100vh - 64px - 163.56px - .5rem)
  18. @var text cmmistralavatarcorner "Custom Mistral avatar corner" 50%
  19. @var text fontsize "Custom font size" 1.2rem
  20. @var checkbox hidepro "Hide pro" 1
  21. @var checkbox widemode "Wide mode" 1
  22. ==/UserStyle== */
  23.  
  24. /* === Credits ===
  25. Website https://breat.fr
  26. facebook https://www.facebook.com/breatfroff
  27. mastodon https://mastodon.social/@breat_fr
  28. telegram https://t.me/breatfr
  29. vk https://vk.com/breatfroff
  30. X (twitter) https://x.com/breatfroff
  31. === Credits === */
  32.  
  33. @-moz-document domain("chat.mistral.ai") {
  34. /* Mistral Chat */
  35. /* Versions */
  36. :root {
  37. --themeversion: 'Theme v1.0.19 by BreatFR (https://breat.fr)';
  38. --install1: ' usercssjs.breat.fr \A';
  39. --install2: ' gitlab.com/breatfr/mistral \A \A';
  40. --support1: ' ko-fi.com/breatfr \A';
  41. --support2: ' paypal.me/breat';
  42. }
  43.  
  44. @media (min-width: 900px) {
  45. main main::after {
  46. background: linear-gradient(88.55deg, rgb(253, 73, 2) 22.43%, rgb(254, 206, 0) 92.28%);
  47. background-clip: text;
  48. -webkit-background-clip: text;
  49. color: transparent;
  50. content: var(--themeversion);
  51. display: block;
  52. font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  53. font-size: 1.2rem;
  54. left: 50%;
  55. line-height: 1.5;
  56. max-width: max-content;
  57. pointer-events: none;
  58. position: absolute;
  59. text-align: center;
  60. top: 0;
  61. transform: translate(-50%, 50%);
  62. width: 100%;
  63. white-space: wrap;
  64. }
  65. }
  66. [data-state="expanded"] [data-sidebar="sidebar"]::after,
  67. [data-mobile="true"][data-sidebar="sidebar"]::after {
  68. background: linear-gradient(88.55deg, rgb(253, 73, 2) 22.43%, rgb(254, 206, 0) 92.28%);
  69. background-clip: text;
  70. -webkit-background-clip: text;
  71. bottom: 1em;
  72. color: transparent;
  73. content: 'Install: \A' url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_breat.fr.png") var(--install1) url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_gitlab.png") var(--install2) 'Support me: \A' url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_ko-fi.png") var(--support1) url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_paypal.png") var(--support2);
  74. display: block;
  75. font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  76. font-size: 1.2rem;
  77. left: 0;
  78. line-height: 1.5;
  79. max-width: 256px;
  80. pointer-events: none;
  81. position: fixed;
  82. text-align: center;
  83. width: 100%;
  84. white-space: pre-line;
  85. }
  86. body {
  87. max-height: 100vh;
  88. overflow: hidden;
  89. }
  90. /* Textarea focused */
  91. body:has(textarea:focus) {
  92. [class="flex w-full flex-col p-4"] {
  93. border-radius: calc(var(--radius) + 4px);
  94. box-shadow: rgba(255, 149, 0, 0.4) -2px -2px 2px 2px,
  95. rgba(255, 149, 0, 0.4) -2px 2px 2px 2px,
  96. rgba(255, 69, 0, 0.4) 2px -2px 2px 2px,
  97. rgba(255, 69, 0, 0.4) 2px 2px 2px 2px;
  98. }
  99. }
  100. /* Custom font size */
  101. .prose,
  102. code,
  103. textarea,
  104. .max-w-screen-md:has(textarea) button {
  105. font-size: fontsize !important;
  106. line-height: 1.5 !important;
  107. }
  108. textarea.py-2 {
  109. min-height: max-content !important;
  110. }
  111. if avatar {
  112. [data-sidebar="header"] button:nth-of-type(1) > div > div:nth-of-type(1) {
  113. background: transparent;
  114. color: transparent;
  115. }
  116. [class="flex h-fit w-full flex-col"] > div:nth-child(odd) {
  117. position: relative;
  118. }
  119. [class="flex h-fit w-full flex-col"] > div:nth-child(odd) > div {
  120. margin-right: calc(32px + .5em);
  121. }
  122. [class="flex h-fit w-full flex-col"] > div:nth-child(odd) > div::before {
  123. position: absolute;
  124. right: 0;
  125. }
  126. [data-sidebar="header"] button:nth-of-type(1) > div > div:nth-of-type(1):before,
  127. [class="flex h-fit w-full flex-col"] > div:nth-child(odd) > div::before {
  128. background: url(avatarurl) no-repeat center center / cover;
  129. border-radius: 50%;
  130. content: "";
  131. display: inline-block;
  132. height: 32px;
  133. width: 32px;
  134. }
  135. }
  136. if cmmistralavatar {
  137. /* Avatar new chat */
  138. [class="absolute bottom-[65%] flex w-full justify-center"] {
  139. bottom: auto;
  140. max-width: 100%;
  141. top: 0px;
  142. }
  143. [class="flex flex-col items-stretch"] {
  144. height: auto;
  145. margin: 0;
  146. max-height: calc(100vh - 64px - 163.56px - .5rem) !important;
  147. overflow: hidden;
  148. position: absolute;
  149. }
  150. [class="flex flex-col items-stretch"] svg {
  151. aspect-ratio: 1 / 1;
  152. background: url(cmmistralavatarurl) no-repeat center center;
  153. background-size: cover;
  154. border-radius: cmmistralavatarcorner;
  155. height: 0;
  156. margin: 0 auto;
  157. padding-left: cmmistralavatarsize;
  158. padding-top: cmmistralavatarsize;
  159. width: 0;
  160. }
  161. /* Textarea new chat */
  162. [class="absolute flex w-full max-w-(--breakpoint-md) flex-col px-2"] {
  163. bottom: 0 !important;
  164. top: auto !important;
  165. }
  166. /* Avatar in chat */
  167. [class="group flex w-full gap-3"] > span > svg {
  168. aspect-ratio: 1 / 1;
  169. background: url(cmmistralavatarurl) no-repeat center center / cover;
  170. border-radius: 50%;
  171. height: 0;
  172. padding-left: 32px;
  173. padding-top: 32px;
  174. width: 0;
  175. }
  176. }
  177. if chatmode {
  178. [class="flex h-fit w-full flex-col"] > div {
  179. max-width: 80%;
  180. }
  181. code[style*="white-space: pre"],
  182. code[style*="white-space:pre"] {
  183. white-space: break-spaces !important;
  184. }
  185. [class="group flex w-full gap-3"] > div > div:nth-of-type(1) {
  186. overflow-x: hidden;
  187. }
  188. [class="flex h-fit w-full flex-col"] > div:nth-child(odd) {
  189. align-self: flex-end !important;
  190. justify-content: flex-end !important;
  191. }
  192. [class="flex h-fit w-full flex-col"] > div:nth-child(odd) > div > div:nth-of-type(1) > div > div > div {
  193. margin-left: auto;
  194. }
  195. }
  196. if hidepro {
  197. [data-sidebar="menu"] > li:nth-of-type(3) {
  198. display: none;
  199. }
  200. }
  201. if widemode {
  202. .max-w-\\(--breakpoint-md\\) {
  203. max-width: 98%;
  204. }
  205. .max-h-\\[300px\\]:has(textarea) {
  206. max-height: 50vh !important;
  207. }
  208. .max-w-screen-md:has(textarea) {
  209. padding: 1em 1.75em;
  210. }
  211. /* Avatars */
  212. .h-7 {
  213. height: 32px;
  214. }
  215. .w-7 {
  216. width: 32px;
  217. }
  218. body:has(iframe[sandbox="allow-scripts allow-same-origin"]) {
  219. .cm-content {
  220. flex-shrink: 1;
  221. }
  222. .cm-line {
  223. white-space: wrap;
  224. width: 100% !important;
  225. }
  226. }
  227. /* Generated images */
  228. [class="group flex w-full gap-3"] > div:nth-of-type(2) p:has(img) {
  229. margin-left: auto;
  230. margin-right: auto;
  231. }
  232. /* Textarea box */
  233. [class="relative overflow-hidden mb-2 min-h-10 w-full"] {
  234. margin-bottom: 0 !important;
  235. }
  236. /* Scroll down icon */
  237. button:has(svg.lucide-arrow-down) {
  238. height: 40px;
  239. width: 40px;
  240. }
  241. svg.lucide-arrow-down path {
  242. stroke: rgb(255, 69, 0);
  243. }
  244. /* Small space between date and edit button */
  245. [aria-label="Edit question"] {
  246. margin-left: 1em !important;
  247. }
  248. /* Search box */
  249. div[role="dialog"]:has(label) {
  250. max-height: 90%;
  251. max-width: 90%;
  252. }
  253. /* Documentation et contact */
  254. [class="fixed right-3 bottom-3 z-40 hidden gap-2 sm:flex"],
  255. [class="fixed right-3 bottom-3 z-40 hidden gap-2 md:flex"],
  256. [class="fixed right-3 bottom-3 z-40 hidden gap-2 lg:flex"] {
  257. left: calc(var(--spacing)*3);
  258. right: auto;
  259. }
  260. }
  261. }
  262.  
  263. @-moz-document domain("console.mistral.ai") {
  264. /* Mistral Console */
  265. button[class*="flex w-full items-center gap-3 rounded px-3 py-2"] > div:nth-of-type(1),
  266. .user-initials {
  267. background: transparent !important;
  268. color: transparent;
  269. }
  270. button[class*="flex w-full items-center gap-3 rounded px-3 py-2"] > div:nth-of-type(1)::before,
  271. .user-initials::before {
  272. background: url(avatarurl) no-repeat center center / cover;
  273. border-radius: 50%;
  274. content: "";
  275. display: inline-block;
  276. height: 32px;
  277. width: 32px;
  278. }
  279. }