Skip to content

Instantly share code, notes, and snippets.

@oldergod
Created June 30, 2016 05:06
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 oldergod/ec8403175b762aba9d24a5ebe1636d4e to your computer and use it in GitHub Desktop.
Save oldergod/ec8403175b762aba9d24a5ebe1636d4e to your computer and use it in GitHub Desktop.
CSS Coding Tips: Inheritance
/**
* CSS Coding Tips: Inheritance
*/
div {
margin-top: 50px;
position: relative;
border: 1px solid black;
background: pink;
}
div::before {
content: '';
position: absolute;
top: -.4em;
left: 1em;
padding: .35em;
background: inherit;
border: inherit;
border-right: 0;
border-bottom: 0;
transform: rotate(45deg);
}
<div>Some text</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"80","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment