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
| // File: .storybook/config.js | |
| import { configure, addDecorator } from '@kadira/storybook'; | |
| import Theme from './../src/ui/theme'; | |
| import React from 'react'; | |
| import { ThemeProvider } from 'styled-components' | |
| function loadStories() { | |
| require('../stories'); | |
| } |
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
| // ============================================================================= | |
| // Медиа запросы | |
| // ============================================================================= | |
| // меньше указанной величины (по умолчанию ширина) | |
| @mixin below($width, $orientation: 'width') { | |
| @media screen and (max-#{$orientation}: $width) { | |
| @content; | |
| } | |
| } |
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
| // Disable scrolling. | |
| document.ontouchmove = function (e) { | |
| e.preventDefault(); | |
| } | |
| // Enable scrolling. | |
| document.ontouchmove = function () { | |
| return true; | |
| } |
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
| Обнуление пробелов между inline-block тегами | |
| Лучшее решение без порчи html задать обертке font-size: 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
| .outer:before { | |
| content: ""; | |
| display: inline-block; | |
| height: 100%; | |
| vertical-align: middle; | |
| } | |
| .inner { | |
| /* здесь не должно быть абсолютного позиционирования */ | |
| display: inline-block; |
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
| img { | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| min-width: 100%; | |
| min-height: 100%; | |
| width: auto; | |
| height: auto; | |
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
| Для Safari (iPhone / IPod / IPad) и Android браузера | |
| <meta name="format-detection" content="telephone=no"> |
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
| HTML: | |
| <div class="outer"> | |
| <div class="inner"></div> | |
| </div> | |
| CSS: | |
| .outer { | |
| position: relative; | |
| } | |
| .inner { |