Last active
March 19, 2019 21:56
-
-
Save lacymorrow/2626477665cbbb8d55f393e5bdf5e4be to your computer and use it in GitHub Desktop.
CSS Code Utilities
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
/* Text smoothing */ | |
body { | |
font-family: Camphor, Open Sans, Segoe UI, sans-serif; | |
text-rendering: optimizeLegibility; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} | |
/* Nice hover effect | |
button:hover { | |
color: #7795f8; | |
transform: translateY(-1px); | |
box-shadow: 0 7px 14px rgba(50,50,93,.1), 0 3px 6px rgba(0,0,0,.08); | |
} | |
/* Fade out top and bottom of scroll box that overflows */ | |
html { | |
background: white; | |
font: 120% sans-serif; | |
} | |
.scrollbox { | |
overflow: auto; | |
background: | |
/* Shadow covers */ | |
linear-gradient(white 30%, rgba(255,255,255,0)), | |
linear-gradient(rgba(255,255,255,0), white 70%) 0 100%, | |
/* Shadows */ | |
radial-gradient(50% 0, farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)), | |
radial-gradient(50% 100%,farthest-side, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%; | |
background: | |
/* Shadow covers */ | |
linear-gradient(white 30%, rgba(255,255,255,0)), | |
linear-gradient(rgba(255,255,255,0), white 70%) 0 100%, | |
/* Shadows */ | |
radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.2), rgba(0,0,0,0)), | |
radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%; | |
background-repeat: no-repeat; | |
background-color: white; | |
background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px; | |
/* Opera doesn't support this in the shorthand */ | |
background-attachment: local, local, scroll, scroll; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment