Skip to content

Instantly share code, notes, and snippets.

@Austin-Sebastian
Austin-Sebastian / editable-syntax-highlighted-code-using-z-indexes.markdown
Created September 7, 2021 10:27
Editable, syntax-highlighted code using z-indexes

Editable, syntax-highlighted code using z-indexes

This is the demo for an article I wrote on CSS-Tricks on how to use a conventional syntax-highlighting library to create an editable input for code that supports syntax highlighting, and acts like a textarea.

The textarea, almost completely transparent except for the caret-color, is positioned on top of the syntax-highlighted block using z-indexes, and the result is synchronised whenever the user enters code.

Due to a suggestion in a comment to the article, I have created a custom element for this technique in this Pen.

A Pen by Austin on CodePen.

@Austin-Sebastian
Austin-Sebastian / 3-pseudo-element-tips-and-tricks.markdown
Created September 3, 2021 05:09
3 pseudo-element tips and tricks
@Austin-Sebastian
Austin-Sebastian / fancy-up-those-social-media-icons.markdown
Created July 6, 2021 06:42
Fancy Up Those Social Media Icons!!!

Fancy Up Those Social Media Icons!!!

Alternative ideas to just using plain boring social media icons. Uses FontAwesome.

A Pen by Brandon Kennedy on CodePen.

License.

@Austin-Sebastian
Austin-Sebastian / index.html
Created July 6, 2021 06:40
Social Media Icons hover effect
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="wrapper">
<ul>
<li class="facebook">
<i class="fa fa-facebook" aria-hidden="true"></i>
<div class="slider">
<p>facebook</p>
</div>
</li>