_gf-form.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. margin-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 $input-padding-x;
  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. }
  73. // Customize the `:focus` state to imitate native WebKit styles.
  74. @include form-control-focus();
  75. // Placeholder
  76. &::placeholder {
  77. color: $input-color-placeholder;
  78. opacity: 1;
  79. }
  80. &:disabled,
  81. &[readonly] {
  82. background-color: $input-bg-disabled;
  83. // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
  84. opacity: 1;
  85. }
  86. &:disabled {
  87. cursor: $cursor-disabled;
  88. }
  89. &.gf-size-auto { width: auto; }
  90. }
  91. .gf-form-select-wrapper {
  92. position: relative;
  93. select.gf-form-input {
  94. padding-right: $input-padding-x*2;
  95. -webkit-appearance: none;
  96. -moz-appearance: menulist-text; // was set to "window" and caused odd display on windos and linux.
  97. appearance: none;
  98. &:-moz-focusring {
  99. color: transparent;
  100. }
  101. }
  102. &:after {
  103. position: absolute;
  104. top: 35%;
  105. right: $input-padding-x/2;
  106. background-color: transparent;
  107. color: $input-color;
  108. font: normal normal normal $font-size-sm/1 FontAwesome;
  109. content: '\f0d7';
  110. pointer-events: none;
  111. }
  112. }
  113. .gf-form-btn {
  114. padding: $input-padding-y $input-padding-x;
  115. line-height: $input-line-height;
  116. flex-shrink: 0;
  117. flex-grow: 0;
  118. }