private function resolveCurrentDevice()
    {
        if (0 == $viewportWidth = $this->editor->getViewportWidth()) {
            throw new RuntimeException('Unexpected editor viewport width.');
        }

        foreach (static::getDevices() as $device => $config) {
            if ($viewportWidth >= $config['max']) {
                return $device;
            }
        }

        return static::XS;
    }