Bitbucket: readable commit messages

Make commit messages on Bitbucket Cloud more readable

  1. /* ==UserStyle==
  2. @name Bitbucket: readable commit messages
  3. @namespace https://github.com/rybak/atlassian-tweaks
  4. @version 5
  5. @description Make commit messages on Bitbucket Cloud more readable
  6. @license MIT
  7. @homepageURL https://github.com/rybak/atlassian-tweaks
  8. @supportURL https://github.com/rybak/atlassian-tweaks/issues
  9. @author Andrei Rybak
  10. @preprocessor stylus
  11. @var number borderWidth "─ Border width ━" [1, 1, 10, 1, 'px']
  12. @var color borderColor "🎨 Border color" grey
  13. @var number borderRadius "╭ Border radius ╮" [3, 1, 30, 1, 'px']
  14. @var number paddingSize "▣ Padding" [1, 0.5, 3, 0.1, 'em']
  15. @var checkbox monospaceEnable "𝙼𝚘𝚗𝚘𝚜𝚙𝚊𝚌𝚎 font" 1
  16. ==/UserStyle== */
  17.  
  18. /*
  19. * Copyright (c) 2023-2024 Andrei Rybak
  20. *
  21. * Permission is hereby granted, free of charge, to any person obtaining a copy
  22. * of this software and associated documentation files (the "Software"), to deal
  23. * in the Software without restriction, including without limitation the rights
  24. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  25. * copies of the Software, and to permit persons to whom the Software is
  26. * furnished to do so, subject to the following conditions:
  27. *
  28. * The above copyright notice and this permission notice shall be included in all
  29. * copies or substantial portions of the Software.
  30. *
  31. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  32. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  33. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  34. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  35. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  36. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  37. * SOFTWARE.
  38. */
  39.  
  40. @-moz-document regexp("https://bitbucket.org/.*/commits/[^?]+") {
  41. /*
  42. * Fixes for readability
  43. */
  44.  
  45. /* border around the whole commit message */
  46. .css-1120ym1 > div:nth-child(1) > div:not([data-qa="commit-list-container"]):not([class]) {
  47. border: borderWidth solid borderColor;
  48. border-radius: borderRadius;
  49. padding: paddingSize;
  50. }
  51. if monospaceEnable {
  52. /* monospace text */
  53. .css-1120ym1 > div:nth-child(1) > div:not([data-qa="commit-list-container"]):not([class]) {
  54. font-family: monospace;
  55. }
  56. }
  57.  
  58. /* make the subject line of commit message bold */
  59. .css-1120ym1 > div:nth-child(1) > div:not([data-qa="commit-list-container"]):not([class]) > p:first-child {
  60. font-weight: bold;
  61. }
  62. }