{"id":273571,"date":"2016-02-04T14:08:03","date_gmt":"2016-02-04T11:08:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=273571"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=273571","title":{"rendered":"\u041f\u043e\u0434\u0431\u043e\u0440\u043a\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 SCSS"},"content":{"rendered":"<p>       \u0414\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f SCSS. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<h4>Triangle<\/h4>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0441\u044c triangle (\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u044b Sagi \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u00abchupchick\u00bb), \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0435 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a. \u0418 tooltips \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e. \u041d\u043e triangle \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<pre><code class=\"css\">\/*  * @include triangle within a pseudo element and add positioning properties (ie. top, left) * $direction: up, down, left, right *\/ @mixin triangle($direction, $size: 6px, $color: #222){   content: '';   display: block;   position: absolute;   height: 0; width: 0;   @if ($direction == 'up'){     border-bottom: $size solid $color;     border-left: 1\/2*$size solid transparent;     border-right: 1\/2*$size solid transparent;   }   @else if ($direction == 'down'){     border-top: $size solid $color;     border-left: 1\/2*$size solid transparent;     border-right: 1\/2*$size solid transparent;   }   @else if ($direction == 'left'){     border-top: 1\/2*$size solid transparent;     border-bottom: 1\/2*$size solid transparent;     border-right: $size solid $color;   }   @else if ($direction == 'right'){     border-top: 1\/2*$size solid transparent;     border-bottom: 1\/2*$size solid transparent;     border-left: $size solid $color;   } } <\/code><\/pre>\n<p>  <a name=\"habracut\"><\/a>\u0412\u043e\u0442 \u0435\u0449\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e tooltips:<\/p>\n<pre><code class=\"css\">span.tooltip:after {       content: &quot;&quot;;       position: absolute;       width: 0;       height: 0;       border-width: 10px;       border-style: solid;       border-color: transparent #FFFFFF transparent transparent;       top: 11px;       left: -24px; } <\/code><\/pre>\n<h4>Currency<\/h4>\n<p>  \u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043a\u0443\u0440\u0441\u044b \u0432\u0430\u043b\u044e\u0442. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0446\u0435\u043d\u0443 \u0438\u043b\u0438 \u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0432\u0430\u043b\u044e\u0442\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u043b\u044e\u0442\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/p>\n<pre><code class=\"css\">%currency {   position: relative;   &:before {     content: '$';     position: relative;     left: 0;   } } .USD %currency:before { content: '$'; } .EUR %currency:before { content: '\\20AC'; } \/\/ must escape the html entities for each currency symbol .ILS %currency:before { content: '\\20AA'; } .GBP %currency:before { content: '\\00A3'; } <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"css\">&lt;body class=&quot;USD&quot;&gt;         &lt;span class=&quot;price&quot;&gt;45&lt;\/span&gt; &lt;\/body&gt;  .price {     @extend %currency; } <\/code><\/pre>\n<h4>Clear Fix<\/h4>\n<p>  \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u00ab\u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0445\u00bb \u0431\u043b\u043e\u043a\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0431\u0435\u0437 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u041e\u0434\u0438\u043d \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u2014 micro clearfix <a href=\"http:\/\/nicolasgallagher.com\/micro-clearfix-hack\/\">nicolasgallagher.com\/micro-clearfix-hack<\/a> \u041d\u0438\u043a\u043e\u043b\u0430\u0441\u0430 \u0413\u0430\u043b\u043b\u0430\u0445\u0435\u0440\u0430 (Nicolas Gallagher). \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0441\u0435\u0432\u0434\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 :after.<\/p>\n<pre><code class=\"css\">%clearfix {   *zoom: 1;   &:after {     content: '';     display: table;     line-height: 0;     clear: both;   } } <\/code><\/pre>\n<h4>Respond To<\/h4>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0434\u0438\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0441\u044c Sass  <a href=\"https:\/\/habrahabr.ru\/users\/content\/\" class=\"user_link\">content<\/a>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u0442\u0438\u043b\u0435\u043c. <\/p>\n<pre><code class=\"css\">\/\/ Breakpoints for each query $smartphone: 480px; $tabletPortrait: 767px; $tabletLandscape: 1024px; $desktop: 1174px; $largeScreen: 1400px; @mixin respondTo($media) {   @if $media == smartphone {     @media (max-width: $smartphone) { @content; }   }   @else if $media == tablet {     @media (min-width: $tabletPortrait) and (max-width: $tabletLandscape) { @content; }   }   @else if $media == smallScreen {     @media (max-width: $desktop) { @content; }   }   @else if $media == desktop {     @media (min-width: $desktop) { @content; }   } } <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"css\">div {     \/\/ regular styles here     @include respondTo(desktop) {         &:hover { background: blue; } \/\/ only add the hover effect on desktop browsers     } } <\/code><\/pre>\n<h4>\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 CSS-Tricks <a href=\"https:\/\/css-tricks.com\/centering-in-the-unknown\/\">css-tricks.com\/centering-in-the-unknown<\/a> \u0434\u043b\u044f \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0435-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 HTML.<\/p>\n<pre><code class=\"css\">@mixin ghostVerticalAlign(){   &:before {     content: '';     display: inline-block;     vertical-align: middle;     height: 100%; width: .1px;   } } <\/code><\/pre>\n<h4>\u041a\u0440\u043e\u0441\u0441\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u044b\u0439 text-overflow<\/h4>\n<p>  \u041c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0443 \u0431\u043b\u043e\u0447\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0438 \u043d\u0435 \u0432\u044b\u043b\u0435\u0437\u0430\u0435\u0442 \u0437\u0430 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b \u0431\u043b\u043e\u043a\u0430. <\/p>\n<pre><code class=\"css\">@mixin truncateText($overflow: ellipsis){   overflow: hidden;   white-space: nowrap;   text-overflow: $overflow; \/\/ values are: clip, ellipsis, or a string } <\/code><\/pre>\n<h4>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f<\/h4>\n<p>  \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0440\u0438\u043c\u0435\u0441\u0438 \u0434\u043b\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 CSS3 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Compass.<\/p>\n<pre><code class=\"css\">@mixin animation($name, $duration: 1000ms, $iterations: infinite, $timing-function: ease, $delay: 0ms) {   \/\/ There is a FF bug that requires all time values to have units, even 0 !!!!!!   -webkit-animation: $name $duration $iterations $timing-function $delay;   -moz-animation: $name $duration $iterations $timing-function $delay;   -o-animation: $name $duration $iterations $timing-function $delay;   animation: $name $duration $iterations $timing-function $delay; } <\/code><\/pre>\n<h4>Alerted<\/h4>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0441\u044c \u0410lerted \u2014 \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 \u043c\u0435\u0440\u044b.<\/p>\n<pre><code class=\"css\">@mixin alerted() {   &:before {     content: '';     position: absolute;     top: 6px; right: 6px;     height: 8px; width: 8px;     @include border-radius(10px);     background-color: gold;   }   &:after {     content: '';     position: absolute;     top: 0; right: 0;     height: 20px; width: 20px;     @include border-radius(20px);     background-color: transparent;     border: solid gold;     border-width: 2px; \/\/ animates     @include box-sizing(border-box);     @include animation($name: alertMe);   } }  @keyframes alertMe {   \/\/ -vendor prefixes omitted for brevity, but should be used in production   from {     border-width: 3px;     border-color: gold;   }   to {     border-width: 0;     border-color: rgba(gold, .1);   } } <\/code><\/pre>\n<h4>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0421\u043f\u0440\u0430\u0439\u0442\u043e\u0432<\/h4>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0441\u044c \u043e\u0442 \u0414\u0430\u0440\u0440\u0435\u043d\u0430 \u0412\u0443\u0434\u0430 (Darren Wood), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u0442\u0435\u043c \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c \u0438\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f CSS. \u0417\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 2X \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438. <\/p>\n<pre><code class=\"css\">@mixin resize-sprite($map, $sprite, $percent) {   $spritePath:    sprite-path($map);   $spriteWidth:   image-width($spritePath);   $spriteHeight:  image-height($spritePath);   $width: image-width(sprite-file($map, $sprite));   $height: image-height(sprite-file($map, $sprite));   @include background-size(ceil($spriteWidth * ($percent\/100)) ceil($spriteHeight * ($percent\/100)));   width: ceil($width*($percent\/100));   height: ceil($height*($percent\/100));   background-position: 0 floor(nth(sprite-position($map, $sprite), 2)  * ($percent\/100) ); } <\/code><\/pre>\n<h4>Tooltips<\/h4>\n<p>  \u041f\u0443\u0441\u0442\u044b\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 HTML \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.<\/p>\n<pre><code class=\"css\">@mixin hui_tooltip($content: attr(data-tooltip), $direction: top) {   position: relative;   &:before, &:after {     display: none;     z-index: 98;   }   &:hover {     &:after { \/\/ for text bubble       content: $content;       display: block;       position: absolute;       height: 12px; \/\/ (makes total height including padding 22px)       padding: 6px;       font-size: 12px;       white-space: nowrap;       color: #fff;       @include text-shadow(1px 1px #000);       background-color: #222;     }     @if ($direction == 'top'){       &:before {         @include triangle(down, 6px, #222);         top: -6px; margin-top: 0;         left: 47%;       }       &:after {         top: -28px;         left: 47%; margin-left: -20px;       }     }     @else if ($direction == 'bottom'){       &:before {         @include triangle(up, 6px, #222);         top: auto; margin-top: 0;         bottom: -6px;         left: 47%;       }       &:after {         bottom: -28px;         left: 47%; margin-left: -20px;       }     }   } } <\/code><\/pre>\n<p>  \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441\u0432\u043e\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043d\u0430\u0431\u043e\u0440\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/276509\/\"> https:\/\/habrahabr.ru\/post\/276509\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0414\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f SCSS. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<h4>Triangle<\/h4>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0441\u044c triangle (\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u044b Sagi \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u00abchupchick\u00bb), \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0435 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a. \u0418 tooltips \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e. \u041d\u043e triangle \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<pre><code class=\"css\">\/*  * @include triangle within a pseudo element and add positioning properties (ie. top, left) * $direction: up, down, left, right *\/ @mixin triangle($direction, $size: 6px, $color: #222){   content: '';   display: block;   position: absolute;   height: 0; width: 0;   @if ($direction == 'up'){     border-bottom: $size solid $color;     border-left: 1\/2*$size solid transparent;     border-right: 1\/2*$size solid transparent;   }   @else if ($direction == 'down'){     border-top: $size solid $color;     border-left: 1\/2*$size solid transparent;     border-right: 1\/2*$size solid transparent;   }   @else if ($direction == 'left'){     border-top: 1\/2*$size solid transparent;     border-bottom: 1\/2*$size solid transparent;     border-right: $size solid $color;   }   @else if ($direction == 'right'){     border-top: 1\/2*$size solid transparent;     border-bottom: 1\/2*$size solid transparent;     border-left: $size solid $color;   } } <\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-273571","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=273571"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273571\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=273571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=273571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}