This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // simple sample _partial.scss file. | |
| // this partial only needs to apply positional style | |
| // because all visual styles are driven by @mixins from a controlled source. | |
| .modal.form { | |
| form { | |
| p { | |
| display: inline-block; | |
| width: 50%; | |
| margin: 10px 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var github = (function(){ | |
| function render(target, repos){ | |
| var i = 0, fragment = '', t = $(target)[0]; | |
| for(i = 0; i < repos.length; i++) { | |
| fragment += '<li><a href="'+repos[i].html_url+'">'+repos[i].name+'</a><p>'+repos[i].description+'</p></li>'; | |
| } | |
| t.innerHTML = fragment; | |
| } | |
| return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| html, body, div { margin: 0; padding: 0; position: fixed; top: 0; right: 0; bottom: 0; left: 0; height: 100%; width: 100%; } | |
| div { display: table; text-align: center; } | |
| img { display: table-cell; vertical-align: middle; position: relative; } | |
| </style> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ul.beveled { | |
| background-color: #efefef; /* any color darker than white */ | |
| list-style-type: none; | |
| margin: 0; | |
| } | |
| ul.beveled li:not(:first-of-type) { | |
| border-top: 1px solid rgba(255,255,255, 0.2; | |
| } | |
| ul.beveled li:not(:last-of-type) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ul.beveled | |
| - 4.times do | |
| li List item |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| body { | |
| /* Replace your image in this spot. */ | |
| background-image: url("yourimage.png"); | |
| /* set a color here */ | |
| background-color: #efefef; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # line 42 of image_tag.rb | |
| +++ "<span class=\"image-wrapper #{@img['class']}\"><img #{@img.collect {|k,v| "#{k}=\"#{v}\"" if v}.join(" ")}></span>" | |
| --- "<img #{@img.collect {|k,v| "#{k}=\"#{v}\"" if v}.join(" ")}>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * image loads on hover. | |
| * users (think mobile) may experience a delay loading the image. | |
| */ | |
| .class { | |
| background-image: url('some-image'); | |
| display: none; | |
| } | |
| .class:hover { display: block; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $page-padding: 20px; | |
| $mobile-page-padding: 10px; | |
| #content { padding: $page-padding; } | |
| @media only screen and (max-width: 599px) { | |
| $page-padding: $mobile-page-padding; | |
| #content { padding: $page-padding; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Or use this method... | |
| // | |
| // E[foo$="bar"] | |
| // an E element whose "foo" attribute value ends exactly with the string "bar" | |
| // | |
| // http://www.w3.org/TR/css3-selectors/#attribute-selectors | |
| a.category[href$="css/"] { | |
| padding-left: 20px; | |
| background: url('your-icon.png') left center no-repeat; |