Всем привет! Помогите, пожалуйста, не могу разобраться. Не работает скрипт смены стиля в сообщениях с html, не изменяются цвета при переходе между светлой и темной темой, всегда загружается root стиля по-умолчанию. Нейронка упорно мне доказывает, что это из-за iframe, но я все еще уверена, что это я дурак и что-то делаю не так.
тестовый форум
html в сообщении
[hideprofile]
[html]
<div class="prof_tabl">
<div class="prof_body">
<div class="prof_tabs">
<input type="radio" name="prof_tab-group" id="tab1" checked>
<label for="tab1">образование</label>
<input type="radio" name="prof_tab-group" id="tab2">
<label for="tab2">медицина</label>
<input type="radio" name="prof_tab-group" id="tab3">
<label for="tab3">искусство</label>
<input type="radio" name="prof_tab-group" id="tab4">
<label for="tab4">полиция</label>
<input type="radio" name="prof_tab-group" id="tab5">
<label for="tab5">криминал</label>
<input type="radio" name="prof_tab-group" id="tab6">
<label for="tab6">журналистика</label>
<input type="radio" name="prof_tab-group" id="tab7">
<label for="tab7">другое</label>
<!-- Содержимое вкладок -->
<div class="prof_tab-content" id="content1">
<p>Содержимое 1</p>
</div>
<div class="prof_tab-content" id="content2">
<p>Содержимое 2</p>
</div>
<div class="prof_tab-content" id="content3">
<p>Содержимое 3</p>
</div>
<div class="prof_tab-content" id="content4">
<p>Содержимое 4</p>
</div>
<div class="prof_tab-content" id="content5">
<p>Содержимое 5</p>
</div>
<div class="prof_tab-content" id="content6">
<p>Содержимое 6</p>
</div>
<div class="prof_tab-content" id="content7">
<p>Содержимое 7</p>
</div>
</div>
</div>
</div>[/html]есть css, установлен в стилях
.prof_tabl {
width: 900px;
height: auto;
margin: 0 auto !important;
background: linear-gradient(to bottom, #796761 0%, #3C3837 100%);
border-radius: 10px;
padding: 15px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.prof_tabl .night {
background: linear-gradient(to bottom, #5F6076 0%, #36363B 100%);
}
.prof_tabs {
display: flex;
flex-wrap: wrap;
max-width: 600px;
margin: 20px auto;
}
.prof_tabs input[type="radio"] {
display: none;
}
.prof_tabs label {
padding: 10px 20px;
background: #f0f0f0;
border: 1px solid #ccc;
cursor: pointer;
order: 1;
margin-right: 5px;
border-radius: 5px 5px 0 0;
}
.prof_tabs input[type="radio"]:checked + label {
background: #fff;
border-bottom: 1px solid #fff;
font-weight: bold;
color: var(--accent);
}
.prof_tab-content {
display: none;
width: 100%;
order: 2;
padding: 20px;
border: 1px solid #ccc;
background: #fff;
margin-top: -1px;
}
#tab1:checked ~ #content1,
#tab2:checked ~ #content2,
#tab3:checked ~ #content3,
#tab4:checked ~ #content4,
#tab5:checked ~ #content5,
#tab6:checked ~ #content6,
#tab7:checked ~ #content7 {
display: block;
}скрипт смены стилей
<!-- theme selector with mobile/desktop switcher by g.vatueil START-->
<style>
@media (min-device-width: 768px) { /* скрывать кнопки переключения версий на десктопе */
#vtlThemeSelector .vtl-viewport-toggler {
display: none;
}
}
</style>
<script type="text/javascript">
if (window.gscript == null) window.gscript = {};
window.gscript.themes = [
{
name: "day",
color: "#9d9a96"
},
{
name: "night",
color: "#383738"
},
];
window.gscript.defaultTheme = "day"; // тема по умолчанию
window.gscript.darkTheme = "night"; // темная тема
window.gscript.fullVerText = "Полная версия"; // текст на кнопке для перехода на полную версию
window.gscript.mobVerText = "Мобильная версия"; // текст на кнопке для перехода на мобильную версию
window.gscript.dayVerText = "day";
// дополнительно
window.gscript.useDataAttr = false; // использовать атрибут вместо класса
window.gscript.scaleDesktop = "0.4" // коэффициент масштабирования для десктопной версии
window.gscript.appendTo="body"; // куда добавить переключатель
</script>
<script src="https://forumstatic.ru/files/001c/56/64/31866.js"></script>
<!-- theme selector with mobile/desktop switcher by g.vatueil END -->








