Я пытаюсь создать кнопку «тема», которая изменит тему на странице. Кажется, все работает, кроме изменения тегов (таких как p, h1, h2, li и т. Д.) На внешне загруженной странице из тега объекта. Внешне загруженная страница будет принимать исходные параметры тега из листа CSS, но не будет изменять параметры тега на странице в теге объекта, как это происходит для остальной части страницы.

Вот мой код:

{amp}lt;!DOCTYPE html{amp}gt;
{amp}lt;html{amp}gt;

{amp}lt;head{amp}gt;
{amp}lt;meta http-equiv="content-type" content="text/html;charset=UTF-8"{amp}gt;
{amp}lt;META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"{amp}gt;
{amp}lt;meta name="viewport" content="width=device-width, initial-scale=1.0"{amp}gt;
{amp}lt;script src="JS/jquery-3.3.1.slim.min.js"{amp}gt;{amp}lt;/script{amp}gt;
{amp}lt;script src="JS/popper.min.js"{amp}gt;{amp}lt;/script{amp}gt;
{amp}lt;script src="JS/bootstrap.min.js"{amp}gt;{amp}lt;/script{amp}gt;
{amp}lt;script src="JS/jquery.accordion.js"{amp}gt;{amp}lt;/script{amp}gt;



{amp}lt;link rel="stylesheet" href="CSS/style.css"{amp}gt;
{amp}lt;link rel="stylesheet" href="CSS/jquery.accordion.css"{amp}gt;
{amp}lt;/head{amp}gt;

{amp}lt;body{amp}gt;

{amp}lt;div class="wrapper"{amp}gt;
    {amp}lt;nav id="sidebar"{amp}gt;
        {amp}lt;a id="nav-toggle-menu" href="#"{amp}gt;{amp}amp;#9776;{amp}lt;/a{amp}gt;
        {amp}lt;a href="#"{amp}gt;{amp}lt;div class="sidebar-header"{amp}gt;{amp}lt;div class="sidebar-header-main"{amp}gt;{amp}lt;div class="sidebar-header-main-account-image"{amp}gt;{amp}lt;img src="MEDIA/account-picture-placeholder.png"{amp}gt;{amp}lt;/div{amp}gt;{amp}lt;div class="sidebar-header-main-account-name"{amp}gt;{amp}lt;span{amp}gt; FIRST.LAST {amp}lt;/span{amp}gt;{amp}lt;/div{amp}gt;{amp}lt;/div{amp}gt;{amp}lt;/div{amp}gt;{amp}lt;/a{amp}gt;
        {amp}lt;section id="demo" data-accordion-group{amp}gt;
    {amp}lt;section id="menu_accordion"{amp}gt;Home{amp}lt;/section{amp}gt;
    {amp}lt;section data-accordion{amp}gt;
        {amp}lt;section id="menu_accordion" data-control{amp}gt;TEST DROP DOWN{amp}lt;/section{amp}gt;
            {amp}lt;div data-content{amp}gt;
                {amp}lt;a href="#" class="tab-link" data-tab="tab-1"{amp}gt;{amp}lt;li id="menu_accordion_sub"{amp}gt;{amp}lt;span{amp}gt;TEST{amp}lt;/span{amp}gt;{amp}lt;/li{amp}gt;{amp}lt;/a{amp}gt;
            {amp}lt;/div{amp}gt;
    {amp}lt;/section{amp}gt;

    {amp}lt;/section{amp}gt;

    {amp}lt;/nav{amp}gt;
{amp}lt;/div{amp}gt;

{amp}lt;div class="header"{amp}gt;
    {amp}lt;div class="header_menu"{amp}gt;{amp}lt;a id="nav-toggle-header" href="#"{amp}gt;{amp}amp;#9776;{amp}lt;/a{amp}gt;{amp}lt;/div{amp}gt;
    {amp}lt;div class="header_logo"{amp}gt;
    {amp}lt;p style="float: right; margin-top: auto; margin-bottom: auto;"{amp}gt;Insert Logo Here{amp}lt;/p{amp}gt;
    {amp}lt;/div{amp}gt;
    {amp}lt;div id="search_header"{amp}gt;
        {amp}lt;div id="search_header_bar"{amp}gt;
            {amp}lt;div id="search_header_bar_input"{amp}gt;{amp}lt;input type="text" name="search_bar"{amp}gt;{amp}lt;/input{amp}gt;{amp}lt;/div{amp}gt;
        {amp}lt;/div{amp}gt;
        {amp}lt;div id="search_header_searchbtn"{amp}gt;
            {amp}lt;button name="Search" class="search_button"{amp}gt;Search{amp}lt;/button{amp}gt;
        {amp}lt;/div{amp}gt;
        {amp}lt;div id="search_header_magnify"{amp}gt;
            {amp}lt;img src="MEDIA/search.svg" id="search_btn" style="curser:pointer"{amp}gt;                 
        {amp}lt;/div{amp}gt;
        {amp}lt;div id="search_header_magnify_close" style="display: none"{amp}gt;{amp}lt;span{amp}gt;{amp}amp;#8981;{amp}lt;/span{amp}gt;{amp}lt;/div{amp}gt;
    {amp}lt;/div{amp}gt;
    {amp}lt;div class="header_theme"{amp}gt;{amp}lt;input type="image" src="MEDIA/darkmode.png" id="darkend"{amp}gt;{amp}lt;/input{amp}gt;{amp}lt;input type="image" src="MEDIA/lightmode.png" id="lightend"{amp}gt;{amp}lt;/input{amp}gt;{amp}lt;/div{amp}gt;
{amp}lt;/div{amp}gt;

{amp}lt;div class="main"{amp}gt;
    {amp}lt;div id="content"{amp}gt;
        {amp}lt;div id="tab-1" class="tab-content"{amp}gt;
            {amp}lt;object data="Pages/TEST.html" class="ex_object"{amp}gt;{amp}lt;/object{amp}gt;          
        {amp}lt;/div{amp}gt;
    {amp}lt;/div{amp}gt;
{amp}lt;/div{amp}gt;


{amp}lt;script type="text/javascript"{amp}gt;
      $(document).ready(function() {
        $('#only-one [data-accordion]').accordion();

        $('#multiple [data-accordion]').accordion({
          singleOpen: false
        });

        $('#single[data-accordion]').accordion({
          transitionEasing: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
          transitionSpeed: 200
        });
      });
      $(document).ready(function() {
        $('#demo [data-accordion]').accordion();
    });
    $(document).ready(function() {
$('#demo [data-accordion]').accordion({
// Transition speed on miliseconds.
transitionSpeed: 300, 

// CSS value for easing
transitionEasing: 'ease', 

// CSS selector for the element acting as a button inside accordions.
controlElement: '[data-control]', 

// CSS selector for the element containing hide/show content.
contentElement: '[data-content]', 

// CSS selector for a parent element containing a group of accordions.
groupElement: '[data-accordion-group]', 

// Opens a single accordion a time. 
// If false, multiple accordions can be open a time.
singleOpen: true 
});
});
{amp}lt;/script{amp}gt;


{amp}lt;script{amp}gt;

$('#darkend').click(function(){
    $('html').toggleClass("dark");
    $('#darkend').hide("slow");
    $('#lightend').show("slow");
    $('#nav-toggle-header').css('color','#fff');
    $('.wrapper').css('background','rgb(32,32,32)');
    $('.sidemenu-info').css('background','rgb(32,32,32)');
});

$('#lightend').click(function(){
    $('html').toggleClass("dark");
    $('#darkend').show("slow");
    $('#lightend').hide("slow");
    $('#nav-toggle-header').css('color','#000000');
});

$('#nav-toggle-header').click(function(){
    $('.wrapper').show('slow');
    $('#sidebar').show('slow');

});

$('#nav-toggle-menu').click(function(){
    $('.wrapper').hide('slow');
});
{amp}lt;/script{amp}gt;
{amp}lt;script{amp}gt;
$(document).ready(function(){

    $('.tab-link').click(function(){
        var tab_id = $(this).attr('data-tab');

        $('.tab-link').removeClass('current');
        $('.tab-content').removeClass('current');
        $(".wrapper").hide("slow");

        $(this).addClass('current');
        $("#" tab_id).addClass('current');
    })

});
{amp}lt;/script{amp}gt;

{amp}lt;/body{amp}gt;
{amp}lt;/html{amp}gt;

{amp}lt;!--CSS PAGE BELOW--{amp}gt;

/*---------------------------------
    OVERALL STYLE
---------------------------------*/
@font-face {font-family:"Poppins";src: url("../FONT/Poppins/pxiEyp8kv8JHgFVrJJnecmNE.woff2") format('woff2');}
html, body {font-family: 'Poppins', sans-serif;overflow: hidden;}
a {text-decoration: none;}
h1 {font-size: 3vh;}
h2 {font-size: 2vh;}
h3 {font-size: 1.5vh; color: red;}
h4 {font-size: 1.35vh;}
p, span, li, a{font-size: 1.25vh; color: rgba(87,87,87,0.9); font-weight: 400;}
li {list-style: none;}

/*---------------------------------
    DARK/LIGHT THEME
---------------------------------*/
.dark {background: rgb(22,22,22); color: #fff;}
.dark p, .dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark a, .dark li, .dark span, .dark legend {color: #fff;}
#lightend{display:none;cursor:pointer;outline:none;border:none;width:2.5vh;float:right}
#darkend {cursor: pointer;outline: none;border: none;width: 2.5vh;float: right;}

/*---------------------------------
    HEADER
---------------------------------*/
.header {width: 100%;height: 10%;display: inline-block;}
.header_menu {width: 5%;height: 100%;float: left;display: inline-block;}
.header_logo {width: 60%;height: 100%;float: left;display: inline-block;}
#search_header {width: 33%;height: 100%;float: left;display: inline-block;}
.header_theme {width: 2%;height: 100%;float: left;display: inline-block;}
#search_header_bar {display: inline; float: left; position: relative; width: 80%;}
#search_header_searchbtn {display: none; float: left; position: relative; width: 15%; height: 3vh;}
#search_header_searchbtn button {width: 100%; height: 100%; position: relative; font-size: 1vh; cursor: pointer;}
#search_header_bar_input {display: none; position: relative;}   
#search_header_bar_input input{ height: 3vh; width: 99%;}
#search_header_magnify {display: inline; float: right;  position: relative; width: 5%;  cursor: pointer;}
#search_header_magnify img {margin-top: 5%; width: 2vh; float: right;}
#search_header_magnify_close {display: inline-block; float: right; position: relative; width: 5%; height: 100%; cursor: pointer;}
#search_header_magnify_close span {font-size: 3vh; float: right;background: #e43ad3; vertical-align: super;}
.search_button{border:none;background:#404040;color:#fff!important;font-weight:100;text-transform:uppercase;border-radius:6px;display:inline-block;transition:all .3s ease 0;height:100%;width:75%;margin:auto}
.search_button:hover{color:#404040!important;font-weight:100!important;letter-spacing:2px;background:none;-webkit-box-shadow:0 5px 40px -10px rgba(0,0,0,0.57);-moz-box-shadow:0 5px 40px -10px rgba(0,0,0,0.57);transition:all .3s ease 0}

/*---------------------------------
    MENU SIDEBAR
---------------------------------*/
.wrapper {display: none;position: absolute;z-index: 50; width: 20%;height: 105%;background: rgb(22,22,22);transition: all 0.3s;}
#sidebarOpen {background: inherit;border: none;cursor: pointer;}
#sidebarOpenWhite {display: none;background: inherit;border: none;cursor: pointer;}
.sidemenu-info {background: rgb(22,22,22);cursor: pointer;border: none;}
.sidebar-header {background: rgb(27,27,27); width: 100%; height: 20%;}
#sidebar a {color: #ececec;}
.sidebar-header-main {width: 100%; height: 100%; position: relative; display: inline-block;}
.sidebar-header-main-account-image {width: 50%; height: 100%; position: relative; display: inline-block; float: left;}
.sidebar-header-main-account-image img {width: 50%; height: 100%; border-radius: 50%; margin-top: 5%; margin-left: 2.5%;}
.sidebar-header-main-account-name {width: 50%; height: 100%; position: relative; display: inline-block; float: left;}
#nav-toggle-header {font-size: 1.75vh; color: #000000; font-weight: 900;}
#nav-toggle-menu {font-size: 1.75vh; font-weight: 900;}
#sidebar ul.components {padding: 20px 0; border-bottom: 1px solid #47748b;}
#sidebar ul p { color: #fff; padding: 10px;}
#sidebar ul li a {padding: 10px; font-size: 1.1em; display: block;}
#sidebar ul li a:hover {color: #7386D5; background: #fff;}
#sidebar ul li.active{amp}gt;a,a[aria-expanded="true"] {color: #db0000; background-image: radial-gradient(circle at 0% 0%, #373b52, #252736 51%, #1d1e26);}
a[data-toggle="collapse"] {position: relative;}
.dropdown-toggle::after {display: block; position: absolute; top: 50%; right: 20px; transform: translateY(-50%);}
ul ul a {font-size: 0.9em !important; padding-left: 30px !important; background: #6d7fcc;}
ul.CTAs {padding: 20px;}
ul.CTAs a {text-align: center; font-size: 0.9em !important; display: block; border-radius: 5px; margin-bottom: 5px;}
#menu_accordion {list-style: none; cursor: pointer;}
#menu_accordion_sub {list-style: none; cursor: pointer; margin-left: 10%;}

/*---------------------------------
    MAIN PAGE BODY
---------------------------------*/
.main{width:99.5%; height:97%;position:fixed; display: flex;}
.ex_object{width: 100%; height: 100%;}
.tab-link {margin: 0%;padding: 0%;list-style: none;}
.tab-content{display: none; height: 100%; width: 100%;}
.tab-content.current{display: inherit;}
.object-link{margin:0;padding:0;list-style:none;}
.object-link li{background:none;color:#222;display:inline-block;padding:.5% .75%;cursor:pointer;}
.object-link li.current{background:rgba(80,80,80,0.3);}
.object-content{display:none;background:#fff;padding:.75%;height:95%;width:100%;}
.object-content.current{display: inherit;}
#content {width: 100%; height: 100%;    position: relative; display: flex; justify-content: center; align-items: center;}

/*---------------------------------
    MEDIA QUERIES
---------------------------------*/

@media only screen and (max-width:480px) {
    h1 {font-size: 2.7vh;}
    h2 {font-size: 2.6vh;}
    h3 {font-size: 2.5vh;}
    p, span, li, textarea, a {font-size: 2vh;}
}

@media screen and (min-width: 1401px) and (max-width: 1920) {
    h1 {font-size: 2.6vw;}
    h2 {font-size: 2.4vh;}
    h3 {font-size: 2.2vh;}
    p, span, li, textarea {font-size: 2vh;}
    .main {height: 900px;}
}

@media screen and (min-width: 769px) and (max-width: 1400px) {
    h1 {font-size: 2.6vh;}
    h2 {font-size: 2.5vh;}
    h3 {font-size: 2.4vh;}
    p, span, li, textarea, a{font-size: 2vh;}

}