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
.tooltip { | |
background-color: #fff; | |
&:after { | |
bottom: -9px; | |
border: 8px solid; | |
border-color: transparent transparent #fff #fff; | |
box-shadow: -3px 3px 3px 0 #aaa; | |
content: ""; | |
height: 0; |
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
// doesn't work with ios, but works with everything else. | |
var keys = { | |
37: 1, | |
38: 1, | |
39: 1, | |
40: 1 | |
}, | |
preventDefault = function (e) { | |
e = e || window.event; |
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
/* one item */ | |
li:first-child:nth-last-child(1) { | |
/* -or- li:only-child { */ | |
width: 100%; | |
} | |
/* two items */ | |
li:first-child:nth-last-child(2), |
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
// Initial source | |
// https://blogs.msdn.microsoft.com/kurlak/2013/11/03/hiding-vertical-scrollbars-with-pure-css-in-chrome-ie-6-firefox-opera-and-safari/ | |
<div class="outer-container"> | |
<div class="inner-container"> | |
<div class="element"> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer vehicula quam nibh, eu tristique tellus dignissim quis. Integer condimentum ultrices elit ut mattis. Praesent rhoncus tortor metus, nec pellentesque enim mattis nec. Nulla vitae turpis ut dui consectetur pellentesque quis vel est. Curabitur rutrum, mauris ut mollis lobortis, sem est congue lectus, ut sodales nunc leo a libero. Cras quis sapien in mi fringilla tempus condimentum quis velit. Aliquam id aliquam arcu. Morbi tristique aliquam rutrum. Duis tincidunt, orci suscipit cursus molestie, purus nisi pharetra dui, tempor dignissim felis turpis in mi. Vivamus ullamcorper arcu sit amet mauris egestas egestas. Vestibulum turpis neque, condimentum a tincidunt quis, molestie vel justo. Sed molestie nunc |
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
/** | |
* Implements hook_preprocess_node() for NODE document templates. | |
*/ | |
function THEME_preprocess_node(&$variables) { | |
// Allowed view modes | |
$view_mode = $variables['view_mode']; // Retrieve view mode | |
$allowed_view_modes = ['full']; // Array of allowed view modes (for performance so as to not execute on unneeded nodes) | |
// If view mode is in allowed view modes list, pass to THEME_add_regions_to_node() | |
if(in_array($view_mode, $allowed_view_modes)) { |
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
select { | |
appearance: none; | |
border: 1px solid black; | |
border-radius: 0; | |
font-size: 20px; | |
padding: 5px 40px 5px 5px; | |
font-family: Helvetica; | |
background: white url(http://www.8bitsports.net/wp-content/themes/meeta/functions/wpzoom/assets/images/jquery.selectBox-arrow.gif) no-repeat 95% center; | |
text-indent: 0.01px; | |
text-overflow: ''; |
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
function theme_preprocess_menu(&$variables, $hook) { | |
if ($hook == 'menu') { | |
$current_path = \Drupal::request()->getRequestUri(); | |
$items = $variables['items']; | |
foreach ($items as $key => $item) { | |
// Set active to dom element if path of menu item matches current path | |
if ($item['url']->toString() == $current_path) { | |
// Add active link. | |
$variables['items'][$key]['attributes']['class'][] = 'active'; |
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
// Custom checkbox styling. | |
.checkbox-wrapper { | |
$checkbox-height: 16px; | |
$checkbox-width: 16px; | |
label { | |
display: inline-block; | |
padding-left: ($checkbox-width + 15px); | |
position: relative; |
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
(function ($) { | |
// Alter chosen markup for dropdowns with icons. | |
$('.dropdown--hasIcons .dropdown__select').on('chosen:showing_dropdown', function (event, data) { | |
// Since items are not initially created in DOM we will alter the markup on dropdown show. | |
var resultsData = data.chosen.results_data, | |
$dropdownItems = data.chosen.dropdown.find('li'); | |
resultsData.forEach(function (result, i) { | |
$dropdownItems.eq(i).prepend('<i class="dropdown__icon dropdown__icon-' + result.value + '"></i>') | |
}); |
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
// Adjusts top offset depending on additional fixed positioned elements. | |
var windowOffsetAdjust = function() { | |
if ($window.width() < 1200) { | |
if ($body.hasClass('toolbar-vertical')) { | |
return 0; | |
} else { | |
// Adds header height. | |
return 60; | |
} | |
} else { |
OlderNewer