Created
March 10, 2016 12:33
-
-
Save yratof/fd96a4c3c9ef555bb529 to your computer and use it in GitHub Desktop.
Style broken img tags
This file contains hidden or 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
| img { | |
| /* Same as first example */ | |
| min-height: 50px; | |
| &:before { | |
| content: " "; | |
| display: block; | |
| position: absolute; | |
| top: -10px; | |
| left: 0; | |
| height: calc(100% + 10px); | |
| width: 100%; | |
| background-color: rgb(230, 230, 230); | |
| border: 2px dotted rgb(200, 200, 200); | |
| border-radius: 5px; | |
| } | |
| &:after { | |
| content: "\f127" " Broken Image of " attr(alt); | |
| display: block; | |
| font-size: 16px; | |
| font-style: normal; | |
| font-family: FontAwesome; | |
| color: rgb(100, 100, 100); | |
| position: absolute; | |
| top: 5px; | |
| left: 0; | |
| width: 100%; | |
| text-align: center; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment