Skip to content

Instantly share code, notes, and snippets.

@dominikwilkowski
Last active July 7, 2021 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dominikwilkowski/c4d3217cd2191d4bd78a1b5e6999ea1e to your computer and use it in GitHub Desktop.
Save dominikwilkowski/c4d3217cd2191d4bd78a1b5e6999ea1e to your computer and use it in GitHub Desktop.
A handy set of styles I find myself applying to all new projects
/*! Loosely derived from https://gist.github.com/jackdomleo7/55659bafe581d19cc341ef775d6a9e6b */
@import ('Import normalizer stylesheet here');
::selection {
text-shadow: none;
color: #fff;
background-color: rgba(0, 0, 255, 0.1);
}
html {
font-size: 100%;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
font-family: "Your Font Stack";
text-rendering: geometricPrecision | optimizeLegibility | optimizeSpeed;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
img {
height: auto;
max-width: 100%;
}
button {
color: inherit;
}
a,
button {
/* Anchors and buttons don't want double-tap on mobile to zoom */
touch-action: manipulation;
}
*:focus-visible,
input:focus-visible,
button:focus-visible,
[type="submit"]:focus-visible {
outline: 1px dashed var(--focus);
outline-offset: 3px;
}
input:focus-visible: {
outline-style: solid;
outline-width: 3px;
outline-offset: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment