Skip to content

Instantly share code, notes, and snippets.

View adikahorvath's full-sized avatar
🏠
Working from home

Adam Horvath adikahorvath

🏠
Working from home
View GitHub Profile
@adikahorvath
adikahorvath / console.js
Last active August 29, 2015 14:17
console exists
if (typeof console == "object") {
console.log("hello world");
}
@adikahorvath
adikahorvath / font-smooth.css
Created March 22, 2015 16:01
font smoothing OS X
html {
-webkit-font-smoothing: none;
-webkit-font-smoothing: subpixel-antialiased;
-webkit-font-smoothing: antialiased;
}
@adikahorvath
adikahorvath / data.html
Last active August 29, 2015 14:17
change content with css & data attribute
<div data-day="M">
<span>Monday</span>
</div>
@adikahorvath
adikahorvath / regex.css
Last active August 29, 2015 14:17
regex CSS
/* if contains "post" */
div[class*="post"] {
color: red;
}
/* if begins with "post" */
div[class^="post"] {
color: red;
}
div {
object-fit: fill;
object-fit: contain;
object-fit: cover;
object-fit: none;
object-fit: scale-down;
}
@adikahorvath
adikahorvath / not.css
Created March 22, 2015 14:33
:not selector CSS
img:not(.avatar) {
height: auto;
width: 100%;
}
@adikahorvath
adikahorvath / smooth-scroll.css
Created March 22, 2015 14:24
smoother scrolling iOS5+
.smooth-scroll {
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
@adikahorvath
adikahorvath / disable-callout.css
Created March 22, 2015 14:19
disable iOS callout from links
.disable-callout {
-webkit-touch-callout: none;
}
@adikahorvath
adikahorvath / disable-click.css
Last active August 29, 2015 14:17
disable click with CSS
.disable-click {
pointer-events: none;
}
@adikahorvath
adikahorvath / wmode.html
Created March 22, 2015 14:05
wmode opaque or transparent for flash elements
<object>
<param name="wmode" value="opaque"/>
</object>
<embed wmode="transparent"></embed>