This file contains hidden or 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
| <section class="wrapper"> | |
| <div class="block"> | |
| TEXT | |
| </div> | |
| <div class="block block--disable"> | |
| TEXT | |
| </div> |
This file contains hidden or 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
| .tags-submenu | |
| height: 48px | |
| overflow-x: auto | |
| overflow-y: hidden | |
| scroll-snap-type: x proximity | |
| -webkit-overflow-scrolling: touch | |
| -ms-overflow-style: none | |
| scrollbar-width: none | |
| &::-webkit-scrollbar | |
| width: 0 |
This file contains hidden or 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
| /* SLIDE UP */ | |
| const slideUp = (target, duration = 500) => { | |
| target.style.transitionProperty = 'height, margin, padding'; | |
| target.style.transitionDuration = duration + 'ms'; | |
| target.style.boxSizing = 'border-box'; | |
| target.style.height = target.offsetHeight + 'px'; | |
| target.offsetHeight; | |
| target.style.overflow = 'hidden'; | |
| target.style.height = 0; |
This file contains hidden or 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 declOfNum(number, titles) { | |
| let cases = [2, 0, 1, 1, 1, 2]; | |
| return titles[(number % 100 > 4 && number % 100 < 20) ? 2 : cases[(number % 10 < 5) ? number % 10 : 5]]; | |
| } | |
| // Use | |
| declOfNum(price, ['рубль', 'рубля', 'рублей']) |
This file contains hidden or 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 kama_create_csv_file( $create_data, $file = null, $col_delimiter = ';', $row_delimiter = "\r\n" ){ | |
| if( ! is_array($create_data) ) | |
| return false; | |
| if( $file && ! is_dir( dirname($file) ) ) | |
| return false; | |
| // строка, которая будет записана в csv файл | |
| $CSV_str = ''; |
This file contains hidden or 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
| @media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ } | |
| @media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ } | |
| @media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ } | |
| @media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ } | |
| @media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ } | |
| @media (min-width:1281px) { /* hi-res laptops and desktops */ } |
This file contains hidden or 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 woo_style() { | |
| wp_register_style( 'my-woocommerce', get_template_directory_uri() . '/woocommerce.css', null, 1.0, 'screen' ); | |
| wp_enqueue_style( 'my-woocommerce' ); } add_action( 'wp_enqueue_scripts', 'woo_style' ); |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |