Created
September 14, 2017 07:43
-
-
Save radum/1db0c3c782f290eba7f0168227f60eac to your computer and use it in GitHub Desktop.
Fitgrid - CSS Grid
This file contains 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
/* | |
_______ ___ _______ _______ ______ ___ ______ | |
| || | | | | || _ | | | | | | |
| ___|| | |_ _| | ___|| | || | | | _ | | |
| |___ | | | | | | __ | |_||_ | | | | | | | |
| ___|| | | | | || || __ || | | |_| | | |
| | | | | | | |_| || | | || | | | | |
|___| |___| |___| |_______||___| |_||___| |______| | |
by Dave Rupert | |
Read More: https://daverupert.com/2017/09/breaking-the-grid/ | |
*/ | |
/* | |
* Remove `min-width: auto` from Grid Items | |
* Fixes overflow-x items. | |
*/ | |
.fit-grid > * { min-width: 0; } | |
/* Apply max-width to Replaced Elements and Form controls */ | |
.fit-grid img, | |
.fit-grid video, | |
.fit-grid audio, | |
.fit-grid canvas, | |
.fit-grid input, | |
.fit-grid select, | |
.fit-grid button, | |
.fit-grid progress { max-width: 100%; } | |
/* Make file and submit inputs text-wrap */ | |
.fit-grid input[type="file"], | |
.fit-grid input[type="submit"] { white-space: pre-wrap; } | |
/* Fix Progress and Range Inputs */ | |
.fit-grid progress, | |
.fit-grid input[type="range"] { width: 100%; } | |
/* Fix Number Inputs in Firefox */ | |
@supports (--moz-appearance: none) { | |
.fit-grid input[type="number"] { width: 100%; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment