{"id":14263,"date":"2011-09-06T20:30:19","date_gmt":"2011-09-07T03:30:19","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=14263"},"modified":"2011-09-06T20:30:19","modified_gmt":"2011-09-07T03:30:19","slug":"r","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/selectors\/r\/","title":{"rendered":"R"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"author":1036,"featured_media":0,"parent":13708,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"page-almanac-group.php","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":""},"tags":[],"acf":[],"jetpack-related-posts":[{"id":13945,"url":"https:\/\/css-tricks.com\/almanac\/properties\/r\/","url_meta":{"origin":14263,"position":0},"title":"R","date":"August 31, 2011","format":false,"excerpt":"","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3823,"url":"https:\/\/css-tricks.com\/snippets\/php\/convert-hex-to-rgb\/","url_meta":{"origin":14263,"position":1},"title":"Convert HEX to RGB","date":"September 4, 2009","format":false,"excerpt":"Give function hex code (e.g. #eeeeee), returns array of RGB values. function hex2rgb( $colour ) { if ( $colour[0] == '#' ) { $colour = substr( $colour, 1 ); } if ( strlen( $colour ) == 6 ) { list( $r, $g, $b ) = array( $colour[0] . $colour[1], $colour[2]\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":19646,"url":"https:\/\/css-tricks.com\/snippets\/javascript\/lighten-darken-color\/","url_meta":{"origin":14263,"position":2},"title":"Lighten \/ Darken Color","date":"January 1, 2013","format":false,"excerpt":"The CSS preprocessors Sass and Less can take any color and darken() or lighten() it by a specific value. But no such ability is built into JavaScript. This function takes colors in hex format (i.e. #F06D06, with or without hash) and lightens or darkens them with a value. function LightenDarkenColor(col,\u2026","rel":"","context":"In \"color\"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3827,"url":"https:\/\/css-tricks.com\/snippets\/htaccess\/www-no-www\/","url_meta":{"origin":14263,"position":3},"title":"WWW \/ No-WWW","date":"September 4, 2009","format":false,"excerpt":"You should really be doing one or the other. For consistency, as well as SEO's, sake. Force the www. RewriteEngine On RewriteCond %{HTTP_HOST} ^your-site.com [NC] RewriteRule ^(.*)$ http:\/\/www.your-site.com\/$1 [L,R=301] Remove the www. RewriteEngine On RewriteCond %{HTTP_HOST} !^your-site.com$ [NC] RewriteRule ^(.*)$ http:\/\/your-site.com\/$1 [L,R=301]","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":196692,"url":"https:\/\/css-tricks.com\/snippets\/javascript\/cross-browser-dependency-free-dom-ready\/","url_meta":{"origin":14263,"position":4},"title":"Cross-Browser Dependency-Free DOM Ready","date":"February 24, 2015","format":false,"excerpt":"Denis Ciccale's version: var DOMReady = function(a, b, c) { b = document c = 'addEventListener' b[c] ? b[c]('DocumentContentLoaded', a) : window.attachEvent('onload', a) } DOMReady(function () { alert('The DOM is Ready!'); }); Minimized: var DOMReady = function(a,b,c){b=document,c='addEventListener';b[c]?b[c]('DOMContentLoaded',a):window.attachEvent('onload',a)} Dustin Diaz's version: function r(f){\/in\/.test(document.readyState)?setTimeout('r('+f+')',9):f()} He also had a repo for it where\u2026","rel":"","context":"With 3 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14097,"url":"https:\/\/css-tricks.com\/almanac\/properties\/r\/right\/","url_meta":{"origin":14263,"position":5},"title":"right","date":"September 6, 2011","format":false,"excerpt":"The right property in CSS goes hand in hand with positioning. By default, elements are static positioned in which the top property has no effect whatsoever. But when the positioning of an element is relative, absolute, or fixed, the bottom value plays a big role. div { right: value (px,\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2011\/08\/nudge.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14263"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/1036"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=14263"}],"version-history":[{"count":1,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14263\/revisions"}],"predecessor-version":[{"id":14264,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14263\/revisions\/14264"}],"up":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/13708"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=14263"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=14263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}