_gf-form.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. $gf-form-margin: 0.4rem;
  2. .gf-form {
  3. margin-bottom: $gf-form-margin;
  4. margin-right: $gf-form-margin;
  5. display: flex;
  6. flex-direction: row;
  7. align-items: center;
  8. text-align: left;
  9. .checkbox-label {
  10. display: inline;
  11. cursor: pointer;
  12. padding: 8px 7px 8px 4px;
  13. }
  14. .cr1 {
  15. margin-left: 8px;
  16. }
  17. }
  18. .gf-form-group {
  19. margin-bottom: $spacer * 2.5;
  20. }
  21. .gf-form-inline {
  22. display: flex;
  23. flex-direction: row;
  24. flex-wrap: wrap;
  25. align-content: flex-start;
  26. .gf-form-flex {
  27. flex-grow: 1;
  28. }
  29. }
  30. .gf-form-button-row {
  31. margin-top: $spacer * 1.5;
  32. a, button {
  33. margin-right: $spacer;
  34. }
  35. }
  36. .gf-form-label {
  37. padding: $input-padding-y $input-padding-x;
  38. line-height: $input-line-height;
  39. flex-shrink: 0;
  40. background-color: $input-label-bg;
  41. display: block;
  42. font-size: $font-size-sm;
  43. margin-right: $gf-form-margin;
  44. border: $input-btn-border-width solid transparent;
  45. }
  46. .gf-form-checkbox {
  47. flex-shrink: 0;
  48. }
  49. @each $size, $value in $form-sizes {
  50. .gf-size-#{$size} { width: $value; }
  51. .gf-size-max-#{$size} {
  52. flex-grow: 1;
  53. max-width: $value;
  54. }
  55. }
  56. .gf-size-max { width: 100%; }
  57. .gf-size-auto { width: auto; }
  58. .gf-form-input {
  59. display: block;
  60. width: 100%;
  61. padding: $input-padding-y $input-padding-x;
  62. font-size: $font-size-base;
  63. line-height: $input-line-height;
  64. color: $input-color;
  65. background-color: $input-bg;
  66. background-image: none;
  67. background-clip: padding-box;
  68. border: $input-btn-border-width solid $input-border-color;
  69. @include border-radius($input-border-radius);
  70. @include box-shadow($input-box-shadow);
  71. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  72. // Unstyle the caret on `<select>`s in IE10+.
  73. &::-ms-expand {
  74. background-color: transparent;
  75. border: 0;
  76. }
  77. // Customize the `:focus` state to imitate native WebKit styles.
  78. @include form-control-focus();
  79. // Placeholder
  80. &::placeholder {
  81. color: $input-color-placeholder;
  82. // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
  83. opacity: 1;
  84. }
  85. &:disabled,
  86. &[readonly] {
  87. background-color: $input-bg-disabled;
  88. // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
  89. opacity: 1;
  90. }
  91. &:disabled {
  92. cursor: $cursor-disabled;
  93. }
  94. &.gf-size-auto { width: auto; }
  95. }
  96. .gf-form-btn {
  97. padding: $input-padding-y $input-padding-x;
  98. line-height: $input-line-height;
  99. flex-shrink: 0;
  100. flex-grow: 0;
  101. }