Skip to content

Instantly share code, notes, and snippets.

<label class="input-container">
Your label goes here
<input type="text" />
</label>
<label class="input-container">
<input type="text" class="input-error" />
</label>
@eddytseng
eddytseng / navbar.css
Created October 24, 2017 00:02
Navigation for Catherine's portfolio.
body {
font-family: sans-serif;
margin: 0;
padding: 0;
}
.global-navigation {
max-width: 1140px;
margin: 0 auto;
@eddytseng
eddytseng / tooltip.css
Last active October 10, 2017 18:23
CSS only custom tooltip
[tooltip] {
position: relative;
}
[tooltip]::before {
top: 100%;
left: 50%;
width: 0;
height: 0;
@eddytseng
eddytseng / clearfix.css
Created May 3, 2017 18:37
Clearfix - force an element to self clear its children
.clearfix:after {
clear: both;
display: table;
content: '';
}
@eddytseng
eddytseng / hide-text.css
Created May 2, 2017 23:50
CSS to hide text. Useful when replacing text with an image.
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@eddytseng
eddytseng / counter.controller.js
Last active May 21, 2018 12:21
Angularjs counter component
function CounterController() {
this.increment = function() {
this.count++;
};
this.decrement = function() {
this.count--;
};
}