Resources for learning web design & front-end development:
ONLINE
Design
| /* | |
| Force WebKit to use hardware acceleration. | |
| */ | |
| .animate_smoothly { | |
| -webkit-transform: translateZ(0); | |
| } |
| // Heavy-handed way to force IE7 & IE8 to respect :last-child. | |
| // Note: Using jQuery. Adjust to suit your library, etc. | |
| // | |
| // Style via... | |
| // | |
| // element:last-child, | |
| // element.last-child { | |
| // /* Style here */ | |
| // } | |
| // |
| // After some brainstorming with coworker Ara Pehlivanian, | |
| // we came up with this monkey-patch for IE10, to help it | |
| // normalize pathname to work like all other browsers. | |
| // | |
| // This forces path to be equal to "/foo/bar" regardless | |
| // of what window.location.pathname actually resolves to: | |
| // | |
| // -- "/foo/bar" = Correct in all other browsers. | |
| // -- "foo/bar" = Incorrect in IE10. |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Detect Full-Screen</title> | |
| <style> | |
| * { | |
| font-family: sans-serif; | |
| line-height: 1.5; |
| <!-- | |
| Since Lithium is ghetto and wraps its entire | |
| template in a <center> tag, this is how I am | |
| wrestling back some measure of page control. | |
| --> | |
| </center> | |
| <!-- [Your template code here] --> |
| // Takes either an array or comma separated | |
| // parameters. Both can be called two ways: | |
| // | |
| // min(1, 2, 3, 4, 5); | |
| // max(1, 2, 3, 4, 5); | |
| // | |
| // OR: | |
| // | |
| // min([1, 2, 3, 4, 5]); | |
| // max([1, 2, 3, 4, 5]); |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Kill Inline Events</title> | |
| <style> | |
| * { | |
| font-family: sans-serif; | |
| line-height: 1.5; |
Resources for learning web design & front-end development:
ONLINE
Design
| // Protect against parseInt being used | |
| // without radix, by defaulting to 10. | |
| // Conditionally check value, in case | |
| // future implementations of parseInt | |
| // provide native base-10 by default. | |
| (function(window) { | |
| var _parseInt = window.parseInt; |
| .background_clip | |
| // Seriously, why isn't this just the | |
| // freakin' default in all browsers? | |
| +background-clip(padding-box) | |
| // Not sure what this does? Have a looksie... | |
| // http://compass-style.org/examples/compass/css3/background-clip | |
| // Crucial, if you have rounded corners on something with | |
| // both background color and a border. Without, background |