| Models | Examples |
|---|---|
| Display ads | Yahoo! |
| Search ads |
| .inset12 { | |
| margin-left: -940px; | |
| } | |
| .inset11 { | |
| margin-left: -860px; | |
| } | |
| .inset10 { | |
| margin-left: -780px; | |
| } |
| /* ---------------------------------------------------------------------------------------------------- | |
| Super Form Reset | |
| A couple of things to watch out for: | |
| - IE8: If a text input doesn't have padding on all sides or none the text won't be centered. | |
| - The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders. | |
| - You NEED to set the font-size and family on all form elements | |
| - Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs |
| <?php | |
| /** | |
| * Hide editor on specific pages. | |
| * | |
| */ | |
| add_action( 'admin_init', 'hide_editor' ); | |
| function hide_editor() { | |
| // Get the Post ID. |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
| # WordPress SEO - XML Sitemap Rewrite Fix | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^sitemap_index\.xml$ /index.php?sitemap=1 [L] | |
| RewriteRule ^([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L] | |
| </IfModule> | |
| # END WordPress SEO - XML Sitemap Rewrite Fix |
| const { parse } = require('graphql/language'); | |
| /** | |
| * Calculates the cost of a GraphQL query based on its structure. | |
| * | |
| * @param {string} query - The GraphQL query to calculate the cost for. | |
| * @param {boolean} [debug=false] - If true, additional debug information will be logged. | |
| * @return {number} The total cost of the query. | |
| */ | |
| function calculateQueryCost(query, debug = true) { |