This file contains 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
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
This file contains 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
::-webkit-input-placeholder { color:#f00; } /* Chrome/Safari */ | |
::-moz-placeholder { color:#f00; } /* Firefox */ | |
:-ms-input-placeholder { color:#f00; } /* for IE */ | |
input:-moz-placeholder { color:#f00; } /* Basic/default declaration */ | |
#name::-webkit-input-placeholder { color:#00f; margin-left:20px; } /* for an input having the ID 'name' */ |
This file contains 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
/* * Mixin for basic CSS triangles * @include triangle(up, #000, 50px) */ | |
@mixin triangle($direction:up, $color:#000, $size:100px) { | |
@if($direction == up) { | |
border-color: transparent transparent $color; | |
border-style: solid; | |
border-width: 0 $size $size; | |
height: 0; | |
width: 0; | |
} | |
@if($direction == down) { |
This file contains 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
<?php | |
function YOURTHEME_form_alter(&$form, &$form_state, $form_id) { | |
if ($form_id == 'search_block_form') { | |
$form['search_block_form']['#title'] = t('Search'); // Change the text on the label element | |
$form['search_block_form']['#title_display'] = 'invisible'; // Toggle label visibilty | |
$form['search_block_form']['#size'] = 40; // define size of the textfield | |
$form['search_block_form']['#default_value'] = t('Search'); // Set a default value for the textfield | |
$form['actions']['submit']['#value'] = t('GO!'); // Change the text on the submit button | |
$form['actions']['submit'] = array('#type' => 'image_button', '#src' => base_path() . path_to_theme() . '/images/search-button.png'); | |
// Add extra attributes to the text box |
This file contains 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
unity& disown |
This file contains 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
git push origin `git rev-parse --abbrev-ref HEAD` |
This file contains 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
element.onclick = function(event) { | |
event = event || window.event | |
if (event.preventDefault) { // if method exist | |
event.preventDefault(); | |
} else { // variant for IE<9: | |
event.returnValue = false; | |
} | |
// Can be shortcuted | |
// event.preventDefault ? event.preventDefault() : (event.returnValue=false); |
This file contains 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
<?php | |
function THEME_preprocess_page(&$vars, $hook) { | |
if (isset($vars['node']->type)) { | |
// If the content type's machine name is "my_machine_name" | |
//the file name will be "page--my-machine-name.tpl.php". | |
$vars['theme_hook_suggestions'][] = 'page__' . $vars['node']->type; | |
} | |
} | |
?> |
This file contains 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
html { | |
font-size: 62.5%; /* 1 */ | |
} | |
@function parseInt($n) { /* 2 */ | |
@return $n / ($n * 0 + 1); | |
} | |
@mixin rem($property, $values) { | |
$px : (); /* 3 */ |
This file contains 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
drush vset theme_debug 1 |
OlderNewer