{"id":295220,"date":"2019-11-26T15:00:16","date_gmt":"2019-11-26T15:00:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=295220"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=295220","title":{"rendered":"\u0417\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c, &lt;details&gt;"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/477520\/\">\n<p>\u042f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 <code>&lt;details&gt;<\/code> \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0434\u043e \u0431\u0435\u0437\u0443\u043c\u043d\u044b\u0445.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0412\u0430\u043c \u0437\u043d\u0430\u043a\u043e\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0432\u0435\u0440\u0441\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0451 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441 \u0432\u0438\u0434\u0438\u043c\u043e\u0433\u043e \u043d\u0430 \u0441\u043a\u0440\u044b\u0442\u044b\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"css\">.component {   display:none; }  .component.open {   display:block; }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">toggleButton.onclick = () =&gt; component.classList.toggle('open')<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u0417\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u2014 <strong><code>&lt;details&gt;<\/code><\/strong><\/p>\n<p>  <\/p>\n<blockquote><p>HTML-\u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;details&gt;<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043a\u0440\u044b\u0442\u043e\u0439 (\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439) \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p><\/blockquote>\n<p>  <\/p>\n<h3 id=\"bazovoe-primenenie\">\u0411\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 37.4995%;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/JjjQKVj?height=300&amp;slug-hash=JjjQKVj&amp;default-tabs=html,result&amp;host=https:\/\/codepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445 \u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0438\u043b\u0435\u0439 \u0438\u043b\u0438 JavaScript. \u0412\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0432 \u0441\u0430\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0438\u0434\u0438\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u044f\u0437\u044b\u043a\u0430 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 <code>&lt;details&gt;<\/code> \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;summary&gt;<\/code>:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 37.4995%;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/pooXbXx?height=300&amp;slug-hash=pooXbXx&amp;default-tabs=html,result&amp;host=https:\/\/codepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 html \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>open<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;!-- \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0438\u0434\u0438\u043c\u043e --&gt; &lt;details open&gt; ... &lt;\/details&gt;  &lt;!-- \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u044b\u0442\u043e --&gt; &lt;details&gt; ... &lt;\/details&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 JavaScript \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 API:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const details = document.querySelector('details')  details.open = true  \/\/ \u041e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 details.open = false \/\/ \u0421\u043a\u0440\u044b\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"para-slov-o-dostupnosti\">\u041f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>  <\/p>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;summary&gt;<\/code> \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u044b\u0439. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u0433\u0430\u044f\u0441\u044c \u043f\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0432\u044b \u043f\u043e\u043f\u0430\u0434\u0451\u0442\u0435 \u043d\u0430 \u044d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442. \u0410 \u0432\u043e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0444\u043e\u043a\u0443\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 <code>&lt;details&gt;<\/code> \u043e\u0442\u043a\u0440\u044b\u0442, \u0442\u043e \u0435\u0441\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u043d\u0430 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 <code>&lt;details&gt;<\/code>. <\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0447\u0442\u0435\u043d\u0438\u044f \u0441 \u044d\u043a\u0440\u0430\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>&lt;details&gt;<\/code> \u0438 <code>&lt;summary&gt;<\/code>. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. <a href=\"https:\/\/www.scottohara.me\/blog\/2018\/09\/03\/details-and-summary.html\"><em>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/em><\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"primery-ispolzovaniya\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 bootstrap, \u043d\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437 JavaScript. <\/p>\n<p>  <\/p>\n<h4 id=\"izmenyaem-marker\">\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u043c\u0430\u0440\u043a\u0435\u0440<\/h4>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u2014 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u043c\u0430\u0440\u043a\u0435\u0440\u0430. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"css\">summary::-webkit-details-marker {   \/* \u041b\u044e\u0431\u044b\u0435 \u0441\u0442\u0438\u043b\u0438 *\/ }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u043b\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0440\u044b\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u0430\u0440\u043a\u0435\u0440 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439<\/p>\n<p>  <\/p>\n<pre><code class=\"css\">\/* \u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u0430\u0440\u043a\u0435\u0440 *\/ details summary::-webkit-details-marker {   display: none }  \/* \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0440\u043a\u0435\u0440 \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f *\/ details summary:before {   content: '\\f0fe';   font-family: \"Font Awesome 5 free\";   margin-right: 7px; }  \/* \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0440\u043a\u0435\u0440 \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f *\/ details[open] summary:before {   content: '\\f146'; } <\/code><\/pre>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 37.4995%;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/pooXEyq?height=300&amp;slug-hash=pooXEyq&amp;default-tabs=css,result&amp;host=https:\/\/codepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h4 id=\"collapse-component\">Collapse Component<\/h4>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0442\u0430\u043a\u043e\u0439 \u0436\u0435. \u041d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 37.4995%;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/KKKjgWJ?height=300&amp;slug-hash=KKKjgWJ&amp;default-tabs=html,result&amp;host=https:\/\/codepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h4 id=\"accordion-component\">Accordion Component<\/h4>\n<p>  <\/p>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 <code>&lt;summary&gt;<\/code> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0430\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 37.4995%;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/vYYqXeJ?height=300&amp;slug-hash=vYYqXeJ&amp;default-tabs=html,result&amp;host=https:\/\/codepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041d\u043e, \u043a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043e\u0434\u0438\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u043e\u0439. \u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u0430 \u0441\u0442\u0440\u043e\u043a JavaScript. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 open \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 <code>&lt;details&gt;<\/code> \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u0443 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 37.4995%;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/NWWZRBo?height=300&amp;slug-hash=NWWZRBo&amp;default-tabs=html,result&amp;host=https:\/\/codepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h4 id=\"popover-component\">Popover Component<\/h4>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 Collapse Component, \u0441 \u0442\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u0435\u0439 \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>&lt;details&gt;<\/code> \u0438\u043c\u0435\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442.<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 37.4995%;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/ZEEdBpp?height=300&amp;slug-hash=ZEEdBpp&amp;default-tabs=html,result&amp;host=https:\/\/codepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h4 id=\"dropdown-component\">Dropdown Component<\/h4>\n<p>  <\/p>\n<p>\u0412 \u0441\u0432\u043e\u0435\u0439 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e \u0442\u043e\u0442 \u0436\u0435 Popover Component. \u041e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434.<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 37.4995%;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/JjjQRgJ?height=300&amp;slug-hash=JjjQRgJ&amp;default-tabs=html,result&amp;host=https:\/\/codepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0422\u043e\u0442 \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 37.4995%;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/GRRbNJY?height=300&amp;slug-hash=GRRbNJY&amp;default-tabs=html,result&amp;host=https:\/\/codepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041d\u043e \u0443 Dropdown Component \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435: \u043f\u043e \u043a\u043b\u0438\u043a\u0443 \u0437\u0430 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u0441\u0442\u0440\u043e\u043a JavaScript.<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u041f\u043e \u043a\u043b\u0438\u043a\u0443 \u043d\u0430 \u0442\u0435\u043b\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 document.body.onclick = () =&gt; {   \/\/ \u041d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 &lt;details&gt;   document.body.querySelectorAll('details.dropdown[open]')     \/\/ \u0418 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445     .forEach(e =&gt; e.open = false) }<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"modal-component\">Modal Component<\/h4>\n<p>  <\/p>\n<p>\u0418 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430. <\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 37.4995%;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/MWWMbBm?height=300&amp;slug-hash=MWWMbBm&amp;default-tabs=html,result&amp;host=https:\/\/codepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435 <code>&lt;details&gt;<\/code> \u043d\u0435 \u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u044b\u0431\u043e\u0440 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0443\u0434\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u2014 <code>&lt;dialog&gt;<\/code>, \u043d\u043e \u0443 \u043d\u0435\u0433\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043b\u043e\u0445\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"ssylki\">\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p>  <\/p>\n<p><a href=\"https:\/\/caniuse.com\/#feat=details\">Can I Use Details &amp; Summary elements<\/a><br \/>  <a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/HTML\/Element\/details\">MDN details element<\/a><br \/>  <a href=\"https:\/\/www.w3.org\/TR\/html51\/semantics.html#the-details-element\">W3C details element<\/a><\/p>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <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:\/\/habr.com\/ru\/post\/477520\/\"> https:\/\/habr.com\/ru\/post\/477520\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/477520\/\">\n<p>\u042f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 <code>&lt;details&gt;<\/code> \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0434\u043e \u0431\u0435\u0437\u0443\u043c\u043d\u044b\u0445.<\/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-295220","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/295220","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=295220"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/295220\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=295220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=295220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=295220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}