ladybird/Libraries/LibWeb/CSS/Parser/RuleContext.h
Sam Atkins c2f0d61eb6 LibWeb/CSS: Implement initial parsing for @container rules
The main limitation here are that none of the container-query features
are parsed in a meaningful way; they all become `<general-enclosed>`.
Parsing for them will be added as they are implemented.
2026-03-30 14:49:24 +01:00

36 lines
641 B
C++

/*
* Copyright (c) 2025-2026, Sam Atkins <sam@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/FlyString.h>
#include <LibWeb/CSS/CSSRule.h>
namespace Web::CSS::Parser {
enum class RuleContext : u8 {
Unknown,
Style,
AtContainer,
AtCounterStyle,
AtMedia,
AtFontFace,
AtFontFeatureValues,
FontFeatureValue,
AtFunction,
AtKeyframes,
Keyframe,
AtSupports,
SupportsCondition,
AtLayer,
AtProperty,
AtPage,
Margin,
};
RuleContext rule_context_type_for_rule(CSSRule::Type);
RuleContext rule_context_type_for_at_rule(FlyString const&);
}