| 
									
										
										
										
											2025-08-28 12:14:59 +08:00
										 |  |  | @use "sass:map"; | 
					
						
							|  |  |  | @use "sass:string"; | 
					
						
							|  |  |  | @use "../variables" as *; | 
					
						
							|  |  |  | @use "../vendor/rfs" as *; | 
					
						
							|  |  |  | @use "../mixins/border-radius" as *; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-19 02:38:47 +08:00
										 |  |  | //
 | 
					
						
							| 
									
										
										
										
											2013-07-28 09:56:31 +08:00
										 |  |  | // Base styles
 | 
					
						
							| 
									
										
										
										
											2015-04-19 02:38:47 +08:00
										 |  |  | //
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-07-28 09:56:31 +08:00
										 |  |  | .input-group { | 
					
						
							| 
									
										
										
										
											2015-04-27 16:43:30 +08:00
										 |  |  |   position: relative; | 
					
						
							| 
									
										
										
										
											2016-12-22 12:26:17 +08:00
										 |  |  |   display: flex; | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  |   flex-wrap: wrap; // For form validation feedback
 | 
					
						
							| 
									
										
										
										
											2017-10-03 01:13:09 +08:00
										 |  |  |   align-items: stretch; | 
					
						
							| 
									
										
										
										
											2015-12-09 16:40:32 +08:00
										 |  |  |   width: 100%; | 
					
						
							| 
									
										
										
										
											2015-04-27 16:43:30 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-13 15:40:55 +08:00
										 |  |  |   > .form-control, | 
					
						
							| 
									
										
										
										
											2022-07-18 11:50:41 +08:00
										 |  |  |   > .form-select, | 
					
						
							|  |  |  |   > .form-floating { | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  |     position: relative; // For focus state's z-index
 | 
					
						
							| 
									
										
										
										
											2020-01-23 23:30:31 +08:00
										 |  |  |     flex: 1 1 auto; | 
					
						
							|  |  |  |     width: 1%; | 
					
						
							| 
									
										
										
										
											2019-08-06 15:54:53 +08:00
										 |  |  |     min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
 | 
					
						
							| 
									
										
										
										
											2013-07-28 09:56:31 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-07 16:30:43 +08:00
										 |  |  |   // Bring the "active" form control to the top of surrounding elements
 | 
					
						
							|  |  |  |   > .form-control:focus, | 
					
						
							| 
									
										
										
										
											2022-07-18 11:50:41 +08:00
										 |  |  |   > .form-select:focus, | 
					
						
							|  |  |  |   > .form-floating:focus-within { | 
					
						
							| 
									
										
										
										
											2022-08-31 22:17:58 +08:00
										 |  |  |     z-index: 5; | 
					
						
							| 
									
										
										
										
											2018-05-07 16:30:43 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  |   // Ensure buttons are always above inputs for more visually pleasing borders.
 | 
					
						
							|  |  |  |   // This isn't needed for `.input-group-text` since it shares the same border-color
 | 
					
						
							|  |  |  |   // as our inputs.
 | 
					
						
							|  |  |  |   .btn { | 
					
						
							|  |  |  |     position: relative; | 
					
						
							|  |  |  |     z-index: 2; | 
					
						
							| 
									
										
										
										
											2018-09-18 20:29:02 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     &:focus { | 
					
						
							| 
									
										
										
										
											2022-08-31 22:17:58 +08:00
										 |  |  |       z-index: 5; | 
					
						
							| 
									
										
										
										
											2018-09-18 20:29:02 +08:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  |   } | 
					
						
							| 
									
										
										
										
											2015-04-19 02:38:47 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-08-13 05:03:57 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  | // Textual addons
 | 
					
						
							| 
									
										
										
										
											2015-04-19 02:38:47 +08:00
										 |  |  | //
 | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  | // Serves as a catch-all element for any text or radio/checkbox input you wish
 | 
					
						
							|  |  |  | // to prepend or append to an input.
 | 
					
						
							| 
									
										
										
										
											2015-04-19 02:38:47 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  | .input-group-text { | 
					
						
							| 
									
										
										
										
											2017-12-31 22:38:29 +08:00
										 |  |  |   display: flex; | 
					
						
							|  |  |  |   align-items: center; | 
					
						
							| 
									
										
										
										
											2020-09-23 21:48:37 +08:00
										 |  |  |   padding: $input-group-addon-padding-y $input-group-addon-padding-x; | 
					
						
							| 
									
										
										
										
											2019-02-08 06:32:05 +08:00
										 |  |  |   @include font-size($input-font-size); // Match inputs
 | 
					
						
							| 
									
										
										
										
											2020-09-23 21:48:37 +08:00
										 |  |  |   font-weight: $input-group-addon-font-weight; | 
					
						
							| 
									
										
										
										
											2017-10-19 15:05:07 +08:00
										 |  |  |   line-height: $input-line-height; | 
					
						
							| 
									
										
										
										
											2017-07-14 02:11:37 +08:00
										 |  |  |   color: $input-group-addon-color; | 
					
						
							| 
									
										
										
										
											2013-07-28 09:56:31 +08:00
										 |  |  |   text-align: center; | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  |   white-space: nowrap; | 
					
						
							| 
									
										
										
										
											2014-12-03 06:02:35 +08:00
										 |  |  |   background-color: $input-group-addon-bg; | 
					
						
							| 
									
										
										
										
											2017-10-19 15:05:07 +08:00
										 |  |  |   border: $input-border-width solid $input-group-addon-border-color; | 
					
						
							| 
									
										
										
										
											2016-07-28 12:12:44 +08:00
										 |  |  |   @include border-radius($input-border-radius); | 
					
						
							| 
									
										
										
										
											2013-07-28 09:56:31 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-19 02:38:47 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  | // Sizing
 | 
					
						
							| 
									
										
										
										
											2015-04-19 02:38:47 +08:00
										 |  |  | //
 | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  | // Remix the default form control sizing classes into new ones for easier
 | 
					
						
							|  |  |  | // manipulation.
 | 
					
						
							| 
									
										
										
										
											2017-10-20 04:04:39 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  | .input-group-lg > .form-control, | 
					
						
							| 
									
										
											  
											
												v5: Forms update (#28450)
* Initial spike of consolidated form checks
* Stub out forms rearrangement
- Prepping to drop non-custom file and range inputs
- Prepping to merge custom and native checks and radios (with switches)
- Prepping to merge custom select with form select
- Moving docs arround so forms has it's own area given volume of CSS
* Move input group Sass file to forms subdir
* Start to split and move the docs around
* Simpler imports
* Copyediting
* delete overview file
* Remove commented out code
* remove the custom-forms import
* rewrite flex-check as form-check, replace all custom properties
* Remove old forms doc
* stub out new subpage link section
* update migration guide
* Update nav, forms overview in page nav, and descriptions
* fix check bg position
* fix margin-top calculation
* rename .custom-select to .form-select
* Update validation styles for new checks
* add some vertical margin, fix inline checks
* fix docs examples
* better way to do this contents stuff, redo the toc while i'm at it
* page restyle for docs while here
* un-callout that, edit text
* redo padding on toc
* fix toc
* start to cleanup checks docs
* Rewrite Markdown tables into HTML
* Redesign tables, redo their docs
* Replace Open Iconic icons with custom Bootstrap icons
* Redesign the docs navbar, add a subheader, redo the sidebar
* Redesign docs homepage a bit
* Simplify table style overrides for docs tables
* Simplify docs typography for page titles and reading line length
* Stub out icons page
* Part of sidebar update, remove migration from nav.yml
* Move toc CSS to separate partial
* Change appearance of overview page
* fix sidebar arrow direction
* Add footer to docs layout
* Update descriptions
* Drop the .form-group class for margin utilities
* Remove lingering form-group-margin-bottom var
* improve footer spacing
* add headings to range page
* uncomment form range css
* Rename .custom-range to .form-range
* Drop unused docs var
* Uncomment the comment
* Remove unused variable
* Fix radio image sizing
* Reboot update: reset horizontal ul and ol padding
* de-dupe IDs
* tweak toc styles
* nvm, fix dropdown versions stuff
* remove sidebar nav toggle for now
* broken html
* fix more broken html, move css
* scss linting
* comment out broken helper docs
* scope styles
* scope styles
* Fixes #25540 and fixes #26407 for v5 only
* Update sidebar once more
* Match new sidenav order
* fix syntax error
* Rename custom-file to form-file, update paths, update migration docs for previous changes in #28696
* rename back
* fix size and alignment
* rename that back too
											
										 
											2019-07-13 05:52:33 +08:00
										 |  |  | .input-group-lg > .form-select, | 
					
						
							| 
									
										
										
										
											2019-12-19 22:28:40 +08:00
										 |  |  | .input-group-lg > .input-group-text, | 
					
						
							|  |  |  | .input-group-lg > .btn { | 
					
						
							| 
									
										
										
										
											2018-07-16 05:00:23 +08:00
										 |  |  |   padding: $input-padding-y-lg $input-padding-x-lg; | 
					
						
							| 
									
										
										
										
											2019-02-08 06:32:05 +08:00
										 |  |  |   @include font-size($input-font-size-lg); | 
					
						
							| 
									
										
										
										
											2018-07-16 05:00:23 +08:00
										 |  |  |   @include border-radius($input-border-radius-lg); | 
					
						
							| 
									
										
										
										
											2013-07-28 09:56:31 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2017-10-20 04:04:39 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  | .input-group-sm > .form-control, | 
					
						
							| 
									
										
											  
											
												v5: Forms update (#28450)
* Initial spike of consolidated form checks
* Stub out forms rearrangement
- Prepping to drop non-custom file and range inputs
- Prepping to merge custom and native checks and radios (with switches)
- Prepping to merge custom select with form select
- Moving docs arround so forms has it's own area given volume of CSS
* Move input group Sass file to forms subdir
* Start to split and move the docs around
* Simpler imports
* Copyediting
* delete overview file
* Remove commented out code
* remove the custom-forms import
* rewrite flex-check as form-check, replace all custom properties
* Remove old forms doc
* stub out new subpage link section
* update migration guide
* Update nav, forms overview in page nav, and descriptions
* fix check bg position
* fix margin-top calculation
* rename .custom-select to .form-select
* Update validation styles for new checks
* add some vertical margin, fix inline checks
* fix docs examples
* better way to do this contents stuff, redo the toc while i'm at it
* page restyle for docs while here
* un-callout that, edit text
* redo padding on toc
* fix toc
* start to cleanup checks docs
* Rewrite Markdown tables into HTML
* Redesign tables, redo their docs
* Replace Open Iconic icons with custom Bootstrap icons
* Redesign the docs navbar, add a subheader, redo the sidebar
* Redesign docs homepage a bit
* Simplify table style overrides for docs tables
* Simplify docs typography for page titles and reading line length
* Stub out icons page
* Part of sidebar update, remove migration from nav.yml
* Move toc CSS to separate partial
* Change appearance of overview page
* fix sidebar arrow direction
* Add footer to docs layout
* Update descriptions
* Drop the .form-group class for margin utilities
* Remove lingering form-group-margin-bottom var
* improve footer spacing
* add headings to range page
* uncomment form range css
* Rename .custom-range to .form-range
* Drop unused docs var
* Uncomment the comment
* Remove unused variable
* Fix radio image sizing
* Reboot update: reset horizontal ul and ol padding
* de-dupe IDs
* tweak toc styles
* nvm, fix dropdown versions stuff
* remove sidebar nav toggle for now
* broken html
* fix more broken html, move css
* scss linting
* comment out broken helper docs
* scope styles
* scope styles
* Fixes #25540 and fixes #26407 for v5 only
* Update sidebar once more
* Match new sidenav order
* fix syntax error
* Rename custom-file to form-file, update paths, update migration docs for previous changes in #28696
* rename back
* fix size and alignment
* rename that back too
											
										 
											2019-07-13 05:52:33 +08:00
										 |  |  | .input-group-sm > .form-select, | 
					
						
							| 
									
										
										
										
											2019-12-19 22:28:40 +08:00
										 |  |  | .input-group-sm > .input-group-text, | 
					
						
							|  |  |  | .input-group-sm > .btn { | 
					
						
							| 
									
										
										
										
											2018-07-16 05:00:23 +08:00
										 |  |  |   padding: $input-padding-y-sm $input-padding-x-sm; | 
					
						
							| 
									
										
										
										
											2019-02-08 06:32:05 +08:00
										 |  |  |   @include font-size($input-font-size-sm); | 
					
						
							| 
									
										
										
										
											2018-07-16 05:00:23 +08:00
										 |  |  |   @include border-radius($input-border-radius-sm); | 
					
						
							| 
									
										
										
										
											2013-07-28 09:56:31 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2017-10-20 04:04:39 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
											  
											
												v5: Forms update (#28450)
* Initial spike of consolidated form checks
* Stub out forms rearrangement
- Prepping to drop non-custom file and range inputs
- Prepping to merge custom and native checks and radios (with switches)
- Prepping to merge custom select with form select
- Moving docs arround so forms has it's own area given volume of CSS
* Move input group Sass file to forms subdir
* Start to split and move the docs around
* Simpler imports
* Copyediting
* delete overview file
* Remove commented out code
* remove the custom-forms import
* rewrite flex-check as form-check, replace all custom properties
* Remove old forms doc
* stub out new subpage link section
* update migration guide
* Update nav, forms overview in page nav, and descriptions
* fix check bg position
* fix margin-top calculation
* rename .custom-select to .form-select
* Update validation styles for new checks
* add some vertical margin, fix inline checks
* fix docs examples
* better way to do this contents stuff, redo the toc while i'm at it
* page restyle for docs while here
* un-callout that, edit text
* redo padding on toc
* fix toc
* start to cleanup checks docs
* Rewrite Markdown tables into HTML
* Redesign tables, redo their docs
* Replace Open Iconic icons with custom Bootstrap icons
* Redesign the docs navbar, add a subheader, redo the sidebar
* Redesign docs homepage a bit
* Simplify table style overrides for docs tables
* Simplify docs typography for page titles and reading line length
* Stub out icons page
* Part of sidebar update, remove migration from nav.yml
* Move toc CSS to separate partial
* Change appearance of overview page
* fix sidebar arrow direction
* Add footer to docs layout
* Update descriptions
* Drop the .form-group class for margin utilities
* Remove lingering form-group-margin-bottom var
* improve footer spacing
* add headings to range page
* uncomment form range css
* Rename .custom-range to .form-range
* Drop unused docs var
* Uncomment the comment
* Remove unused variable
* Fix radio image sizing
* Reboot update: reset horizontal ul and ol padding
* de-dupe IDs
* tweak toc styles
* nvm, fix dropdown versions stuff
* remove sidebar nav toggle for now
* broken html
* fix more broken html, move css
* scss linting
* comment out broken helper docs
* scope styles
* scope styles
* Fixes #25540 and fixes #26407 for v5 only
* Update sidebar once more
* Match new sidenav order
* fix syntax error
* Rename custom-file to form-file, update paths, update migration docs for previous changes in #28696
* rename back
* fix size and alignment
* rename that back too
											
										 
											2019-07-13 05:52:33 +08:00
										 |  |  | .input-group-lg > .form-select, | 
					
						
							|  |  |  | .input-group-sm > .form-select { | 
					
						
							|  |  |  |   padding-right: $form-select-padding-x + $form-select-indicator-padding; | 
					
						
							| 
									
										
										
										
											2018-11-17 20:10:38 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-07-28 09:56:31 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-19 22:28:40 +08:00
										 |  |  | // Rounded corners
 | 
					
						
							| 
									
										
										
										
											2015-04-19 02:38:47 +08:00
										 |  |  | //
 | 
					
						
							| 
									
										
										
										
											2017-12-23 07:29:49 +08:00
										 |  |  | // These rulesets must come after the sizing ones to properly override sm and lg
 | 
					
						
							|  |  |  | // border-radius values when extending. They're more specific than we'd like
 | 
					
						
							|  |  |  | // with the `.input-group >` part, but without it, we cannot override the sizing.
 | 
					
						
							| 
									
										
										
										
											2016-10-28 04:40:55 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-19 22:28:40 +08:00
										 |  |  | // stylelint-disable-next-line no-duplicate-selectors
 | 
					
						
							|  |  |  | .input-group { | 
					
						
							| 
									
										
										
										
											2020-10-22 16:42:05 +08:00
										 |  |  |   &:not(.has-validation) { | 
					
						
							| 
									
										
										
										
											2022-07-18 11:50:41 +08:00
										 |  |  |     > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), | 
					
						
							|  |  |  |     > .dropdown-toggle:nth-last-child(n + 3), | 
					
						
							|  |  |  |     > .form-floating:not(:last-child) > .form-control, | 
					
						
							|  |  |  |     > .form-floating:not(:last-child) > .form-select { | 
					
						
							| 
									
										
										
										
											2020-06-26 22:06:20 +08:00
										 |  |  |       @include border-end-radius(0); | 
					
						
							| 
									
										
										
										
											2020-10-22 16:42:05 +08:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2019-12-19 22:28:40 +08:00
										 |  |  |   } | 
					
						
							| 
									
										
										
										
											2017-12-27 06:23:07 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-23 02:29:23 +08:00
										 |  |  |   &.has-validation { | 
					
						
							| 
									
										
										
										
											2022-07-18 11:50:41 +08:00
										 |  |  |     > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating), | 
					
						
							|  |  |  |     > .dropdown-toggle:nth-last-child(n + 4), | 
					
						
							|  |  |  |     > .form-floating:nth-last-child(n + 3) > .form-control, | 
					
						
							|  |  |  |     > .form-floating:nth-last-child(n + 3) > .form-select { | 
					
						
							| 
									
										
										
										
											2020-06-26 22:06:20 +08:00
										 |  |  |       @include border-end-radius(0); | 
					
						
							| 
									
										
										
										
											2020-10-23 02:29:23 +08:00
										 |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-22 16:46:25 +08:00
										 |  |  |   $validation-messages: ""; | 
					
						
							| 
									
										
										
										
											2025-08-28 12:14:59 +08:00
										 |  |  |   @each $state in map.keys($form-validation-states) { | 
					
						
							|  |  |  |     $validation-messages: $validation-messages + ":not(." + string.unquote($state) + "-tooltip)" + ":not(." + string.unquote($state) + "-feedback)"; | 
					
						
							| 
									
										
										
										
											2020-10-22 16:46:25 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-01 21:16:05 +08:00
										 |  |  |   > :not(:first-child):not(.dropdown-menu)#{$validation-messages} { | 
					
						
							| 
									
										
										
										
											2025-08-27 12:34:58 +08:00
										 |  |  |     margin-left: calc(-1 * #{$input-border-width}); | 
					
						
							| 
									
										
										
										
											2022-08-01 21:16:05 +08:00
										 |  |  |     @include border-start-radius(0); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-07-18 11:50:41 +08:00
										 |  |  |   > .form-floating:not(:first-child) > .form-control, | 
					
						
							|  |  |  |   > .form-floating:not(:first-child) > .form-select { | 
					
						
							| 
									
										
										
										
											2020-06-26 22:06:20 +08:00
										 |  |  |     @include border-start-radius(0); | 
					
						
							| 
									
										
										
										
											2019-12-19 22:28:40 +08:00
										 |  |  |   } | 
					
						
							| 
									
										
										
										
											2013-07-28 09:56:31 +08:00
										 |  |  | } |