_forms.scss 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. // stylelint-disable selector-no-qualifying-type
  2. //
  3. // Textual form controls
  4. //
  5. .form-control {
  6. display: block;
  7. width: 100%;
  8. height: $input-height;
  9. padding: $input-padding-y $input-padding-x;
  10. font-family: $input-font-family;
  11. @include font-size($input-font-size);
  12. font-weight: $input-font-weight;
  13. line-height: $input-line-height;
  14. color: $input-color;
  15. background-color: $input-bg;
  16. background-clip: padding-box;
  17. border: $input-border-width solid $input-border-color;
  18. // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
  19. @include border-radius($input-border-radius, 0);
  20. @include box-shadow($input-box-shadow);
  21. @include transition($input-transition);
  22. // Unstyle the caret on `<select>`s in IE10+.
  23. &::-ms-expand {
  24. background-color: transparent;
  25. border: 0;
  26. }
  27. // Remove select outline from select box in FF
  28. &:-moz-focusring {
  29. color: transparent;
  30. text-shadow: 0 0 0 $input-color;
  31. }
  32. // Customize the `:focus` state to imitate native WebKit styles.
  33. @include form-control-focus($ignore-warning: true);
  34. // Placeholder
  35. &::placeholder {
  36. color: $input-placeholder-color;
  37. // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
  38. opacity: 1;
  39. }
  40. // Disabled and read-only inputs
  41. //
  42. // HTML5 says that controls under a fieldset > legend:first-child won't be
  43. // disabled if the fieldset is disabled. Due to implementation difficulty, we
  44. // don't honor that edge case; we style them as disabled anyway.
  45. &:disabled,
  46. &[readonly] {
  47. background-color: $input-disabled-bg;
  48. // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
  49. opacity: 1;
  50. }
  51. }
  52. input[type="date"],
  53. input[type="time"],
  54. input[type="datetime-local"],
  55. input[type="month"] {
  56. &.form-control {
  57. appearance: none; // Fix appearance for date inputs in Safari
  58. }
  59. }
  60. select.form-control {
  61. &:focus::-ms-value {
  62. // Suppress the nested default white text on blue background highlight given to
  63. // the selected option text when the (still closed) <select> receives focus
  64. // in IE and (under certain conditions) Edge, as it looks bad and cannot be made to
  65. // match the appearance of the native widget.
  66. // See https://github.com/twbs/bootstrap/issues/19398.
  67. color: $input-color;
  68. background-color: $input-bg;
  69. }
  70. }
  71. // Make file inputs better match text inputs by forcing them to new lines.
  72. .form-control-file,
  73. .form-control-range {
  74. display: block;
  75. width: 100%;
  76. }
  77. //
  78. // Labels
  79. //
  80. // For use with horizontal and inline forms, when you need the label (or legend)
  81. // text to align with the form controls.
  82. .col-form-label {
  83. padding-top: add($input-padding-y, $input-border-width);
  84. padding-bottom: add($input-padding-y, $input-border-width);
  85. margin-bottom: 0; // Override the `<label>/<legend>` default
  86. @include font-size(inherit); // Override the `<legend>` default
  87. line-height: $input-line-height;
  88. margin-bottom: 15px;
  89. }
  90. .col-form-label-lg {
  91. padding-top: add($input-padding-y-lg, $input-border-width);
  92. padding-bottom: add($input-padding-y-lg, $input-border-width);
  93. @include font-size($input-font-size-lg);
  94. line-height: $input-line-height-lg;
  95. }
  96. .col-form-label-sm {
  97. padding-top: add($input-padding-y-sm, $input-border-width);
  98. padding-bottom: add($input-padding-y-sm, $input-border-width);
  99. @include font-size($input-font-size-sm);
  100. line-height: $input-line-height-sm;
  101. }
  102. // Readonly controls as plain text
  103. //
  104. // Apply class to a readonly input to make it appear like regular plain
  105. // text (without any border, background color, focus indicator)
  106. .form-control-plaintext {
  107. display: block;
  108. width: 100%;
  109. padding: $input-padding-y 0;
  110. margin-bottom: 0; // match inputs if this class comes on inputs with default margins
  111. @include font-size($input-font-size);
  112. line-height: $input-line-height;
  113. color: $input-plaintext-color;
  114. background-color: transparent;
  115. border: solid transparent;
  116. border-width: $input-border-width 0;
  117. &.form-control-sm,
  118. &.form-control-lg {
  119. padding-right: 0;
  120. padding-left: 0;
  121. }
  122. }
  123. // Form control sizing
  124. //
  125. // Build on `.form-control` with modifier classes to decrease or increase the
  126. // height and font-size of form controls.
  127. //
  128. // Repeated in `_input_group.scss` to avoid Sass extend issues.
  129. .form-control-sm {
  130. height: $input-height-sm;
  131. padding: $input-padding-y-sm $input-padding-x-sm;
  132. @include font-size($input-font-size-sm);
  133. line-height: $input-line-height-sm;
  134. @include border-radius($input-border-radius-sm);
  135. }
  136. .form-control-lg {
  137. height: $input-height-lg;
  138. padding: $input-padding-y-lg $input-padding-x-lg;
  139. @include font-size($input-font-size-lg);
  140. line-height: $input-line-height-lg;
  141. @include border-radius($input-border-radius-lg);
  142. }
  143. // stylelint-disable-next-line no-duplicate-selectors
  144. select.form-control {
  145. &[size],
  146. &[multiple] {
  147. height: auto;
  148. }
  149. }
  150. textarea.form-control {
  151. height: auto;
  152. }
  153. // Form groups
  154. //
  155. // Designed to help with the organization and spacing of vertical forms. For
  156. // horizontal forms, use the predefined grid classes.
  157. .form-group {
  158. margin-bottom: $form-group-margin-bottom;
  159. }
  160. .form-text {
  161. display: block;
  162. margin-top: $form-text-margin-top;
  163. }
  164. // Form grid
  165. //
  166. // Special replacement for our grid system's `.row` for tighter form layouts.
  167. .form-row {
  168. display: flex;
  169. flex-wrap: wrap;
  170. margin-right: -$form-grid-gutter-width / 2;
  171. margin-left: -$form-grid-gutter-width / 2;
  172. > .col,
  173. > [class*="col-"] {
  174. padding-right: $form-grid-gutter-width / 2;
  175. padding-left: $form-grid-gutter-width / 2;
  176. }
  177. }
  178. // Checkboxes and radios
  179. //
  180. // Indent the labels to position radios/checkboxes as hanging controls.
  181. .form-check {
  182. position: relative;
  183. display: block;
  184. padding-left: $form-check-input-gutter;
  185. }
  186. .form-check-input {
  187. position: absolute;
  188. margin-top: $form-check-input-margin-y;
  189. margin-left: -$form-check-input-gutter;
  190. // Use [disabled] and :disabled for workaround https://github.com/twbs/bootstrap/issues/28247
  191. &[disabled] ~ .form-check-label,
  192. &:disabled ~ .form-check-label {
  193. color: $text-muted;
  194. }
  195. }
  196. .form-check-label {
  197. margin-bottom: 0; // Override default `<label>` bottom margin
  198. }
  199. .form-check-inline {
  200. display: inline-flex;
  201. align-items: center;
  202. padding-left: 0; // Override base .form-check
  203. margin-right: $form-check-inline-margin-x;
  204. // Undo .form-check-input defaults and add some `margin-right`.
  205. .form-check-input {
  206. position: static;
  207. margin-top: 0;
  208. margin-right: $form-check-inline-input-margin-x;
  209. margin-left: 0;
  210. }
  211. }
  212. // Form validation
  213. //
  214. // Provide feedback to users when form field values are valid or invalid. Works
  215. // primarily for client-side validation via scoped `:invalid` and `:valid`
  216. // pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
  217. // server side validation.
  218. @each $state, $data in $form-validation-states {
  219. @include form-validation-state($state, map-get($data, color), map-get($data, icon));
  220. }
  221. // Inline forms
  222. //
  223. // Make forms appear inline(-block) by adding the `.form-inline` class. Inline
  224. // forms begin stacked on extra small (mobile) devices and then go inline when
  225. // viewports reach <768px.
  226. //
  227. // Requires wrapping inputs and labels with `.form-group` for proper display of
  228. // default HTML form controls and our custom form controls (e.g., input groups).
  229. .form-inline {
  230. display: flex;
  231. flex-flow: row wrap;
  232. align-items: center; // Prevent shorter elements from growing to same height as others (e.g., small buttons growing to normal sized button height)
  233. // Because we use flex, the initial sizing of checkboxes is collapsed and
  234. // doesn't occupy the full-width (which is what we want for xs grid tier),
  235. // so we force that here.
  236. .form-check {
  237. width: 100%;
  238. }
  239. // Kick in the inline
  240. @include media-breakpoint-up(sm) {
  241. label {
  242. display: flex;
  243. align-items: center;
  244. justify-content: center;
  245. margin-bottom: 0;
  246. }
  247. // Inline-block all the things for "inline"
  248. .form-group {
  249. display: flex;
  250. flex: 0 0 auto;
  251. flex-flow: row wrap;
  252. align-items: center;
  253. margin-bottom: 0;
  254. }
  255. // Allow folks to *not* use `.form-group`
  256. .form-control {
  257. display: inline-block;
  258. width: auto; // Prevent labels from stacking above inputs in `.form-group`
  259. vertical-align: middle;
  260. }
  261. // Make static controls behave like regular ones
  262. .form-control-plaintext {
  263. display: inline-block;
  264. }
  265. .input-group,
  266. .custom-select {
  267. width: auto;
  268. }
  269. // Remove default margin on radios/checkboxes that were used for stacking, and
  270. // then undo the floating of radios and checkboxes to match.
  271. .form-check {
  272. display: flex;
  273. align-items: center;
  274. justify-content: center;
  275. width: auto;
  276. padding-left: 0;
  277. }
  278. .form-check-input {
  279. position: relative;
  280. flex-shrink: 0;
  281. margin-top: 0;
  282. margin-right: $form-check-input-margin-x;
  283. margin-left: 0;
  284. }
  285. .custom-control {
  286. align-items: center;
  287. justify-content: center;
  288. }
  289. .custom-control-label {
  290. margin-bottom: 0;
  291. }
  292. }
  293. }
  294. .uk-form-tanggal-1 {
  295. position: relative;
  296. width: 47%;
  297. float: left;
  298. }
  299. .uk-form-tanggal-2 {
  300. position: relative;
  301. width: 47%;
  302. float: right;
  303. }
  304. // .heading-penjadwalan-2{
  305. // margin: 20px;
  306. // margin-top:-20px;
  307. // margin-right: 20px;
  308. // padding: 20px;
  309. // background-color: #E3F0FF;
  310. // }