You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

helpers.css 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. Gitea's tailwind-style CSS helper classes have `gt-` prefix.
  3. Gitea's private styles use `g-` prefix.
  4. */
  5. .gt-word-break {
  6. word-wrap: break-word !important;
  7. word-break: break-word; /* compat: Safari */
  8. overflow-wrap: anywhere;
  9. }
  10. .gt-ellipsis {
  11. overflow: hidden !important;
  12. white-space: nowrap !important;
  13. text-overflow: ellipsis !important;
  14. }
  15. .g-table-auto-ellipsis td.auto-ellipsis {
  16. position: relative;
  17. }
  18. .g-table-auto-ellipsis td.auto-ellipsis span {
  19. position: absolute;
  20. left: 0;
  21. right: 0;
  22. top: 0;
  23. bottom: 0;
  24. padding: inherit;
  25. white-space: nowrap;
  26. overflow: hidden;
  27. text-overflow: ellipsis;
  28. }
  29. .interact-fg { color: inherit !important; }
  30. .interact-fg:hover { color: var(--color-primary) !important; }
  31. .interact-fg:active { color: var(--color-primary-active) !important; }
  32. .interact-bg { background: transparent !important; }
  33. .interact-bg:hover { background: var(--color-hover) !important; }
  34. .interact-bg:active { background: var(--color-active) !important; }
  35. /*
  36. tw-hidden must win all other "display: xxx !important" classes to get the chance to "hide" an element.
  37. do not use:
  38. * "[hidden]" attribute: it's too weak, can not be applied to an element with "display: flex"
  39. * ".hidden" class: it has been polluted by Fomantic UI in many cases
  40. * inline style="display: none": it's difficult to tweak
  41. * jQuery's show/hide/toggle: it can not show/hide elements with "display: xxx !important"
  42. only use:
  43. * this ".tw-hidden" class
  44. * showElem/hideElem/toggleElem functions in "utils/dom.js"
  45. */
  46. .tw-hidden.tw-hidden { display: none !important; }
  47. @media (max-width: 767.98px) {
  48. /* double selector so it wins over .tw-flex (old .gt-df) etc */
  49. .not-mobile.not-mobile {
  50. display: none !important;
  51. }
  52. }
  53. @media (min-width: 767.98px) {
  54. .only-mobile.only-mobile {
  55. display: none !important;
  56. }
  57. }