Only show specific styling if certain theme


Hi i have a wordpress multi-site with different themes.

in classes/class/Theme.php :

PRIVATE CONST SITE1 = 'site1';
    PRIVATE CONST SITE2 = 'site2';
    PRIVATE CONST SITE3 = 'site3';

    public CONST ALLOWED_THEMES = [
        self::SITE1,
        self::SITE2,
        self::SITE3
    ];

    private $theme;
    private static Theme $instance;

    private function __construct() {

        if(function_exists('get_option')) {
            $themeOption = get_option(self::CURRENT_THEME_META_KEY);
        } else {
            $themeOption = false;
        }

        if($themeOption && in_array($themeOption, self::ALLOWED_THEMES)) {
            $this->theme = $themeOption;
        } else {
            $this->theme = self::SITE1;
        }

    }

    public function getTheme()
    {
        return $this->theme;
    }


I have a Item block that standard has a like/favorite button. I try to exclude this styling if the current theme is site1. But of course I get that self id undefined How would I be able to solve this?

        <?php if $this->getTheme() !== self::SITE1 ) : ?>
            <div class="post-item__button js-favorite-button" ?>">
                <span class="post-item__like icon">
                    <?= ecs_get_icon_sprite( 'like' ); ?>
                </span>
                <span class="post-item__like post-item__like--filled icon">
                    <?= ecs_get_icon_sprite( 'like-filled' ); ?>
                </span>
            </div>
        <?php endif; ?>

I want to exclude this styling from Site1.

---------------Answer---------------

A CSS solution would be to add a class to that element in the php template file which only appears here and then have a CSS rule (in the CSS for that theme only) which looks like

.myclass {
  display: none;
}

Previous : HTML Code:Invalid Data is being submitted
Next : How do I add event listeners to check the number of checkboxes selected on a page and display an alert?