Created
June 21, 2012 00:23
-
-
Save spilliams/2963126 to your computer and use it in GitHub Desktop.
css magicks!
This file contains 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
/* flag links that don't go anywhere */ | |
a[href = ""] { | |
background: red; | |
color: white; | |
font-size: x-large; | |
} | |
/* flag absolute links */ | |
a[href ^= http] { | |
display: inline-block; | |
color: red; | |
transform: rotate(180deg); | |
} | |
/* flag external links */ | |
a[href ^= 'http']:not([href *= 'html5rocks.']) { | |
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjZBNEMyQzFFQjMyMTFFMEFFMDQ5RTQwMzY2RTI0QUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjZBNEMyQzJFQjMyMTFFMEFFMDQ5RTQwMzY2RTI0QUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGNkE0QzJCRkVCMzIxMUUwQUUwNDlFNDAzNjZFMjRBQyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNkE0QzJDMEVCMzIxMUUwQUUwNDlFNDAzNjZFMjRBQyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pj9w8uQAAABOSURBVHjajJDbCQAwCAO1dFg30m1T8iH0KQ0IQSQ5VAASEZBCTT7U05iZ3g7Y8pWkZKrEpL5D32obly+eBZxpPMzU4yXuDnJxZj/PEGAAPk46EE/MQmgAAAAASUVORK5CYII=) no-repeat center right; | |
padding-right: 16px; | |
} | |
/* invert all PNGs */ | |
img[src $= .png] { | |
filter: invert(100%); | |
} | |
/* see the head */ | |
head { | |
display: block; | |
border-bottom: 5px solid red; | |
} | |
script, style, link { | |
display: block; | |
white-space: pre; | |
font-family: monospace; | |
} | |
/* wrap tags */ | |
script:before { | |
content: "<script src=\"" attr(src) "\" type=\"" attr(type) "\">"; | |
} | |
script:after { | |
content: “</script>”; | |
} | |
style:before { | |
content: "<style type=\"" attr(type) "\">"; | |
} | |
style:after { | |
content: "< /style>"; | |
} | |
link:before { | |
content: "<link rel=\"" attr(rel) "\" type=\"" attr(type) "\" href=\"" attr(href) "\" />"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment