mixins.less 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * SearXNG, A privacy-respecting, hackable metasearch engine
  3. */
  4. // Mixins
  5. .text-size-adjust (@property: 100%) {
  6. -webkit-text-size-adjust: @property;
  7. -ms-text-size-adjust: @property;
  8. -moz-text-size-adjust: @property;
  9. text-size-adjust: @property;
  10. }
  11. .rounded-corners (@radius: 10px) {
  12. -webkit-border-radius: @radius;
  13. -moz-border-radius: @radius;
  14. border-radius: @radius;
  15. }
  16. .rounded-right-corners (@radius: 0 10px 10px 0) {
  17. -webkit-border-radius: @radius;
  18. -moz-border-radius: @radius;
  19. border-radius: @radius;
  20. }
  21. // disable user selection
  22. .disable-user-select () {
  23. -webkit-touch-callout: none;
  24. -webkit-user-select: none;
  25. -khtml-user-select: none;
  26. -moz-user-select: none;
  27. -ms-user-select: none;
  28. user-select: none;
  29. }
  30. // select all on focus
  31. .select-all-on-focus() {
  32. -webkit-user-select: all;
  33. -moz-user-select: all;
  34. -ms-user-select: element;
  35. user-select: all;
  36. }
  37. // see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Advanced_layouts_with_flexbox
  38. .flexbox() {
  39. display: -webkit-box;
  40. display: -moz-box;
  41. display: -webkit-flex;
  42. display: -ms-flexbox;
  43. display: flex;
  44. }
  45. .inline-flex() {
  46. display: -webkit-inline-box;
  47. display: -moz-inline-box;
  48. display: -webkit-inline-flex;
  49. display: -ms-inline-flexbox;
  50. display: inline-flex;
  51. }
  52. .flex-direction-row() {
  53. -webkit-box-direction: normal;
  54. -webkit-box-orient: horizontal;
  55. -moz-box-direction: normal;
  56. -moz-box-orient: horizontal;
  57. -webkit-flex-direction: row;
  58. -ms-flex-direction: row;
  59. flex-direction: row;
  60. }