{"id":286375,"date":"2017-05-15T19:10:03","date_gmt":"2017-05-15T15:10:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=286375"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2017-05-15T15:10:03","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=286375","title":{"rendered":"\u0410\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u0430\u044f \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 CSS \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438"},"content":{"rendered":"<p>\u0410\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0439 (\u0440\u0435\u0437\u0438\u043d\u043e\u0432\u044b\u0439) \u0434\u0438\u0437\u0430\u0439\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u043e\u0439 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0438\u0434\u0435\u044f \u0433\u0438\u0431\u043a\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0439 \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0435\u0449\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0438\u0437\u0443\u0447\u0438\u0442\u044c. \u0412\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0438\u0431\u043a\u043e\u0439 \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0441\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e Viewport, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0440\u0435\u0439\u043a\u043e\u043f\u043e\u0439\u043d\u0442\u043e\u0432 \u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0448\u0440\u0438\u0444\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/www.smashingmagazine.com\/wp-content\/uploads\/2017\/05\/holy-grail-opt.gif\" alt=\"image\"\/><\/p>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Sass.<a name=\"habracut\"><\/a><\/p>\n<p>  \u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0434 \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u043e\u0432 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u044b \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0440\u0442\u0431\u043e\u0440\u0434\u043e\u0432 \u0432 \u0421\u043a\u0435\u0442\u0447\u0435 \u0438\u043b\u0438 \u0424\u043e\u0442\u043e\u0448\u043e\u043f\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0412 \u044d\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a H1:<\/p>\n<ul>\n<li>H1 \u0434\u043b\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0440\u0430\u0432\u0435\u043d 22 \u043f\u0438\u043a\u0441\u0435\u043b\u044f <\/li>\n<li>H1 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0440\u0430\u0432\u0435\u043d 24 \u043f\u0438\u043a\u0441\u0435\u043b\u044f <\/li>\n<li>H1 \u0434\u043b\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0440\u0430\u0432\u0435\u043d 34 \u043f\u0438\u043a\u0441\u0435\u043b\u044f <\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f media queries:<\/p>\n<pre><code class=\"css\">h1 {   font-size: 22px; } @media (min-width:576px) {   h1 {     font-size: 22px;   } } @media (min-width:768px) {   h1 {     font-size: 24px;   } } @media (min-width:992px) {   h1 {     font-size: 34px;   } }<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043e\u043a\u043d\u0430, \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u043a\u043e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/0da\/f60\/ef9\/0daf60ef99a975e6a4b7a243d80bc5a9.gif\" alt=\"image\"\/><\/p>\n<p>  \u0425\u043e\u0440\u043e\u0448\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043f\u043b\u0430\u0432\u043d\u044b\u043c. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c transition:<\/p>\n<pre><code class=\"css\">h1 {   font-size: 22px;   transition: font-size 0.2s; }<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b33\/032\/476\/b33032476e51e540abd65210eca9df99.gif\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0435 \u0442\u0430\u043a \u0431\u0440\u043e\u0441\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430, \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u043e\u0442\u0447\u0435\u0442\u043b\u0438\u0432\u043e \u0432\u0438\u0434\u0435\u043d. \u0427\u0442\u043e \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c?<\/p>\n<h2>Viewport<\/h2>\n<p>  <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/length#Viewport-percentage_lengths\">Viewport<\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043b\u0430\u0432\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 <a href=\"http:\/\/caniuse.com\/#search=viewport\">\u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/821\/d43\/290\/821d4329018e99367a4d067a0ee84b89.png\" alt=\"image\"\/><\/p>\n<p>  \u041d\u043e \u0436\u0438\u0437\u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c Viewport \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0411\u044b\u043b\u043e \u0431\u044b \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c <i>font-size<\/i>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <i>vw<\/i>:<\/p>\n<pre><code class=\"css\">h1 {   font-size: 2vw; }<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3ed\/908\/415\/3ed9084153aa9c186326f93ceecf09a5.gif\" alt=\"image\"\/><\/p>\n<p>  \u041d\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0430\u0440\u0442\u0431\u043e\u0440\u0434\u044b \u043e\u0442 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u044d\u0442\u043e. \u0412\u044b\u0431\u0440\u0430\u043b \u043b\u0438 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440 \u0440\u0430\u0437\u043c\u0435\u0440 \u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u043e\u0432\u043d\u043e 2% \u0448\u0438\u0440\u0438\u043d\u044b \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0435\u0433\u043e \u0430\u0440\u0442\u0431\u043e\u0440\u0434\u043e\u0432? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435\u0442. <\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c, \u043a\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 vw \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f:<\/p>\n<ul>\n<li>\u0420\u0430\u0437\u043c\u0435\u0440 22px @ \u0448\u0438\u0440\u0438\u043d\u0430 576px = 22\/576*100 = 3.82vw<\/li>\n<li>\u0420\u0430\u0437\u043c\u0435\u0440 24px @ \u0448\u0438\u0440\u0438\u043d\u0430 768px = 24\/768*100 = 3.13vw<\/li>\n<li>\u0420\u0430\u0437\u043c\u0435\u0440 34px @ \u0448\u0438\u0440\u0438\u043d\u0430 992px = 34\/992*100 = 3.43vw<\/li>\n<\/ul>\n<p>  \u041e\u043d\u0438 \u0431\u043b\u0438\u0437\u043a\u0438, \u043d\u043e \u043d\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c media queries \u0434\u043b\u044f \u0441\u043c\u0435\u043d\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u0430, \u0438 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b. \u0418 \u043d\u0435\u043b\u044c\u0437\u044f \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0431\u043e\u0447\u043d\u043e\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e38\/77c\/77c\/e3877c77c1ecc9f591e2c8a23fe04d2d.gif\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0436\u0435 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443?<\/p>\n<h2>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f<\/h2>\n<p>  \u0427\u0442\u043e? \u0414\u0430, \u044d\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u043e CSS, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u043d\u0430\u0439\u0442\u0438 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/cd4\/b1a\/cf9\/cd4b1acf9c0969ee2d3a1b20e9ad495a.png\" alt=\"image\"\/><\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0432\u0438\u0434\u0435\u043d \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0448\u0440\u0438\u0444\u0442\u0430 \u043e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u044b \u044d\u043a\u0440\u0430\u043d\u0430. \u041b\u0438\u043d\u0438\u044f \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u0435\u043d\u0434\u043b\u0430\u0439\u043d, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0448\u0440\u0438\u0444\u0442\u0430 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u044b \u044d\u043a\u0440\u0430\u043d\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u044d\u0442\u043e\u0439 \u043b\u0438\u043d\u0438\u0435\u0439 \u0442\u0440\u0435\u043d\u0434\u0430, \u0443 \u0432\u0430\u0441 \u0431\u044b\u043b \u0431\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a H1, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043b\u0430\u0432\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0431\u044b \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u044d\u043a\u0440\u0430\u043d\u0430. \u0434<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443. \u041f\u0440\u044f\u043c\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b62\/556\/384\/b6255638404fc539947fb65fa37ea53d.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f m \u0438 b. \u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0431\u043e\u0440 \u043f\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/\u041c\u0435\u0442\u043e\u0434_\u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445_\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432\">\u043c\u0435\u0442\u043e\u0434\u0443 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432<\/a>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b84\/763\/996\/b84763996ee635b50b619514ded433a5.png\" alt=\"image\"\/><\/p>\n<h2>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0432 CSS?<\/h2>\n<p>  \u041e\u0442\u0432\u0435\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 <b>calc()<\/b>! \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u0430\u044f CSS \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u043d\u043e \u0443\u0436\u0435 <a href=\"http:\/\/caniuse.com\/#search=calc\">\u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438<\/a>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ad9\/3fe\/203\/ad93fe203a78b53b7b3d67e376252012.png\" alt=\"image\"\/><\/p>\n<p>  \u0423\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"css\">h1 {   font-size: calc({slope}*100vw + {y-intercept}px); }<\/code><\/pre>\n<h2>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c?<\/h2>\n<p>  \u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0433\u043e\u043d\u043a\u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e Sass:<\/p>\n<pre><code>\/\/\/ least-squares-fit \/\/\/ Calculate the least square fit linear regression of provided values \/\/\/ @param {map} $map - A Sass map of viewport width and size value combinations \/\/\/ @return Linear equation as a calc() function \/\/\/ @example \/\/\/   font-size: least-squares-fit((576px: 24px, 768px: 24px, 992px: 34px)); \/\/\/ @author Jake Wilson &lt;jake.e.wilson@gmail.com&gt; @function least-squares-fit($map) {      \/\/ Get the number of provided breakpoints   $length: length(map-keys($map));      \/\/ Error if the number of breakpoints is &lt; 2   @if ($length &lt; 2) {     @error &quot;leastSquaresFit() $map must be at least 2 values&quot;   }        \/\/ Calculate the Means   $resTotal: 0;   $valueTotal: 0;   @each $res, $value in $map {     $resTotal: $resTotal + $res;     $valueTotal: $valueTotal + $value;   }   $resMean: $resTotal\/$length;   $valueMean: $valueTotal\/$length;    \/\/ Calculate some other stuff   $multipliedDiff: 0;   $squaredDiff: 0;   @each $res, $value in $map {          \/\/ Differences from means     $resDiff: $res - $resMean;     $valueDiff: $value - $valueMean;          \/\/ Sum of multiplied differences     $multipliedDiff: $multipliedDiff + ($resDiff * $valueDiff);          \/\/ Sum of squared resolution differences     $squaredDiff: $squaredDiff + ($resDiff * $resDiff);   }    \/\/ Calculate the Slope   $m: $multipliedDiff \/ $squaredDiff;    \/\/ Calculate the Y-Intercept   $b: $valueMean - ($m * $resMean);    \/\/ Return the CSS calc equation   @return calc(#{$m*100}vw + #{$b});  }<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 <a href=\"http:\/\/codepen.io\/jakobud\/pen\/LyZJRB\">\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 CodePen<\/a> \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442! \u0420\u0430\u0437\u043c\u0435\u0440\u044b \u0448\u0440\u0438\u0444\u0442\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u0438 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0430, \u0438 \u043e\u043d\u0438 \u043f\u043b\u0430\u0432\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043c\u0430\u043a\u0435\u0442\u043e\u043c.<\/p>\n<p>  \u0425\u043e\u0442\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435, \u043d\u043e \u043e\u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u043b\u0438\u0437\u043a\u0438 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0430, \u043d\u043e \u043e\u043d\u0438 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0448\u0440\u0438\u0444\u0442\u0430. \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c?<\/p>\n<h2>\u041f\u043e\u043b\u0438\u043d\u043e\u043c\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f<\/h2>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u0443\u044e \u043b\u0438\u043d\u0438\u044e, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u043b\u0438\u043d\u0438\u044f \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/www.smashingmagazine.com\/wp-content\/uploads\/2017\/05\/6-polynomial-regression-opt.png\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e! \u0413\u043e\u0440\u0430\u0437\u0434\u043e \u0442\u043e\u0447\u043d\u0435\u0435 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u044f\u043c\u043e\u0439 \u043b\u0438\u043d\u0438\u0438. <br \/>  \u0423\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/www.smashingmagazine.com\/wp-content\/uploads\/2017\/05\/7-polynomial-equation-opt.png\" alt=\"image\"\/><\/p>\n<p>  \u0427\u0435\u043c \u0442\u043e\u0447\u043d\u0435\u0435 \u0432\u0430\u0448\u0430 \u043a\u0440\u0438\u0432\u0430\u044f, \u0442\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 CSS. Calc() \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438:<\/p>\n<pre><code class=\"css\">font-size: calc(3vw * 3vw);<\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 calc () \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0442 \u044d\u0442\u043e\u0442 \u0442\u0438\u043f \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439. \u041c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0449\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c?<\/p>\n<h2>\u0411\u0440\u0435\u0439\u043a\u043f\u043e\u0439\u043d\u0442\u044b \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/h2>\n<p>  \u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u044f\u043c\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u0440\u043e\u0439 \u0431\u0440\u0435\u0439\u043a\u043e\u043f\u043e\u0439\u043d\u0442\u043e\u0432? \u0427\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/www.smashingmagazine.com\/wp-content\/uploads\/2017\/05\/8-linear-regression-opt.png\" alt=\"image\"\/><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b\u0438 \u043f\u0440\u044f\u043c\u0443\u044e \u043b\u0438\u043d\u0438\u044e \u043c\u0435\u0436\u0434\u0443 22px \u0438 24px, \u0430 \u0437\u0430\u0442\u0435\u043c \u0435\u0449\u0435 \u043c\u0435\u0436\u0434\u0443 24px \u0438 34px. <br \/>  Sass \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code>h1 {   @media (min-width:576px) {     font-size: calc(???);   }   @media (min-width:768px) {     font-size: calc(???);   } }<\/code><\/pre>\n<p>  \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 calc (), \u043d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u044f\u043c\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0430. <\/p>\n<p>  \u041f\u043e\u043c\u043d\u0438\u0442\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u043b\u0438\u043d\u0438\u0438?<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/www.smashingmagazine.com\/wp-content\/uploads\/2017\/05\/9-linear-equation-opt.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e \u0434\u0432\u0443\u0445 \u0442\u043e\u0447\u043a\u0430\u0445: m \u0438 b, \u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/www.smashingmagazine.com\/wp-content\/uploads\/2017\/05\/10-slope-linear-equation-opt.png\" alt=\"image\"\/><\/p>\n<p>  Sass \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e:<\/p>\n<pre><code>\/\/\/ linear-interpolation \/\/\/ Calculate the definition of a line between two points \/\/\/ @param $map - A Sass map of viewport widths and size value pairs \/\/\/ @returns A linear equation as a calc() function \/\/\/ @example \/\/\/   font-size: linear-interpolation((320px: 18px, 768px: 26px)); \/\/\/ @author Jake Wilson &lt;jake.e.wilson@gmail.com&gt; @function linear-interpolation($map) {   $keys: map-keys($map);   @if (length($keys) != 2) {     @error &quot;linear-interpolation() $map must be exactly 2 values&quot;;   }   \/\/ The slope   $m: (map-get($map, nth($keys, 2)) - map-get($map, nth($keys, 1)))\/(nth($keys, 2) - nth($keys,1));      \/\/ The y-intercept   $b: map-get($map, nth($keys, 1)) - $m * nth($keys, 1);      \/\/ Determine if the sign should be positive or negative   $sign: &quot;+&quot;;   @if ($b &lt; 0) {     $sign: &quot;-&quot;;     $b: abs($b);   }      @return calc(#{$m*100}vw #{$sign} #{$b}); } Now, just use the linear interpolation function on multiple breakpoints in your Sass. Also, lets throw in some min and max font-sizes: \/\/ SCSS h1 {   \/\/ Minimum font-size   font-size: 22px;   \/\/ Font-size between 576 - 768   @media (min-width:576px) {     $map: (576px: 22px, 768px: 24px);     font-size: linear-interpolation($map);   }   \/\/ Font-size between 768 - 992   @media (min-width:768px) {     $map: (768px: 24px, 992px: 34px);     font-size: linear-interpolation($map);   }   \/\/ Maximum font-size   @media (min-width:992px) {     font-size: 34px;   } }<\/code><\/pre>\n<p>  \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 CSS:<\/p>\n<pre><code class=\"css\">h1 {   font-size: 22px; } @media (min-width: 576px) {   h1 {     font-size: calc(1.04166667vw + 16px);   } } @media (min-width: 768px) {   h1 {     font-size: calc(4.46428571vw - 10.28571429px);   } } @media (min-width: 992px) {   h1 {     font-size: 34px;   } }<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/www.smashingmagazine.com\/wp-content\/uploads\/2017\/05\/holy-grail-opt.gif\" alt=\"image\"\/><\/p>\n<h2>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f Sass mixin:<\/p>\n<pre><code>\/\/\/ poly-fluid-sizing \/\/\/ Generate linear interpolated size values through multiple break points \/\/\/ @param $property - A string CSS property name \/\/\/ @param $map - A Sass map of viewport unit and size value pairs \/\/\/ @requires function linear-interpolation \/\/\/ @requires function map-sort \/\/\/ @example \/\/\/   @include poly-fluid-sizing('font-size', (576px: 22px, 768px: 24px, 992px: 34px)); \/\/\/ @author Jake Wilson &lt;jake.e.wilson@gmail.com&gt; @mixin poly-fluid-sizing($property, $map) {   \/\/ Get the number of provided breakpoints   $length: length(map-keys($map));      \/\/ Error if the number of breakpoints is &lt; 2   @if ($length &lt; 2) {     @error &quot;poly-fluid-sizing() $map requires at least values&quot;   }    \/\/ Sort the map by viewport width (key)   $map: map-sort($map);   $keys: map-keys($map);    \/\/ Minimum size   #{$property}: map-get($map, nth($keys,1));      \/\/ Interpolated size through breakpoints   @for $i from 1 through ($length - 1) {     @media (min-width:nth($keys,$i)) {       $value1: map-get($map, nth($keys,$i));       $value2: map-get($map, nth($keys,($i + 1)));       \/\/ If values are not equal, perform linear interpolation       @if ($value1 != $value2) {         #{$property}: linear-interpolation((nth($keys,$i): $value1, nth($keys,($i+1)): $value2));       } @else {         #{$property}: $value1;       }     }   }      \/\/ Maxmimum size   @media (min-width:nth($keys,$length)) {     #{$property}: map-get($map, nth($keys,$length));   } }<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e Sass \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<ul>\n<li><a href=\"https:\/\/gist.github.com\/Jakobud\/7414f91142e0f540f221a3e3cafdf856\">linear-interpolation<\/a><\/li>\n<li><a href=\"https:\/\/gist.github.com\/Jakobud\/a0ac11e80a1de453cd86f0d3fc0a1410\">map-sort<\/a><\/li>\n<li><a href=\"https:\/\/gist.github.com\/Jakobud\/744b98b629abe018766f6d506a2e92ae\">list-sort<\/a><\/li>\n<li><a href=\"https:\/\/gist.github.com\/Jakobud\/ec056b52f3673cc369dc97f2c2428424\">list-remove<\/a><\/li>\n<\/ul>\n<p>  Poly-fluid-sizing () \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u0440\u0435 \u0448\u0438\u0440\u0438\u043d\u044b \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 Sass \u0438 \u043b\u0435\u0433\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438. <\/p>\n<p>  \u0412\u043e\u0442 <a href=\"https:\/\/codepen.io\/jakobud\/pen\/vmKLYb\">\u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 CodePen<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u042d\u0442\u043e \u043b\u0443\u0447\u0448\u0435\u0435, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u0433\u0438\u0431\u043a\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0439 \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u0438? \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e. CSS \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/animation-timing-function\">\u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/a> \u0438 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/transition-timing-function\">transition-timing<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c calc () \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e, \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044e \u0435\u0449\u0435 \u0440\u0430\u0437. <\/p>\n<p>  \u041d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0435\u0442\u2026 \u041b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0443\u0447\u0448\u0435.<br \/> \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\/328730\/\"> https:\/\/habrahabr.ru\/post\/328730\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0410\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0439 (\u0440\u0435\u0437\u0438\u043d\u043e\u0432\u044b\u0439) \u0434\u0438\u0437\u0430\u0439\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u043e\u0439 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0438\u0434\u0435\u044f \u0433\u0438\u0431\u043a\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0439 \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0435\u0449\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0438\u0437\u0443\u0447\u0438\u0442\u044c. \u0412\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0438\u0431\u043a\u043e\u0439 \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0441\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e Viewport, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0440\u0435\u0439\u043a\u043e\u043f\u043e\u0439\u043d\u0442\u043e\u0432 \u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0448\u0440\u0438\u0444\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/www.smashingmagazine.com\/wp-content\/uploads\/2017\/05\/holy-grail-opt.gif\" alt=\"image\"\/><\/p>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Sass.<\/p>\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-286375","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286375","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=286375"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286375\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=286375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=286375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=286375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}