Skip to content

Instantly share code, notes, and snippets.

View flexbox's full-sized avatar

David Leuliette flexbox

View GitHub Profile
@flexbox
flexbox / reset-button--ios.css
Created May 21, 2013 15:05
A little hack to reset default style for iOs button
.button {
-webkit-border-radius: 0px;
-webkit-appearance: button;
-webkit-font-smoothing: antialiased;
}
mymodule {
@at-root {
.#{&}-header { ... }
.#{&}-footer { ... }
.#{&}-body {
a { ... }
span { ... }
p { ... }
}
}
@flexbox
flexbox / seo_multilang.html
Last active December 17, 2015 22:49
multilang SEO friendly in ruby on rails
<% hreflang = locale == :fr ? 'en' : 'fr' %>
<link href="<%= "http://#{request.host}:#{request.port}#{request.fullpath}" %>" hreflang="<%= hreflang %>" rel="alternate" />
@flexbox
flexbox / autofocus.slim
Last active July 16, 2018 13:22
ruby on rails - simple_form syntax helper
= f.input :name, input_html: { autofocus: f.object.name.blank? }
@flexbox
flexbox / animate_showlabel.css
Created August 14, 2013 09:37
A nice animate transition for corner label on images
a.shop-picture span {
position: absolute;
display: block;
background-position: 196px 0px;
background-repeat: no-repeat;
width: 282px;
height: 192px;
margin: -186px 0 0 -6px;
animation: showlabel 1s;
-moz-animation: showlabel 1s;
@flexbox
flexbox / interchange_helper.rb
Last active December 29, 2016 21:20
[ruby on rails] - Image helper for retina display with foundation interchange
module ApplicationHelper
def retina_image_tag(default_name, options={})
retina_name = default_name.gsub(%r{\.\w+$}, '@2x\0')
retina_image_tag(default_name, options.merge('data-interchange' => "[#{asset_path(retina_name)}, (retina)]"))
end
end
@flexbox
flexbox / _pictos.scss
Last active December 25, 2015 20:49
[sass] - Build fast & automated sprite for retina display
//first we'll define the folders where the sprites are and their layouts
$pictos: sprite-map("sprite/pictos/*.png", $layout: smart);
$pictos-2x: sprite-map("sprite/pictos2x/*.png", $layout: smart);
.picto-share_facebook {
@include use-sprite("share_facebook", $pictos, $pictos-2x);
}
.picto-share_google {
@include use-sprite("share_google", $pictos, $pictos-2x);
@flexbox
flexbox / gmaps-poi.coffee
Created February 5, 2014 13:57
[coffeescript] - Remove useless POI in google maps
window.onload = ->
styles = [
featureType: "poi"
stylers: [visibility: "off"]
]
styledMap = new google.maps.StyledMapType(styles,
name: "Styled Map"
)
mapOptions =
zoom: 11

Contract Killer

Le contrat open-source à destination des designers et développeurs Web par Stuff & Nonsense


@flexbox
flexbox / header-background.css
Last active August 29, 2015 13:57
[css] - header backgound animate
.header-image {
animation: 35s linear 0s normal none infinite movebg;
background: url("/playground/uploads/upload/upload/289/bkgd3.jpg") repeat scroll 0 0 rgba(0, 0, 0, 0);
margin-top: -80px;
padding-bottom: 7em;
padding-top: 160px;
}
@-moz-keyframes movebg {
0% {