input-groups-rtl.less 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //
  2. // Input groups
  3. // --------------------------------------------------
  4. // Base styles
  5. // -------------------------
  6. .input-group {
  7. .form-control {
  8. // IE9 fubars the placeholder attribute in text inputs and the arrows on
  9. // select elements in input groups. To fix it, we float the input. Details:
  10. // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
  11. float: right;
  12. }
  13. }
  14. // Reset rounded corners
  15. .input-group .form-control:first-child,
  16. .input-group-addon:first-child,
  17. .input-group-btn:first-child > .btn,
  18. .input-group-btn:first-child > .btn-group > .btn,
  19. .input-group-btn:first-child > .dropdown-toggle,
  20. .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
  21. .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
  22. .border-right-radius(@border-radius-base);
  23. .border-left-radius(0);
  24. }
  25. .input-group-addon:first-child {
  26. border-left: 0px;
  27. border-right: 1px solid;
  28. }
  29. .input-group .form-control:last-child,
  30. .input-group-addon:last-child,
  31. .input-group-btn:last-child > .btn,
  32. .input-group-btn:last-child > .btn-group > .btn,
  33. .input-group-btn:last-child > .dropdown-toggle,
  34. .input-group-btn:first-child > .btn:not(:first-child),
  35. .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
  36. .border-left-radius(@border-radius-base);
  37. .border-right-radius(0);
  38. }
  39. .input-group-addon:last-child {
  40. border-left-width: 1px;
  41. border-left-style: solid;
  42. border-right: 0px;
  43. }
  44. // Button input groups
  45. // -------------------------
  46. .input-group-btn {
  47. // Negative margin for spacing, position for bringing hovered/focused/actived
  48. // element above the siblings.
  49. > .btn {
  50. + .btn {
  51. margin-right: -1px;
  52. margin-left: auto;
  53. }
  54. }
  55. // Negative margin to only have a 1px border between the two
  56. &:first-child {
  57. > .btn,
  58. > .btn-group {
  59. margin-left: -1px;
  60. margin-right: auto;
  61. }
  62. }
  63. &:last-child {
  64. > .btn,
  65. > .btn-group {
  66. margin-right: -1px;
  67. margin-left: auto;
  68. }
  69. }
  70. }