Skip to content

Instantly share code, notes, and snippets.

View jonathansousa's full-sized avatar

Jonathan D. Sousa jonathansousa

  • Zuno, Inc.
  • Washington, DC
  • 09:29 (UTC -04:00)
View GitHub Profile
@jonathansousa
jonathansousa / CSS: Offscreen Text
Created November 5, 2012 19:13
CSS: Offscreen Text
.textOffscreen {
text-indent: -9999px;
overflow: hidden;
text-decoration: none;
display: block;
font-size: 0;
text-align: start;
}
@jonathansousa
jonathansousa / iOSDrawRectExample
Created October 5, 2012 19:47
iOS DrawRect Code
- (void)drawRect:(CGRect)rect {
// CGRect bounds = [self bounds];
CGContextRef ref = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(ref, 1.0);
CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB();
CGFloat components[] = {0.4, 0.4, 0.4, 1.0};
CGColorRef color = CGColorCreate(colorspace, components);
CGContextSetStrokeColorWithColor(ref, color);
CGContextMoveToPoint(ref, 111, 5);
CGContextAddLineToPoint(ref, 282, 5);
@jonathansousa
jonathansousa / dabblet.css
Created September 11, 2012 18:32
Clipping Test
/**
* Clipping Test
*/
body {
background-color:blue;
}
img {
background-color:red;
position: absolute;
top:30px;
@jonathansousa
jonathansousa / dabblet.css
Created August 7, 2012 22:17
Column/Background Bug Test
/**
* Column/Background Bug Test
*/
ul {
-moz-column-count: 2;
-moz-column-gap: 5px;
-webkit-column-count: 2;
-webkit-column-gap: 5px;
column-count: 2;
column-gap: 5px;
@jonathansousa
jonathansousa / dabblet.css
Created August 7, 2012 18:50
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@jonathansousa
jonathansousa / dabblet.css
Created August 7, 2012 18:48
Column/Background Bug Test
/**
* Column/Background Bug Test
*/
ul {
-moz-column-count: 2;
-moz-column-gap: 5px;
-webkit-column-count: 2;
-webkit-column-gap: 5px;
column-count: 2;
column-gap: 5px;
@jonathansousa
jonathansousa / dabblet.css
Created July 9, 2012 23:30
Fixed/Flowed Demo
/**
* Fixed/Flowed Demo
*/
body {
box-sizing:border-box;
background:green;
}
.container {
width:100%
}
@jonathansousa
jonathansousa / dabblet.css
Created July 9, 2012 23:30
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
box-sizing:border-box;
background:green;
}
.container {
width:100%
}
@jonathansousa
jonathansousa / dabblet.css
Created July 9, 2012 22:56
Checkbox Slider
/**
* Checkbox Slider
*/
input[type=checkbox] {
visibility: hidden;
}
.form_slider {
position: relative;
width: 33px;
height: 9px;
@jonathansousa
jonathansousa / dabblet.css
Created July 5, 2012 16:56
Checkbox Slider
/**
* Checkbox Slider
*/
input[type=checkbox] {
visibility: hidden;
}
.form_slider {
position: relative;
width: 33px;
height: 9px;