Skip to content

Instantly share code, notes, and snippets.

@luke-h1
Last active June 12, 2020 10:23
Show Gist options
  • Save luke-h1/856474dbf6a5b6a0e2a54488d9e4858f to your computer and use it in GitHub Desktop.
Save luke-h1/856474dbf6a5b6a0e2a54488d9e4858f to your computer and use it in GitHub Desktop.
shorthand-css
Padding shorthand:
```
selector {
padding: AllSides;
}
selector {
padding: TopAndBottom RightAndLeft;
}
selector {
padding: Top RightAndLeft Bottom;
}
selector {
padding: Top Right Bottom Left;
}
```
Margin shorthand:
```
If the margin property has four values:
margin: 25px 50px 75px 100px;
top margin is 25px
right margin is 50px
bottom margin is 75px
left margin is 100px
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment