_gf-form.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. $gf-form-margin: 0.25rem;
  2. $gf-form-label-margin: 0.25rem;
  3. .gf-form {
  4. margin-bottom: $gf-form-margin;
  5. margin-right: $gf-form-margin;
  6. display: flex;
  7. flex-direction: row;
  8. align-items: center;
  9. text-align: left;
  10. .cr1 {
  11. margin-left: 8px;
  12. }
  13. }
  14. .gf-form-group {
  15. margin-bottom: $spacer * 2.5;
  16. }
  17. .gf-form-inline {
  18. display: flex;
  19. flex-direction: row;
  20. flex-wrap: wrap;
  21. align-content: flex-start;
  22. .gf-form-flex {
  23. flex-grow: 1;
  24. }
  25. }
  26. .gf-form-button-row {
  27. padding-top: $spacer * 1.5;
  28. a, button {
  29. margin-right: $spacer;
  30. }
  31. }
  32. .gf-form-label {
  33. padding: $input-padding-y $input-padding-x;
  34. line-height: $input-line-height;
  35. flex-shrink: 0;
  36. background-color: $input-label-bg;
  37. display: block;
  38. font-size: $font-size-sm;
  39. margin-right: $gf-form-label-margin;
  40. border: $input-btn-border-width solid transparent;
  41. @include border-radius($label-border-radius-sm);
  42. }
  43. .gf-form-checkbox {
  44. flex-shrink: 0;
  45. padding: $input-padding-y $input-padding-x;
  46. line-height: $input-line-height;
  47. .checkbox-label {
  48. display: inline;
  49. cursor: pointer;
  50. padding: $input-padding-y 0.4rem;
  51. line-height: $input-line-height;
  52. }
  53. }
  54. .gf-form-input {
  55. display: block;
  56. width: 100%;
  57. padding: $input-padding-y $input-padding-x;
  58. font-size: $font-size-base;
  59. line-height: $input-line-height;
  60. color: $input-color;
  61. background-color: $input-bg;
  62. background-image: none;
  63. background-clip: padding-box;
  64. border: $input-btn-border-width solid $input-border-color;
  65. @include border-radius($input-border-radius-sm);
  66. @include box-shadow($input-box-shadow);
  67. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  68. // Unstyle the caret on `<select>`s in IE10+.
  69. &::-ms-expand {
  70. background-color: transparent;
  71. border: 0;
  72. display: none;
  73. }
  74. // Customize the `:focus` state to imitate native WebKit styles.
  75. @include form-control-focus();
  76. // Placeholder
  77. &::placeholder {
  78. color: $input-color-placeholder;
  79. opacity: 1;
  80. }
  81. &:disabled,
  82. &[readonly] {
  83. background-color: $input-bg-disabled;
  84. // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
  85. opacity: 1;
  86. }
  87. &:disabled {
  88. cursor: $cursor-disabled;
  89. }
  90. &.gf-size-auto { width: auto; }
  91. }
  92. .gf-form-select-wrapper {
  93. position: relative;
  94. background-color: $input-bg;
  95. select.gf-form-input {
  96. text-indent: .01px;
  97. text-overflow: '';
  98. padding-right: $input-padding-x*2;
  99. -webkit-appearance: none;
  100. -moz-appearance: menulist-text; // was set to "window" and caused odd display on windos and linux.
  101. appearance: none;
  102. &:-moz-focusring {
  103. outline: none;
  104. color: transparent;
  105. text-shadow: 0 0 0 $text-color;
  106. }
  107. }
  108. &:after {
  109. position: absolute;
  110. top: 35%;
  111. right: $input-padding-x/2;
  112. background-color: transparent;
  113. color: $input-color;
  114. font: normal normal normal $font-size-sm/1 FontAwesome;
  115. content: '\f0d7';
  116. pointer-events: none;
  117. }
  118. }
  119. .gf-form-btn {
  120. padding: $input-padding-y $input-padding-x;
  121. line-height: $input-line-height;
  122. flex-shrink: 0;
  123. flex-grow: 0;
  124. }