Created
December 8, 2025 12:45
-
-
Save joshuamabina/b81998b3cc403e7b86cc15c5793a2eed to your computer and use it in GitHub Desktop.
Lightweight CSS: flex rows, fluid containers and clean form controls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .container-fluid { | |
| width: 100%; | |
| padding-right: 15px; | |
| padding-left: 15px; | |
| margin-right: auto; | |
| margin-left: auto; | |
| } | |
| .row { | |
| display: flex; | |
| flex-wrap: wrap; | |
| margin-bottom: 15px; | |
| justify-content: center; | |
| } | |
| .form-inline { | |
| display: flex; | |
| flex-flow: row wrap; | |
| align-items: center; | |
| } | |
| .form-inline .form-group { | |
| display: flex; | |
| flex-flow: row wrap; | |
| align-items: center; | |
| margin-left: .5rem; | |
| } | |
| .form-control, select.form-control { | |
| display: block; | |
| width: 100%; | |
| height: 40px; | |
| padding: .375rem .75rem; | |
| margin-bottom: .75rem; | |
| font-size: 1rem; | |
| line-height: 1.5; | |
| color: #495057; | |
| box-sizing: border-box; | |
| appearance: none; | |
| background-color: #fff; | |
| background-clip: padding-box; | |
| border: 1px solid #000; | |
| border-radius: .25rem; | |
| transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; | |
| } | |
| .form-control:focus-visible { | |
| outline: -webkit-focus-ring-color auto 1px; | |
| } | |
| label { | |
| display: inline-block; | |
| margin-bottom: .5rem; | |
| } | |
| button { | |
| cursor: pointer; | |
| display: inline-block; | |
| font-weight: 400; | |
| text-align: center; | |
| white-space: nowrap; | |
| user-select: none; | |
| border: 1px solid transparent; | |
| padding: .375rem .75rem; | |
| font-size: 1rem; | |
| line-height: 1.5; | |
| border-radius: .25rem; | |
| color: #000; | |
| background-color: transparent; | |
| background-image: none; | |
| border-color: #000; | |
| transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; | |
| } | |
| button:hover { | |
| color: #ffffff; | |
| background-color: #000; | |
| border-color: #000; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment