Skip to content

Instantly share code, notes, and snippets.

@zachary
Last active September 7, 2025 20:17
Show Gist options
  • Select an option

  • Save zachary/0e36b0e711059e32b8d915317ac2ae93 to your computer and use it in GitHub Desktop.

Select an option

Save zachary/0e36b0e711059e32b8d915317ac2ae93 to your computer and use it in GitHub Desktop.
all.css
/* Selectors */
* { /* Universal */ }
element { /* Type */ }
.class { /* Class */ }
#id { /* ID */ }
[attribute] { /* Attribute */ }
a:hover { /* Pseudo-class */ }
div::after { /* Pseodo-element */ }
/* Box Model */
width : 100px;
height : 50px;
padding : 10px 20px;
margin : 10px auto;
border: 1px solid #000;
box-sizing : border-box;
/* Colors */
color : # 333;
background : #f5f5f5;
opacity : 0.8;
/* Text & Fonts */
font-family : 'Arial', sans-serif;
font-size : 16px;
font-weight : bold;
line-height : 1.5;
text-align : center;
text-transform: uppercase;
letter-spacing: 1px;
text-shadow : 1px 1px 2px #aaa;
/* Display & Visiblility */
display : block | inline | inline-block | flex | grid | none;
visibility : hidden | visible;
overflow : hidden | scroll | auto;
/* Positioning */
position : static | relative | absolute | fixed | sticky; top, right, bottom, left: 0;
z-index : 10;
/* Flexbox */
display : flex;
flex-direction: row | column;
justify-content: center | space-between | space-around;
align-items : center;
flex-wrap : wrap;
gap : 10px;
/* Grid */
display : grid;
grid-tempate-columns: repeat(3, 1fr);
grid-gap : 10px;
place-items : center;
/* Backgrounds */
background-color: #fff;
background-image: url('image.jpg');
background-size: cover | contain;
background-repeat: no-repeat;
background-position: center;
/* Media Queries */
@media (max-width: 768px) {
body {
font-size: 14px;
}
}
/* Transitions & Animations */
transition : all 0.3s ease;
animation : slidenIn 2s ease-in-out infinite;
@keyframes slidenIn {
from { transform: translateX(-100%); }
to { transform: translateX(0); }
}
/* Borders & Radius */
border : 1px solid #000;
border-radius : 10px;
/* Shadows */
box-shadow : 0 2px 4px rgba(0,0,0,0.2);
text-shadow : 1px 1px 3px rgba(0,0,0,0.1);
/* Lists */
list-style : none;
list-style-type: disc | circle | square;
/* Links */
a {
text-decoration: none;
color: inherit;
}
/* Cursor & Pointer */
cursor : pointer | default | not-allowed;
/* Misc */
visibility : hidden | visible;
user-select : none;
pointer-events: none;
white-space : nowrap;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment