2021-02-21 13:45:26 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-02-21 13:45:26 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/RefCounted.h>
|
|
|
|
#include <AK/String.h>
|
2021-03-13 20:11:33 +01:00
|
|
|
#include <LibWeb/CSS/CSSStyleDeclaration.h>
|
2021-02-21 13:45:26 +02:00
|
|
|
#include <LibWeb/CSS/Selector.h>
|
|
|
|
|
|
|
|
namespace Web::CSS {
|
|
|
|
|
|
|
|
class CSSRule : public RefCounted<CSSRule> {
|
|
|
|
public:
|
|
|
|
virtual ~CSSRule();
|
|
|
|
|
|
|
|
enum class Type : u32 {
|
|
|
|
Style,
|
|
|
|
Import,
|
|
|
|
Media,
|
|
|
|
__Count,
|
|
|
|
};
|
|
|
|
|
|
|
|
virtual StringView class_name() const = 0;
|
|
|
|
virtual Type type() const = 0;
|
|
|
|
|
2021-03-18 21:50:52 +01:00
|
|
|
template<typename T>
|
|
|
|
bool fast_is() const = delete;
|
|
|
|
|
2021-02-21 13:45:26 +02:00
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|