2021-02-21 08:45:26 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-02-21 08:45:26 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/RefCounted.h>
|
|
|
|
|
#include <AK/String.h>
|
2021-03-13 16:11:33 -03:00
|
|
|
#include <LibWeb/CSS/CSSStyleDeclaration.h>
|
2021-02-21 08:45:26 -03: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 17:50:52 -03:00
|
|
|
template<typename T>
|
|
|
|
|
bool fast_is() const = delete;
|
|
|
|
|
|
2021-02-21 08:45:26 -03:00
|
|
|
private:
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|