dymokomi/luce-browser-css
Source of release 0.5.1
0.5.1 / src / css_data / generated_enums.lucb
#==============================================================================================
#
# generated_enums - the keyword enums of CSS properties
#
# DESCRIPTION:
# Generated by tools/gen_css from data/css; do not edit. The C++ it stands for, at
# Ladybird 47c82b38d0, is written by Meta/Generators/generate_libweb_css_enums.py
# from Enums.json:
#
# Build/Libraries/LibWeb/CSS/Enums.h
# Build/Libraries/LibWeb/CSS/Enums.cpp
#
# Copyright (c) 2018-2026, the Ladybird developers.
# Copyright (c) 2026 the luce-browser authors.
# SPDX-License-Identifier: BSD-2-Clause (see LICENSE)
#
#==============================================================================================
# mark: AbsoluteSize ============================================================================
## Web::CSS::AbsoluteSize (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum AbsoluteSize as u8:
xx_small = 0
x_small = 1
small = 2
medium = 3
large = 4
x_large = 5
xx_large = 6
xxx_large = 7
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_absolute_size.
pub func keyword_to_absolute_size(keyword: Keyword) -> AbsoluteSize?:
match keyword:
.xx_small: return AbsoluteSize.xx_small
.x_small: return AbsoluteSize.x_small
.small: return AbsoluteSize.small
.medium: return AbsoluteSize.medium
.large: return AbsoluteSize.large
.x_large: return AbsoluteSize.x_large
.xx_large: return AbsoluteSize.xx_large
.xxx_large: return AbsoluteSize.xxx_large
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(AbsoluteSize).
pub func to_keyword_absolute_size(absolute_size_value: AbsoluteSize) -> Keyword:
match absolute_size_value:
.xx_small: return Keyword.xx_small
.x_small: return Keyword.x_small
.small: return Keyword.small
.medium: return Keyword.medium
.large: return Keyword.large
.x_large: return Keyword.x_large
.xx_large: return Keyword.xx_large
.xxx_large: return Keyword.xxx_large
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(AbsoluteSize).
pub func to_string_absolute_size(value: AbsoluteSize) -> ak.StringView:
match value:
.xx_small: return ak.sv("xx-small")
.x_small: return ak.sv("x-small")
.small: return ak.sv("small")
.medium: return ak.sv("medium")
.large: return ak.sv("large")
.x_large: return ak.sv("x-large")
.xx_large: return ak.sv("xx-large")
.xxx_large: return ak.sv("xxx-large")
_: trap("VERIFY_NOT_REACHED")
# mark: AlignContent ============================================================================
## Web::CSS::AlignContent (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum AlignContent as u8:
normal = 0
start = 1
flex_start = 2
end = 3
flex_end = 4
center = 5
space_between = 6
space_around = 7
space_evenly = 8
stretch = 9
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_align_content.
pub func keyword_to_align_content(keyword: Keyword) -> AlignContent?:
match keyword:
.normal: return AlignContent.normal
.start: return AlignContent.start
.flex_start: return AlignContent.flex_start
.end: return AlignContent.end
.flex_end: return AlignContent.flex_end
.center: return AlignContent.center
.space_between: return AlignContent.space_between
.space_around: return AlignContent.space_around
.space_evenly: return AlignContent.space_evenly
.stretch: return AlignContent.stretch
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(AlignContent).
pub func to_keyword_align_content(align_content_value: AlignContent) -> Keyword:
match align_content_value:
.normal: return Keyword.normal
.start: return Keyword.start
.flex_start: return Keyword.flex_start
.end: return Keyword.end
.flex_end: return Keyword.flex_end
.center: return Keyword.center
.space_between: return Keyword.space_between
.space_around: return Keyword.space_around
.space_evenly: return Keyword.space_evenly
.stretch: return Keyword.stretch
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(AlignContent).
pub func to_string_align_content(value: AlignContent) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.start: return ak.sv("start")
.flex_start: return ak.sv("flex-start")
.end: return ak.sv("end")
.flex_end: return ak.sv("flex-end")
.center: return ak.sv("center")
.space_between: return ak.sv("space-between")
.space_around: return ak.sv("space-around")
.space_evenly: return ak.sv("space-evenly")
.stretch: return ak.sv("stretch")
_: trap("VERIFY_NOT_REACHED")
# mark: AlignItems ==============================================================================
## Web::CSS::AlignItems (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum AlignItems as u8:
baseline = 0
center = 1
end = 2
flex_end = 3
flex_start = 4
normal = 5
safe = 6
self_end = 7
self_start = 8
start = 9
stretch = 10
unsafe = 11
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_align_items.
pub func keyword_to_align_items(keyword: Keyword) -> AlignItems?:
match keyword:
.baseline: return AlignItems.baseline
.center: return AlignItems.center
.end: return AlignItems.end
.flex_end: return AlignItems.flex_end
.flex_start: return AlignItems.flex_start
.normal: return AlignItems.normal
.safe: return AlignItems.safe
.self_end: return AlignItems.self_end
.self_start: return AlignItems.self_start
.start: return AlignItems.start
.stretch: return AlignItems.stretch
.unsafe: return AlignItems.unsafe
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(AlignItems).
pub func to_keyword_align_items(align_items_value: AlignItems) -> Keyword:
match align_items_value:
.baseline: return Keyword.baseline
.center: return Keyword.center
.end: return Keyword.end
.flex_end: return Keyword.flex_end
.flex_start: return Keyword.flex_start
.normal: return Keyword.normal
.safe: return Keyword.safe
.self_end: return Keyword.self_end
.self_start: return Keyword.self_start
.start: return Keyword.start
.stretch: return Keyword.stretch
.unsafe: return Keyword.unsafe
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(AlignItems).
pub func to_string_align_items(value: AlignItems) -> ak.StringView:
match value:
.baseline: return ak.sv("baseline")
.center: return ak.sv("center")
.end: return ak.sv("end")
.flex_end: return ak.sv("flex-end")
.flex_start: return ak.sv("flex-start")
.normal: return ak.sv("normal")
.safe: return ak.sv("safe")
.self_end: return ak.sv("self-end")
.self_start: return ak.sv("self-start")
.start: return ak.sv("start")
.stretch: return ak.sv("stretch")
.unsafe: return ak.sv("unsafe")
_: trap("VERIFY_NOT_REACHED")
# mark: AlignSelf ===============================================================================
## Web::CSS::AlignSelf (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum AlignSelf as u8:
auto = 0
baseline = 1
center = 2
end = 3
flex_end = 4
flex_start = 5
normal = 6
safe = 7
self_end = 8
self_start = 9
start = 10
stretch = 11
unsafe = 12
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_align_self.
pub func keyword_to_align_self(keyword: Keyword) -> AlignSelf?:
match keyword:
.auto: return AlignSelf.auto
.baseline: return AlignSelf.baseline
.center: return AlignSelf.center
.end: return AlignSelf.end
.flex_end: return AlignSelf.flex_end
.flex_start: return AlignSelf.flex_start
.normal: return AlignSelf.normal
.safe: return AlignSelf.safe
.self_end: return AlignSelf.self_end
.self_start: return AlignSelf.self_start
.start: return AlignSelf.start
.stretch: return AlignSelf.stretch
.unsafe: return AlignSelf.unsafe
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(AlignSelf).
pub func to_keyword_align_self(align_self_value: AlignSelf) -> Keyword:
match align_self_value:
.auto: return Keyword.auto
.baseline: return Keyword.baseline
.center: return Keyword.center
.end: return Keyword.end
.flex_end: return Keyword.flex_end
.flex_start: return Keyword.flex_start
.normal: return Keyword.normal
.safe: return Keyword.safe
.self_end: return Keyword.self_end
.self_start: return Keyword.self_start
.start: return Keyword.start
.stretch: return Keyword.stretch
.unsafe: return Keyword.unsafe
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(AlignSelf).
pub func to_string_align_self(value: AlignSelf) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.baseline: return ak.sv("baseline")
.center: return ak.sv("center")
.end: return ak.sv("end")
.flex_end: return ak.sv("flex-end")
.flex_start: return ak.sv("flex-start")
.normal: return ak.sv("normal")
.safe: return ak.sv("safe")
.self_end: return ak.sv("self-end")
.self_start: return ak.sv("self-start")
.start: return ak.sv("start")
.stretch: return ak.sv("stretch")
.unsafe: return ak.sv("unsafe")
_: trap("VERIFY_NOT_REACHED")
# mark: AnchorSide ==============================================================================
## Web::CSS::AnchorSide (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum AnchorSide as u8:
inside = 0
outside = 1
top = 2
left = 3
right = 4
bottom = 5
start = 6
end = 7
self_start = 8
self_end = 9
center = 10
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_anchor_side.
pub func keyword_to_anchor_side(keyword: Keyword) -> AnchorSide?:
match keyword:
.inside: return AnchorSide.inside
.outside: return AnchorSide.outside
.top: return AnchorSide.top
.left: return AnchorSide.left
.right: return AnchorSide.right
.bottom: return AnchorSide.bottom
.start: return AnchorSide.start
.end: return AnchorSide.end
.self_start: return AnchorSide.self_start
.self_end: return AnchorSide.self_end
.center: return AnchorSide.center
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(AnchorSide).
pub func to_keyword_anchor_side(anchor_side_value: AnchorSide) -> Keyword:
match anchor_side_value:
.inside: return Keyword.inside
.outside: return Keyword.outside
.top: return Keyword.top
.left: return Keyword.left
.right: return Keyword.right
.bottom: return Keyword.bottom
.start: return Keyword.start
.end: return Keyword.end
.self_start: return Keyword.self_start
.self_end: return Keyword.self_end
.center: return Keyword.center
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(AnchorSide).
pub func to_string_anchor_side(value: AnchorSide) -> ak.StringView:
match value:
.inside: return ak.sv("inside")
.outside: return ak.sv("outside")
.top: return ak.sv("top")
.left: return ak.sv("left")
.right: return ak.sv("right")
.bottom: return ak.sv("bottom")
.start: return ak.sv("start")
.end: return ak.sv("end")
.self_start: return ak.sv("self-start")
.self_end: return ak.sv("self-end")
.center: return ak.sv("center")
_: trap("VERIFY_NOT_REACHED")
# mark: AnchorSize ==============================================================================
## Web::CSS::AnchorSize (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum AnchorSize as u8:
block = 0
height = 1
inline = 2
self_block = 3
self_inline = 4
width = 5
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_anchor_size.
pub func keyword_to_anchor_size(keyword: Keyword) -> AnchorSize?:
match keyword:
.block: return AnchorSize.block
.height: return AnchorSize.height
.inline: return AnchorSize.inline
.self_block: return AnchorSize.self_block
.self_inline: return AnchorSize.self_inline
.width: return AnchorSize.width
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(AnchorSize).
pub func to_keyword_anchor_size(anchor_size_value: AnchorSize) -> Keyword:
match anchor_size_value:
.block: return Keyword.block
.height: return Keyword.height
.inline: return Keyword.inline
.self_block: return Keyword.self_block
.self_inline: return Keyword.self_inline
.width: return Keyword.width
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(AnchorSize).
pub func to_string_anchor_size(value: AnchorSize) -> ak.StringView:
match value:
.block: return ak.sv("block")
.height: return ak.sv("height")
.inline: return ak.sv("inline")
.self_block: return ak.sv("self-block")
.self_inline: return ak.sv("self-inline")
.width: return ak.sv("width")
_: trap("VERIFY_NOT_REACHED")
# mark: AnimationComposition ====================================================================
## Web::CSS::AnimationComposition (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum AnimationComposition as u8:
replace = 0
add = 1
accumulate = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_animation_composition.
pub func keyword_to_animation_composition(keyword: Keyword) -> AnimationComposition?:
match keyword:
.replace: return AnimationComposition.replace
.add: return AnimationComposition.add
.accumulate: return AnimationComposition.accumulate
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(AnimationComposition).
pub func to_keyword_animation_composition(animation_composition_value: AnimationComposition) -> Keyword:
match animation_composition_value:
.replace: return Keyword.replace
.add: return Keyword.add
.accumulate: return Keyword.accumulate
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(AnimationComposition).
pub func to_string_animation_composition(value: AnimationComposition) -> ak.StringView:
match value:
.replace: return ak.sv("replace")
.add: return ak.sv("add")
.accumulate: return ak.sv("accumulate")
_: trap("VERIFY_NOT_REACHED")
# mark: AnimationDirection ======================================================================
## Web::CSS::AnimationDirection (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum AnimationDirection as u8:
alternate = 0
alternate_reverse = 1
normal = 2
reverse = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_animation_direction.
pub func keyword_to_animation_direction(keyword: Keyword) -> AnimationDirection?:
match keyword:
.alternate: return AnimationDirection.alternate
.alternate_reverse: return AnimationDirection.alternate_reverse
.normal: return AnimationDirection.normal
.reverse: return AnimationDirection.reverse
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(AnimationDirection).
pub func to_keyword_animation_direction(animation_direction_value: AnimationDirection) -> Keyword:
match animation_direction_value:
.alternate: return Keyword.alternate
.alternate_reverse: return Keyword.alternate_reverse
.normal: return Keyword.normal
.reverse: return Keyword.reverse
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(AnimationDirection).
pub func to_string_animation_direction(value: AnimationDirection) -> ak.StringView:
match value:
.alternate: return ak.sv("alternate")
.alternate_reverse: return ak.sv("alternate-reverse")
.normal: return ak.sv("normal")
.reverse: return ak.sv("reverse")
_: trap("VERIFY_NOT_REACHED")
# mark: AnimationFillMode =======================================================================
## Web::CSS::AnimationFillMode (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum AnimationFillMode as u8:
backwards = 0
both = 1
forwards = 2
none_ = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_animation_fill_mode.
pub func keyword_to_animation_fill_mode(keyword: Keyword) -> AnimationFillMode?:
match keyword:
.backwards: return AnimationFillMode.backwards
.both: return AnimationFillMode.both
.forwards: return AnimationFillMode.forwards
.none_: return AnimationFillMode.none_
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(AnimationFillMode).
pub func to_keyword_animation_fill_mode(animation_fill_mode_value: AnimationFillMode) -> Keyword:
match animation_fill_mode_value:
.backwards: return Keyword.backwards
.both: return Keyword.both
.forwards: return Keyword.forwards
.none_: return Keyword.none_
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(AnimationFillMode).
pub func to_string_animation_fill_mode(value: AnimationFillMode) -> ak.StringView:
match value:
.backwards: return ak.sv("backwards")
.both: return ak.sv("both")
.forwards: return ak.sv("forwards")
.none_: return ak.sv("none")
_: trap("VERIFY_NOT_REACHED")
# mark: AnimationPlayState ======================================================================
## Web::CSS::AnimationPlayState (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum AnimationPlayState as u8:
paused = 0
running = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_animation_play_state.
pub func keyword_to_animation_play_state(keyword: Keyword) -> AnimationPlayState?:
match keyword:
.paused: return AnimationPlayState.paused
.running: return AnimationPlayState.running
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(AnimationPlayState).
pub func to_keyword_animation_play_state(animation_play_state_value: AnimationPlayState) -> Keyword:
match animation_play_state_value:
.paused: return Keyword.paused
.running: return Keyword.running
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(AnimationPlayState).
pub func to_string_animation_play_state(value: AnimationPlayState) -> ak.StringView:
match value:
.paused: return ak.sv("paused")
.running: return ak.sv("running")
_: trap("VERIFY_NOT_REACHED")
# mark: Appearance ==============================================================================
## Web::CSS::Appearance (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Appearance as u8:
auto = 0
button = 1
checkbox = 2
listbox = 3
menulist = 4
meter = 5
menulist_button = 6
none_ = 7
push_button = 8
progress_bar = 9
radio = 10
searchfield = 11
slider_horizontal = 12
square_button = 13
textarea = 14
textfield = 15
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_appearance.
pub func keyword_to_appearance(keyword: Keyword) -> Appearance?:
match keyword:
.auto: return Appearance.auto
.button: return Appearance.button
.checkbox: return Appearance.checkbox
.listbox: return Appearance.listbox
.menulist: return Appearance.menulist
.meter: return Appearance.meter
.menulist_button: return Appearance.menulist_button
.none_: return Appearance.none_
.push_button: return Appearance.push_button
.progress_bar: return Appearance.progress_bar
.radio: return Appearance.radio
.searchfield: return Appearance.searchfield
.slider_horizontal: return Appearance.slider_horizontal
.square_button: return Appearance.square_button
.textarea: return Appearance.textarea
.textfield: return Appearance.textfield
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Appearance).
pub func to_keyword_appearance(appearance_value: Appearance) -> Keyword:
match appearance_value:
.auto: return Keyword.auto
.button: return Keyword.button
.checkbox: return Keyword.checkbox
.listbox: return Keyword.listbox
.menulist: return Keyword.menulist
.meter: return Keyword.meter
.menulist_button: return Keyword.menulist_button
.none_: return Keyword.none_
.push_button: return Keyword.push_button
.progress_bar: return Keyword.progress_bar
.radio: return Keyword.radio
.searchfield: return Keyword.searchfield
.slider_horizontal: return Keyword.slider_horizontal
.square_button: return Keyword.square_button
.textarea: return Keyword.textarea
.textfield: return Keyword.textfield
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Appearance).
pub func to_string_appearance(value: Appearance) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.button: return ak.sv("button")
.checkbox: return ak.sv("checkbox")
.listbox: return ak.sv("listbox")
.menulist: return ak.sv("menulist")
.meter: return ak.sv("meter")
.menulist_button: return ak.sv("menulist-button")
.none_: return ak.sv("none")
.push_button: return ak.sv("push-button")
.progress_bar: return ak.sv("progress-bar")
.radio: return ak.sv("radio")
.searchfield: return ak.sv("searchfield")
.slider_horizontal: return ak.sv("slider-horizontal")
.square_button: return ak.sv("square-button")
.textarea: return ak.sv("textarea")
.textfield: return ak.sv("textfield")
_: trap("VERIFY_NOT_REACHED")
# mark: Axis ====================================================================================
## Web::CSS::Axis (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Axis as u8:
block = 0
inline = 1
x = 2
y = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_axis.
pub func keyword_to_axis(keyword: Keyword) -> Axis?:
match keyword:
.block: return Axis.block
.inline: return Axis.inline
.x: return Axis.x
.y: return Axis.y
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Axis).
pub func to_keyword_axis(axis_value: Axis) -> Keyword:
match axis_value:
.block: return Keyword.block
.inline: return Keyword.inline
.x: return Keyword.x
.y: return Keyword.y
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Axis).
pub func to_string_axis(value: Axis) -> ak.StringView:
match value:
.block: return ak.sv("block")
.inline: return ak.sv("inline")
.x: return ak.sv("x")
.y: return ak.sv("y")
_: trap("VERIFY_NOT_REACHED")
# mark: BackgroundAttachment ====================================================================
## Web::CSS::BackgroundAttachment (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum BackgroundAttachment as u8:
fixed = 0
local_ = 1
scroll = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_background_attachment.
pub func keyword_to_background_attachment(keyword: Keyword) -> BackgroundAttachment?:
match keyword:
.fixed: return BackgroundAttachment.fixed
.local_: return BackgroundAttachment.local_
.scroll: return BackgroundAttachment.scroll
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(BackgroundAttachment).
pub func to_keyword_background_attachment(background_attachment_value: BackgroundAttachment) -> Keyword:
match background_attachment_value:
.fixed: return Keyword.fixed
.local_: return Keyword.local_
.scroll: return Keyword.scroll
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(BackgroundAttachment).
pub func to_string_background_attachment(value: BackgroundAttachment) -> ak.StringView:
match value:
.fixed: return ak.sv("fixed")
.local_: return ak.sv("local")
.scroll: return ak.sv("scroll")
_: trap("VERIFY_NOT_REACHED")
# mark: BackgroundBox ===========================================================================
## Web::CSS::BackgroundBox (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum BackgroundBox as u8:
border_box = 0
content_box = 1
padding_box = 2
text = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_background_box.
pub func keyword_to_background_box(keyword: Keyword) -> BackgroundBox?:
match keyword:
.border_box: return BackgroundBox.border_box
.content_box: return BackgroundBox.content_box
.padding_box: return BackgroundBox.padding_box
.text: return BackgroundBox.text
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(BackgroundBox).
pub func to_keyword_background_box(background_box_value: BackgroundBox) -> Keyword:
match background_box_value:
.border_box: return Keyword.border_box
.content_box: return Keyword.content_box
.padding_box: return Keyword.padding_box
.text: return Keyword.text
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(BackgroundBox).
pub func to_string_background_box(value: BackgroundBox) -> ak.StringView:
match value:
.border_box: return ak.sv("border-box")
.content_box: return ak.sv("content-box")
.padding_box: return ak.sv("padding-box")
.text: return ak.sv("text")
_: trap("VERIFY_NOT_REACHED")
# mark: BaselineMetric ==========================================================================
## Web::CSS::BaselineMetric (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum BaselineMetric as u8:
text_bottom = 0
alphabetic = 1
ideographic = 2
middle = 3
central = 4
mathematical = 5
hanging = 6
text_top = 7
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_baseline_metric.
pub func keyword_to_baseline_metric(keyword: Keyword) -> BaselineMetric?:
match keyword:
.text_bottom: return BaselineMetric.text_bottom
.alphabetic: return BaselineMetric.alphabetic
.ideographic: return BaselineMetric.ideographic
.middle: return BaselineMetric.middle
.central: return BaselineMetric.central
.mathematical: return BaselineMetric.mathematical
.hanging: return BaselineMetric.hanging
.text_top: return BaselineMetric.text_top
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(BaselineMetric).
pub func to_keyword_baseline_metric(baseline_metric_value: BaselineMetric) -> Keyword:
match baseline_metric_value:
.text_bottom: return Keyword.text_bottom
.alphabetic: return Keyword.alphabetic
.ideographic: return Keyword.ideographic
.middle: return Keyword.middle
.central: return Keyword.central
.mathematical: return Keyword.mathematical
.hanging: return Keyword.hanging
.text_top: return Keyword.text_top
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(BaselineMetric).
pub func to_string_baseline_metric(value: BaselineMetric) -> ak.StringView:
match value:
.text_bottom: return ak.sv("text-bottom")
.alphabetic: return ak.sv("alphabetic")
.ideographic: return ak.sv("ideographic")
.middle: return ak.sv("middle")
.central: return ak.sv("central")
.mathematical: return ak.sv("mathematical")
.hanging: return ak.sv("hanging")
.text_top: return ak.sv("text-top")
_: trap("VERIFY_NOT_REACHED")
# mark: BorderCollapse ==========================================================================
## Web::CSS::BorderCollapse (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum BorderCollapse as u8:
separate = 0
collapse = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_border_collapse.
pub func keyword_to_border_collapse(keyword: Keyword) -> BorderCollapse?:
match keyword:
.separate: return BorderCollapse.separate
.collapse: return BorderCollapse.collapse
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(BorderCollapse).
pub func to_keyword_border_collapse(border_collapse_value: BorderCollapse) -> Keyword:
match border_collapse_value:
.separate: return Keyword.separate
.collapse: return Keyword.collapse
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(BorderCollapse).
pub func to_string_border_collapse(value: BorderCollapse) -> ak.StringView:
match value:
.separate: return ak.sv("separate")
.collapse: return ak.sv("collapse")
_: trap("VERIFY_NOT_REACHED")
# mark: BorderImageRepeat =======================================================================
## Web::CSS::BorderImageRepeat (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum BorderImageRepeat as u8:
stretch = 0
repeat = 1
round = 2
space = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_border_image_repeat.
pub func keyword_to_border_image_repeat(keyword: Keyword) -> BorderImageRepeat?:
match keyword:
.stretch: return BorderImageRepeat.stretch
.repeat: return BorderImageRepeat.repeat
.round: return BorderImageRepeat.round
.space: return BorderImageRepeat.space
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(BorderImageRepeat).
pub func to_keyword_border_image_repeat(border_image_repeat_value: BorderImageRepeat) -> Keyword:
match border_image_repeat_value:
.stretch: return Keyword.stretch
.repeat: return Keyword.repeat
.round: return Keyword.round
.space: return Keyword.space
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(BorderImageRepeat).
pub func to_string_border_image_repeat(value: BorderImageRepeat) -> ak.StringView:
match value:
.stretch: return ak.sv("stretch")
.repeat: return ak.sv("repeat")
.round: return ak.sv("round")
.space: return ak.sv("space")
_: trap("VERIFY_NOT_REACHED")
# mark: BoxSizing ===============================================================================
## Web::CSS::BoxSizing (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum BoxSizing as u8:
border_box = 0
content_box = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_box_sizing.
pub func keyword_to_box_sizing(keyword: Keyword) -> BoxSizing?:
match keyword:
.border_box: return BoxSizing.border_box
.content_box: return BoxSizing.content_box
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(BoxSizing).
pub func to_keyword_box_sizing(box_sizing_value: BoxSizing) -> Keyword:
match box_sizing_value:
.border_box: return Keyword.border_box
.content_box: return Keyword.content_box
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(BoxSizing).
pub func to_string_box_sizing(value: BoxSizing) -> ak.StringView:
match value:
.border_box: return ak.sv("border-box")
.content_box: return ak.sv("content-box")
_: trap("VERIFY_NOT_REACHED")
# mark: CaptionSide =============================================================================
## Web::CSS::CaptionSide (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum CaptionSide as u8:
top = 0
bottom = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_caption_side.
pub func keyword_to_caption_side(keyword: Keyword) -> CaptionSide?:
match keyword:
.top: return CaptionSide.top
.bottom: return CaptionSide.bottom
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(CaptionSide).
pub func to_keyword_caption_side(caption_side_value: CaptionSide) -> Keyword:
match caption_side_value:
.top: return Keyword.top
.bottom: return Keyword.bottom
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(CaptionSide).
pub func to_string_caption_side(value: CaptionSide) -> ak.StringView:
match value:
.top: return ak.sv("top")
.bottom: return ak.sv("bottom")
_: trap("VERIFY_NOT_REACHED")
# mark: Clear ===================================================================================
## Web::CSS::Clear (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Clear as u8:
none_ = 0
left = 1
right = 2
both = 3
inline_start = 4
inline_end = 5
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_clear.
pub func keyword_to_clear(keyword: Keyword) -> Clear?:
match keyword:
.none_: return Clear.none_
.left: return Clear.left
.right: return Clear.right
.both: return Clear.both
.inline_start: return Clear.inline_start
.inline_end: return Clear.inline_end
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Clear).
pub func to_keyword_clear(clear_value: Clear) -> Keyword:
match clear_value:
.none_: return Keyword.none_
.left: return Keyword.left
.right: return Keyword.right
.both: return Keyword.both
.inline_start: return Keyword.inline_start
.inline_end: return Keyword.inline_end
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Clear).
pub func to_string_clear(value: Clear) -> ak.StringView:
match value:
.none_: return ak.sv("none")
.left: return ak.sv("left")
.right: return ak.sv("right")
.both: return ak.sv("both")
.inline_start: return ak.sv("inline-start")
.inline_end: return ak.sv("inline-end")
_: trap("VERIFY_NOT_REACHED")
# mark: ColorInterpolation ======================================================================
## Web::CSS::ColorInterpolation (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ColorInterpolation as u8:
auto = 0
linearrgb = 1
srgb = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_color_interpolation.
pub func keyword_to_color_interpolation(keyword: Keyword) -> ColorInterpolation?:
match keyword:
.auto: return ColorInterpolation.auto
.linearrgb: return ColorInterpolation.linearrgb
.srgb: return ColorInterpolation.srgb
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ColorInterpolation).
pub func to_keyword_color_interpolation(color_interpolation_value: ColorInterpolation) -> Keyword:
match color_interpolation_value:
.auto: return Keyword.auto
.linearrgb: return Keyword.linearrgb
.srgb: return Keyword.srgb
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ColorInterpolation).
pub func to_string_color_interpolation(value: ColorInterpolation) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.linearrgb: return ak.sv("linearrgb")
.srgb: return ak.sv("srgb")
_: trap("VERIFY_NOT_REACHED")
# mark: ColumnSpan ==============================================================================
## Web::CSS::ColumnSpan (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ColumnSpan as u8:
none_ = 0
all = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_column_span.
pub func keyword_to_column_span(keyword: Keyword) -> ColumnSpan?:
match keyword:
.none_: return ColumnSpan.none_
.all: return ColumnSpan.all
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ColumnSpan).
pub func to_keyword_column_span(column_span_value: ColumnSpan) -> Keyword:
match column_span_value:
.none_: return Keyword.none_
.all: return Keyword.all
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ColumnSpan).
pub func to_string_column_span(value: ColumnSpan) -> ak.StringView:
match value:
.none_: return ak.sv("none")
.all: return ak.sv("all")
_: trap("VERIFY_NOT_REACHED")
# mark: CommonLigValue ==========================================================================
## Web::CSS::CommonLigValue (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum CommonLigValue as u8:
common_ligatures = 0
no_common_ligatures = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_common_lig_value.
pub func keyword_to_common_lig_value(keyword: Keyword) -> CommonLigValue?:
match keyword:
.common_ligatures: return CommonLigValue.common_ligatures
.no_common_ligatures: return CommonLigValue.no_common_ligatures
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(CommonLigValue).
pub func to_keyword_common_lig_value(common_lig_value_value: CommonLigValue) -> Keyword:
match common_lig_value_value:
.common_ligatures: return Keyword.common_ligatures
.no_common_ligatures: return Keyword.no_common_ligatures
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(CommonLigValue).
pub func to_string_common_lig_value(value: CommonLigValue) -> ak.StringView:
match value:
.common_ligatures: return ak.sv("common-ligatures")
.no_common_ligatures: return ak.sv("no-common-ligatures")
_: trap("VERIFY_NOT_REACHED")
# mark: CompositingOperator =====================================================================
## Web::CSS::CompositingOperator (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum CompositingOperator as u8:
add = 0
subtract = 1
intersect = 2
exclude = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_compositing_operator.
pub func keyword_to_compositing_operator(keyword: Keyword) -> CompositingOperator?:
match keyword:
.add: return CompositingOperator.add
.subtract: return CompositingOperator.subtract
.intersect: return CompositingOperator.intersect
.exclude: return CompositingOperator.exclude
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(CompositingOperator).
pub func to_keyword_compositing_operator(compositing_operator_value: CompositingOperator) -> Keyword:
match compositing_operator_value:
.add: return Keyword.add
.subtract: return Keyword.subtract
.intersect: return Keyword.intersect
.exclude: return Keyword.exclude
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(CompositingOperator).
pub func to_string_compositing_operator(value: CompositingOperator) -> ak.StringView:
match value:
.add: return ak.sv("add")
.subtract: return ak.sv("subtract")
.intersect: return ak.sv("intersect")
.exclude: return ak.sv("exclude")
_: trap("VERIFY_NOT_REACHED")
# mark: Contain =================================================================================
## Web::CSS::Contain (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Contain as u8:
none_ = 0
strict = 1
content = 2
size = 3
inline_size = 4
layout = 5
style = 6
paint = 7
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_contain.
pub func keyword_to_contain(keyword: Keyword) -> Contain?:
match keyword:
.none_: return Contain.none_
.strict: return Contain.strict
.content: return Contain.content
.size: return Contain.size
.inline_size: return Contain.inline_size
.layout: return Contain.layout
.style: return Contain.style
.paint: return Contain.paint
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Contain).
pub func to_keyword_contain(contain_value: Contain) -> Keyword:
match contain_value:
.none_: return Keyword.none_
.strict: return Keyword.strict
.content: return Keyword.content
.size: return Keyword.size
.inline_size: return Keyword.inline_size
.layout: return Keyword.layout
.style: return Keyword.style
.paint: return Keyword.paint
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Contain).
pub func to_string_contain(value: Contain) -> ak.StringView:
match value:
.none_: return ak.sv("none")
.strict: return ak.sv("strict")
.content: return ak.sv("content")
.size: return ak.sv("size")
.inline_size: return ak.sv("inline-size")
.layout: return ak.sv("layout")
.style: return ak.sv("style")
.paint: return ak.sv("paint")
_: trap("VERIFY_NOT_REACHED")
# mark: ContentVisibility =======================================================================
## Web::CSS::ContentVisibility (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ContentVisibility as u8:
visible = 0
auto = 1
hidden = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_content_visibility.
pub func keyword_to_content_visibility(keyword: Keyword) -> ContentVisibility?:
match keyword:
.visible: return ContentVisibility.visible
.auto: return ContentVisibility.auto
.hidden: return ContentVisibility.hidden
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ContentVisibility).
pub func to_keyword_content_visibility(content_visibility_value: ContentVisibility) -> Keyword:
match content_visibility_value:
.visible: return Keyword.visible
.auto: return Keyword.auto
.hidden: return Keyword.hidden
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ContentVisibility).
pub func to_string_content_visibility(value: ContentVisibility) -> ak.StringView:
match value:
.visible: return ak.sv("visible")
.auto: return ak.sv("auto")
.hidden: return ak.sv("hidden")
_: trap("VERIFY_NOT_REACHED")
# mark: ContextualAltValue ======================================================================
## Web::CSS::ContextualAltValue (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ContextualAltValue as u8:
contextual = 0
no_contextual = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_contextual_alt_value.
pub func keyword_to_contextual_alt_value(keyword: Keyword) -> ContextualAltValue?:
match keyword:
.contextual: return ContextualAltValue.contextual
.no_contextual: return ContextualAltValue.no_contextual
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ContextualAltValue).
pub func to_keyword_contextual_alt_value(contextual_alt_value_value: ContextualAltValue) -> Keyword:
match contextual_alt_value_value:
.contextual: return Keyword.contextual
.no_contextual: return Keyword.no_contextual
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ContextualAltValue).
pub func to_string_contextual_alt_value(value: ContextualAltValue) -> ak.StringView:
match value:
.contextual: return ak.sv("contextual")
.no_contextual: return ak.sv("no-contextual")
_: trap("VERIFY_NOT_REACHED")
# mark: CoordBox ================================================================================
## Web::CSS::CoordBox (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum CoordBox as u8:
content_box = 0
padding_box = 1
border_box = 2
fill_box = 3
stroke_box = 4
view_box = 5
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_coord_box.
pub func keyword_to_coord_box(keyword: Keyword) -> CoordBox?:
match keyword:
.content_box: return CoordBox.content_box
.padding_box: return CoordBox.padding_box
.border_box: return CoordBox.border_box
.fill_box: return CoordBox.fill_box
.stroke_box: return CoordBox.stroke_box
.view_box: return CoordBox.view_box
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(CoordBox).
pub func to_keyword_coord_box(coord_box_value: CoordBox) -> Keyword:
match coord_box_value:
.content_box: return Keyword.content_box
.padding_box: return Keyword.padding_box
.border_box: return Keyword.border_box
.fill_box: return Keyword.fill_box
.stroke_box: return Keyword.stroke_box
.view_box: return Keyword.view_box
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(CoordBox).
pub func to_string_coord_box(value: CoordBox) -> ak.StringView:
match value:
.content_box: return ak.sv("content-box")
.padding_box: return ak.sv("padding-box")
.border_box: return ak.sv("border-box")
.fill_box: return ak.sv("fill-box")
.stroke_box: return ak.sv("stroke-box")
.view_box: return ak.sv("view-box")
_: trap("VERIFY_NOT_REACHED")
# mark: CounterStyleNameKeyword =================================================================
## Web::CSS::CounterStyleNameKeyword (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum CounterStyleNameKeyword as u8:
adlam = 0
afar = 1
agaw = 2
ancient_tamil = 3
arabic_abjad = 4
arabic_indic = 5
ari = 6
armenian = 7
balinese = 8
bamum = 9
bangla = 10
bengali = 11
binary = 12
blin = 13
bodo = 14
cambodian = 15
circle = 16
circled_decimal = 17
circled_ideograph = 18
circled_katakana = 19
circled_korean_consonant = 20
circled_korean_syllable = 21
circled_lower_latin = 22
circled_upper_latin = 23
cjk_decimal = 24
cjk_earthly_branch = 25
cjk_heavenly_stem = 26
cjk_ideographic = 27
cjk_stem_branch = 28
cjk_tally_mark = 29
decimal = 30
decimal_leading_zero = 31
devanagari = 32
disc = 33
disclosure_closed = 34
disclosure_open = 35
dizi = 36
dogri = 37
dotted_decimal = 38
double_circled_decimal = 39
ethiopic_halehame_am = 40
ethiopic_halehame_ti_er = 41
ethiopic_halehame_ti_et = 42
ethiopic_halehame = 43
ethiopic_numeric = 44
filled_circled_decimal = 45
fullwidth_decimal = 46
fullwidth_lower_alpha = 47
fullwidth_upper_alpha = 48
fullwidth_upper_roman = 49
gedeo = 50
georgian = 51
greek_lower_ancient = 52
greek_lower_modern = 53
greek_upper_ancient = 54
greek_upper_modern = 55
gujarati_alpha = 56
gujarati = 57
gumuz = 58
gurmukhi = 59
hadiyaa = 60
hangul_consonant = 61
hangul = 62
hanifi_rohingya = 63
harari = 64
hebrew = 65
hindi = 66
hiragana_iroha = 67
hiragana = 68
japanese_formal = 69
japanese_informal = 70
javanese = 71
kaffa = 72
kannada_alpha = 73
kannada = 74
kashmiri = 75
katakana_iroha = 76
katakana = 77
kayah_li = 78
kebena = 79
kembata = 80
khmer_consonant = 81
khmer = 82
konkani = 83
konso = 84
korean_consonant = 85
korean_hangul_formal = 86
korean_hanja_formal = 87
korean_hanja_informal = 88
korean_syllable = 89
kunama = 90
lanna_hora = 91
lanna_tham = 92
lao = 93
lepcha = 94
limbu = 95
lower_alpha_symbolic = 96
lower_alpha = 97
lower_armenian = 98
lower_belorussian = 99
lower_bulgarian = 100
lower_greek = 101
lower_hexadecimal = 102
lower_latin = 103
lower_macedonian = 104
lower_oromo_qubee = 105
lower_roman = 106
lower_russian_full = 107
lower_russian = 108
lower_serbian = 109
lower_ukrainian_full = 110
lower_ukrainian = 111
maghrebi_abjad = 112
maithili = 113
malayalam_alpha = 114
malayalam = 115
manipuri = 116
marathi = 117
meen = 118
meetei = 119
mongolian = 120
mro = 121
myanmar = 122
nag_mundari = 123
new_base60 = 124
newa = 125
nko_cardinal = 126
octal = 127
odia = 128
ol_chiki = 129
oriya = 130
oromo = 131
parenthesized_decimal = 132
parenthesized_hangul_consonant = 133
parenthesized_hangul_syllable = 134
parenthesized_ideograph = 135
parenthesized_lower_latin = 136
persian_abjad = 137
persian_alphabetic = 138
persian = 139
punjabi = 140
saho = 141
sanskrit = 142
santali = 143
shan = 144
sidama = 145
silti = 146
simp_chinese_formal = 147
simp_chinese_informal = 148
simple_lower_roman = 149
simple_upper_roman = 150
sindhi = 151
square = 152
sundanese = 153
super_decimal = 154
tai_lue = 155
tally_mark = 156
tamil = 157
telugu_alpha = 158
telugu = 159
thai_alpha = 160
thai = 161
tibetan = 162
tigre = 163
trad_chinese_formal = 164
trad_chinese_informal = 165
upper_alpha_symbolic = 166
upper_alpha = 167
upper_armenian = 168
upper_belorussian = 169
upper_bulgarian = 170
upper_hexadecimal = 171
upper_latin = 172
upper_macedonian = 173
upper_oromo_qubee = 174
upper_roman = 175
upper_russian_full = 176
upper_russian = 177
upper_serbian = 178
upper_ukrainian_full = 179
upper_ukrainian = 180
urdu_abjad = 181
urdu_alphabetic = 182
urdu = 183
warang_citi = 184
wolaita = 185
yemsa = 186
zhuyin = 187
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_counter_style_name_keyword.
pub func keyword_to_counter_style_name_keyword(keyword: Keyword) -> CounterStyleNameKeyword?:
match keyword:
.adlam: return CounterStyleNameKeyword.adlam
.afar: return CounterStyleNameKeyword.afar
.agaw: return CounterStyleNameKeyword.agaw
.ancient_tamil: return CounterStyleNameKeyword.ancient_tamil
.arabic_abjad: return CounterStyleNameKeyword.arabic_abjad
.arabic_indic: return CounterStyleNameKeyword.arabic_indic
.ari: return CounterStyleNameKeyword.ari
.armenian: return CounterStyleNameKeyword.armenian
.balinese: return CounterStyleNameKeyword.balinese
.bamum: return CounterStyleNameKeyword.bamum
.bangla: return CounterStyleNameKeyword.bangla
.bengali: return CounterStyleNameKeyword.bengali
.binary: return CounterStyleNameKeyword.binary
.blin: return CounterStyleNameKeyword.blin
.bodo: return CounterStyleNameKeyword.bodo
.cambodian: return CounterStyleNameKeyword.cambodian
.circle: return CounterStyleNameKeyword.circle
.circled_decimal: return CounterStyleNameKeyword.circled_decimal
.circled_ideograph: return CounterStyleNameKeyword.circled_ideograph
.circled_katakana: return CounterStyleNameKeyword.circled_katakana
.circled_korean_consonant: return CounterStyleNameKeyword.circled_korean_consonant
.circled_korean_syllable: return CounterStyleNameKeyword.circled_korean_syllable
.circled_lower_latin: return CounterStyleNameKeyword.circled_lower_latin
.circled_upper_latin: return CounterStyleNameKeyword.circled_upper_latin
.cjk_decimal: return CounterStyleNameKeyword.cjk_decimal
.cjk_earthly_branch: return CounterStyleNameKeyword.cjk_earthly_branch
.cjk_heavenly_stem: return CounterStyleNameKeyword.cjk_heavenly_stem
.cjk_ideographic: return CounterStyleNameKeyword.cjk_ideographic
.cjk_stem_branch: return CounterStyleNameKeyword.cjk_stem_branch
.cjk_tally_mark: return CounterStyleNameKeyword.cjk_tally_mark
.decimal: return CounterStyleNameKeyword.decimal
.decimal_leading_zero: return CounterStyleNameKeyword.decimal_leading_zero
.devanagari: return CounterStyleNameKeyword.devanagari
.disc: return CounterStyleNameKeyword.disc
.disclosure_closed: return CounterStyleNameKeyword.disclosure_closed
.disclosure_open: return CounterStyleNameKeyword.disclosure_open
.dizi: return CounterStyleNameKeyword.dizi
.dogri: return CounterStyleNameKeyword.dogri
.dotted_decimal: return CounterStyleNameKeyword.dotted_decimal
.double_circled_decimal: return CounterStyleNameKeyword.double_circled_decimal
.ethiopic_halehame_am: return CounterStyleNameKeyword.ethiopic_halehame_am
.ethiopic_halehame_ti_er: return CounterStyleNameKeyword.ethiopic_halehame_ti_er
.ethiopic_halehame_ti_et: return CounterStyleNameKeyword.ethiopic_halehame_ti_et
.ethiopic_halehame: return CounterStyleNameKeyword.ethiopic_halehame
.ethiopic_numeric: return CounterStyleNameKeyword.ethiopic_numeric
.filled_circled_decimal: return CounterStyleNameKeyword.filled_circled_decimal
.fullwidth_decimal: return CounterStyleNameKeyword.fullwidth_decimal
.fullwidth_lower_alpha: return CounterStyleNameKeyword.fullwidth_lower_alpha
.fullwidth_upper_alpha: return CounterStyleNameKeyword.fullwidth_upper_alpha
.fullwidth_upper_roman: return CounterStyleNameKeyword.fullwidth_upper_roman
.gedeo: return CounterStyleNameKeyword.gedeo
.georgian: return CounterStyleNameKeyword.georgian
.greek_lower_ancient: return CounterStyleNameKeyword.greek_lower_ancient
.greek_lower_modern: return CounterStyleNameKeyword.greek_lower_modern
.greek_upper_ancient: return CounterStyleNameKeyword.greek_upper_ancient
.greek_upper_modern: return CounterStyleNameKeyword.greek_upper_modern
.gujarati_alpha: return CounterStyleNameKeyword.gujarati_alpha
.gujarati: return CounterStyleNameKeyword.gujarati
.gumuz: return CounterStyleNameKeyword.gumuz
.gurmukhi: return CounterStyleNameKeyword.gurmukhi
.hadiyaa: return CounterStyleNameKeyword.hadiyaa
.hangul_consonant: return CounterStyleNameKeyword.hangul_consonant
.hangul: return CounterStyleNameKeyword.hangul
.hanifi_rohingya: return CounterStyleNameKeyword.hanifi_rohingya
.harari: return CounterStyleNameKeyword.harari
.hebrew: return CounterStyleNameKeyword.hebrew
.hindi: return CounterStyleNameKeyword.hindi
.hiragana_iroha: return CounterStyleNameKeyword.hiragana_iroha
.hiragana: return CounterStyleNameKeyword.hiragana
.japanese_formal: return CounterStyleNameKeyword.japanese_formal
.japanese_informal: return CounterStyleNameKeyword.japanese_informal
.javanese: return CounterStyleNameKeyword.javanese
.kaffa: return CounterStyleNameKeyword.kaffa
.kannada_alpha: return CounterStyleNameKeyword.kannada_alpha
.kannada: return CounterStyleNameKeyword.kannada
.kashmiri: return CounterStyleNameKeyword.kashmiri
.katakana_iroha: return CounterStyleNameKeyword.katakana_iroha
.katakana: return CounterStyleNameKeyword.katakana
.kayah_li: return CounterStyleNameKeyword.kayah_li
.kebena: return CounterStyleNameKeyword.kebena
.kembata: return CounterStyleNameKeyword.kembata
.khmer_consonant: return CounterStyleNameKeyword.khmer_consonant
.khmer: return CounterStyleNameKeyword.khmer
.konkani: return CounterStyleNameKeyword.konkani
.konso: return CounterStyleNameKeyword.konso
.korean_consonant: return CounterStyleNameKeyword.korean_consonant
.korean_hangul_formal: return CounterStyleNameKeyword.korean_hangul_formal
.korean_hanja_formal: return CounterStyleNameKeyword.korean_hanja_formal
.korean_hanja_informal: return CounterStyleNameKeyword.korean_hanja_informal
.korean_syllable: return CounterStyleNameKeyword.korean_syllable
.kunama: return CounterStyleNameKeyword.kunama
.lanna_hora: return CounterStyleNameKeyword.lanna_hora
.lanna_tham: return CounterStyleNameKeyword.lanna_tham
.lao: return CounterStyleNameKeyword.lao
.lepcha: return CounterStyleNameKeyword.lepcha
.limbu: return CounterStyleNameKeyword.limbu
.lower_alpha_symbolic: return CounterStyleNameKeyword.lower_alpha_symbolic
.lower_alpha: return CounterStyleNameKeyword.lower_alpha
.lower_armenian: return CounterStyleNameKeyword.lower_armenian
.lower_belorussian: return CounterStyleNameKeyword.lower_belorussian
.lower_bulgarian: return CounterStyleNameKeyword.lower_bulgarian
.lower_greek: return CounterStyleNameKeyword.lower_greek
.lower_hexadecimal: return CounterStyleNameKeyword.lower_hexadecimal
.lower_latin: return CounterStyleNameKeyword.lower_latin
.lower_macedonian: return CounterStyleNameKeyword.lower_macedonian
.lower_oromo_qubee: return CounterStyleNameKeyword.lower_oromo_qubee
.lower_roman: return CounterStyleNameKeyword.lower_roman
.lower_russian_full: return CounterStyleNameKeyword.lower_russian_full
.lower_russian: return CounterStyleNameKeyword.lower_russian
.lower_serbian: return CounterStyleNameKeyword.lower_serbian
.lower_ukrainian_full: return CounterStyleNameKeyword.lower_ukrainian_full
.lower_ukrainian: return CounterStyleNameKeyword.lower_ukrainian
.maghrebi_abjad: return CounterStyleNameKeyword.maghrebi_abjad
.maithili: return CounterStyleNameKeyword.maithili
.malayalam_alpha: return CounterStyleNameKeyword.malayalam_alpha
.malayalam: return CounterStyleNameKeyword.malayalam
.manipuri: return CounterStyleNameKeyword.manipuri
.marathi: return CounterStyleNameKeyword.marathi
.meen: return CounterStyleNameKeyword.meen
.meetei: return CounterStyleNameKeyword.meetei
.mongolian: return CounterStyleNameKeyword.mongolian
.mro: return CounterStyleNameKeyword.mro
.myanmar: return CounterStyleNameKeyword.myanmar
.nag_mundari: return CounterStyleNameKeyword.nag_mundari
.new_base60: return CounterStyleNameKeyword.new_base60
.newa: return CounterStyleNameKeyword.newa
.nko_cardinal: return CounterStyleNameKeyword.nko_cardinal
.octal: return CounterStyleNameKeyword.octal
.odia: return CounterStyleNameKeyword.odia
.ol_chiki: return CounterStyleNameKeyword.ol_chiki
.oriya: return CounterStyleNameKeyword.oriya
.oromo: return CounterStyleNameKeyword.oromo
.parenthesized_decimal: return CounterStyleNameKeyword.parenthesized_decimal
.parenthesized_hangul_consonant: return CounterStyleNameKeyword.parenthesized_hangul_consonant
.parenthesized_hangul_syllable: return CounterStyleNameKeyword.parenthesized_hangul_syllable
.parenthesized_ideograph: return CounterStyleNameKeyword.parenthesized_ideograph
.parenthesized_lower_latin: return CounterStyleNameKeyword.parenthesized_lower_latin
.persian_abjad: return CounterStyleNameKeyword.persian_abjad
.persian_alphabetic: return CounterStyleNameKeyword.persian_alphabetic
.persian: return CounterStyleNameKeyword.persian
.punjabi: return CounterStyleNameKeyword.punjabi
.saho: return CounterStyleNameKeyword.saho
.sanskrit: return CounterStyleNameKeyword.sanskrit
.santali: return CounterStyleNameKeyword.santali
.shan: return CounterStyleNameKeyword.shan
.sidama: return CounterStyleNameKeyword.sidama
.silti: return CounterStyleNameKeyword.silti
.simp_chinese_formal: return CounterStyleNameKeyword.simp_chinese_formal
.simp_chinese_informal: return CounterStyleNameKeyword.simp_chinese_informal
.simple_lower_roman: return CounterStyleNameKeyword.simple_lower_roman
.simple_upper_roman: return CounterStyleNameKeyword.simple_upper_roman
.sindhi: return CounterStyleNameKeyword.sindhi
.square: return CounterStyleNameKeyword.square
.sundanese: return CounterStyleNameKeyword.sundanese
.super_decimal: return CounterStyleNameKeyword.super_decimal
.tai_lue: return CounterStyleNameKeyword.tai_lue
.tally_mark: return CounterStyleNameKeyword.tally_mark
.tamil: return CounterStyleNameKeyword.tamil
.telugu_alpha: return CounterStyleNameKeyword.telugu_alpha
.telugu: return CounterStyleNameKeyword.telugu
.thai_alpha: return CounterStyleNameKeyword.thai_alpha
.thai: return CounterStyleNameKeyword.thai
.tibetan: return CounterStyleNameKeyword.tibetan
.tigre: return CounterStyleNameKeyword.tigre
.trad_chinese_formal: return CounterStyleNameKeyword.trad_chinese_formal
.trad_chinese_informal: return CounterStyleNameKeyword.trad_chinese_informal
.upper_alpha_symbolic: return CounterStyleNameKeyword.upper_alpha_symbolic
.upper_alpha: return CounterStyleNameKeyword.upper_alpha
.upper_armenian: return CounterStyleNameKeyword.upper_armenian
.upper_belorussian: return CounterStyleNameKeyword.upper_belorussian
.upper_bulgarian: return CounterStyleNameKeyword.upper_bulgarian
.upper_hexadecimal: return CounterStyleNameKeyword.upper_hexadecimal
.upper_latin: return CounterStyleNameKeyword.upper_latin
.upper_macedonian: return CounterStyleNameKeyword.upper_macedonian
.upper_oromo_qubee: return CounterStyleNameKeyword.upper_oromo_qubee
.upper_roman: return CounterStyleNameKeyword.upper_roman
.upper_russian_full: return CounterStyleNameKeyword.upper_russian_full
.upper_russian: return CounterStyleNameKeyword.upper_russian
.upper_serbian: return CounterStyleNameKeyword.upper_serbian
.upper_ukrainian_full: return CounterStyleNameKeyword.upper_ukrainian_full
.upper_ukrainian: return CounterStyleNameKeyword.upper_ukrainian
.urdu_abjad: return CounterStyleNameKeyword.urdu_abjad
.urdu_alphabetic: return CounterStyleNameKeyword.urdu_alphabetic
.urdu: return CounterStyleNameKeyword.urdu
.warang_citi: return CounterStyleNameKeyword.warang_citi
.wolaita: return CounterStyleNameKeyword.wolaita
.yemsa: return CounterStyleNameKeyword.yemsa
.zhuyin: return CounterStyleNameKeyword.zhuyin
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(CounterStyleNameKeyword).
pub func to_keyword_counter_style_name_keyword(counter_style_name_keyword_value: CounterStyleNameKeyword) -> Keyword:
match counter_style_name_keyword_value:
.adlam: return Keyword.adlam
.afar: return Keyword.afar
.agaw: return Keyword.agaw
.ancient_tamil: return Keyword.ancient_tamil
.arabic_abjad: return Keyword.arabic_abjad
.arabic_indic: return Keyword.arabic_indic
.ari: return Keyword.ari
.armenian: return Keyword.armenian
.balinese: return Keyword.balinese
.bamum: return Keyword.bamum
.bangla: return Keyword.bangla
.bengali: return Keyword.bengali
.binary: return Keyword.binary
.blin: return Keyword.blin
.bodo: return Keyword.bodo
.cambodian: return Keyword.cambodian
.circle: return Keyword.circle
.circled_decimal: return Keyword.circled_decimal
.circled_ideograph: return Keyword.circled_ideograph
.circled_katakana: return Keyword.circled_katakana
.circled_korean_consonant: return Keyword.circled_korean_consonant
.circled_korean_syllable: return Keyword.circled_korean_syllable
.circled_lower_latin: return Keyword.circled_lower_latin
.circled_upper_latin: return Keyword.circled_upper_latin
.cjk_decimal: return Keyword.cjk_decimal
.cjk_earthly_branch: return Keyword.cjk_earthly_branch
.cjk_heavenly_stem: return Keyword.cjk_heavenly_stem
.cjk_ideographic: return Keyword.cjk_ideographic
.cjk_stem_branch: return Keyword.cjk_stem_branch
.cjk_tally_mark: return Keyword.cjk_tally_mark
.decimal: return Keyword.decimal
.decimal_leading_zero: return Keyword.decimal_leading_zero
.devanagari: return Keyword.devanagari
.disc: return Keyword.disc
.disclosure_closed: return Keyword.disclosure_closed
.disclosure_open: return Keyword.disclosure_open
.dizi: return Keyword.dizi
.dogri: return Keyword.dogri
.dotted_decimal: return Keyword.dotted_decimal
.double_circled_decimal: return Keyword.double_circled_decimal
.ethiopic_halehame_am: return Keyword.ethiopic_halehame_am
.ethiopic_halehame_ti_er: return Keyword.ethiopic_halehame_ti_er
.ethiopic_halehame_ti_et: return Keyword.ethiopic_halehame_ti_et
.ethiopic_halehame: return Keyword.ethiopic_halehame
.ethiopic_numeric: return Keyword.ethiopic_numeric
.filled_circled_decimal: return Keyword.filled_circled_decimal
.fullwidth_decimal: return Keyword.fullwidth_decimal
.fullwidth_lower_alpha: return Keyword.fullwidth_lower_alpha
.fullwidth_upper_alpha: return Keyword.fullwidth_upper_alpha
.fullwidth_upper_roman: return Keyword.fullwidth_upper_roman
.gedeo: return Keyword.gedeo
.georgian: return Keyword.georgian
.greek_lower_ancient: return Keyword.greek_lower_ancient
.greek_lower_modern: return Keyword.greek_lower_modern
.greek_upper_ancient: return Keyword.greek_upper_ancient
.greek_upper_modern: return Keyword.greek_upper_modern
.gujarati_alpha: return Keyword.gujarati_alpha
.gujarati: return Keyword.gujarati
.gumuz: return Keyword.gumuz
.gurmukhi: return Keyword.gurmukhi
.hadiyaa: return Keyword.hadiyaa
.hangul_consonant: return Keyword.hangul_consonant
.hangul: return Keyword.hangul
.hanifi_rohingya: return Keyword.hanifi_rohingya
.harari: return Keyword.harari
.hebrew: return Keyword.hebrew
.hindi: return Keyword.hindi
.hiragana_iroha: return Keyword.hiragana_iroha
.hiragana: return Keyword.hiragana
.japanese_formal: return Keyword.japanese_formal
.japanese_informal: return Keyword.japanese_informal
.javanese: return Keyword.javanese
.kaffa: return Keyword.kaffa
.kannada_alpha: return Keyword.kannada_alpha
.kannada: return Keyword.kannada
.kashmiri: return Keyword.kashmiri
.katakana_iroha: return Keyword.katakana_iroha
.katakana: return Keyword.katakana
.kayah_li: return Keyword.kayah_li
.kebena: return Keyword.kebena
.kembata: return Keyword.kembata
.khmer_consonant: return Keyword.khmer_consonant
.khmer: return Keyword.khmer
.konkani: return Keyword.konkani
.konso: return Keyword.konso
.korean_consonant: return Keyword.korean_consonant
.korean_hangul_formal: return Keyword.korean_hangul_formal
.korean_hanja_formal: return Keyword.korean_hanja_formal
.korean_hanja_informal: return Keyword.korean_hanja_informal
.korean_syllable: return Keyword.korean_syllable
.kunama: return Keyword.kunama
.lanna_hora: return Keyword.lanna_hora
.lanna_tham: return Keyword.lanna_tham
.lao: return Keyword.lao
.lepcha: return Keyword.lepcha
.limbu: return Keyword.limbu
.lower_alpha_symbolic: return Keyword.lower_alpha_symbolic
.lower_alpha: return Keyword.lower_alpha
.lower_armenian: return Keyword.lower_armenian
.lower_belorussian: return Keyword.lower_belorussian
.lower_bulgarian: return Keyword.lower_bulgarian
.lower_greek: return Keyword.lower_greek
.lower_hexadecimal: return Keyword.lower_hexadecimal
.lower_latin: return Keyword.lower_latin
.lower_macedonian: return Keyword.lower_macedonian
.lower_oromo_qubee: return Keyword.lower_oromo_qubee
.lower_roman: return Keyword.lower_roman
.lower_russian_full: return Keyword.lower_russian_full
.lower_russian: return Keyword.lower_russian
.lower_serbian: return Keyword.lower_serbian
.lower_ukrainian_full: return Keyword.lower_ukrainian_full
.lower_ukrainian: return Keyword.lower_ukrainian
.maghrebi_abjad: return Keyword.maghrebi_abjad
.maithili: return Keyword.maithili
.malayalam_alpha: return Keyword.malayalam_alpha
.malayalam: return Keyword.malayalam
.manipuri: return Keyword.manipuri
.marathi: return Keyword.marathi
.meen: return Keyword.meen
.meetei: return Keyword.meetei
.mongolian: return Keyword.mongolian
.mro: return Keyword.mro
.myanmar: return Keyword.myanmar
.nag_mundari: return Keyword.nag_mundari
.new_base60: return Keyword.new_base60
.newa: return Keyword.newa
.nko_cardinal: return Keyword.nko_cardinal
.octal: return Keyword.octal
.odia: return Keyword.odia
.ol_chiki: return Keyword.ol_chiki
.oriya: return Keyword.oriya
.oromo: return Keyword.oromo
.parenthesized_decimal: return Keyword.parenthesized_decimal
.parenthesized_hangul_consonant: return Keyword.parenthesized_hangul_consonant
.parenthesized_hangul_syllable: return Keyword.parenthesized_hangul_syllable
.parenthesized_ideograph: return Keyword.parenthesized_ideograph
.parenthesized_lower_latin: return Keyword.parenthesized_lower_latin
.persian_abjad: return Keyword.persian_abjad
.persian_alphabetic: return Keyword.persian_alphabetic
.persian: return Keyword.persian
.punjabi: return Keyword.punjabi
.saho: return Keyword.saho
.sanskrit: return Keyword.sanskrit
.santali: return Keyword.santali
.shan: return Keyword.shan
.sidama: return Keyword.sidama
.silti: return Keyword.silti
.simp_chinese_formal: return Keyword.simp_chinese_formal
.simp_chinese_informal: return Keyword.simp_chinese_informal
.simple_lower_roman: return Keyword.simple_lower_roman
.simple_upper_roman: return Keyword.simple_upper_roman
.sindhi: return Keyword.sindhi
.square: return Keyword.square
.sundanese: return Keyword.sundanese
.super_decimal: return Keyword.super_decimal
.tai_lue: return Keyword.tai_lue
.tally_mark: return Keyword.tally_mark
.tamil: return Keyword.tamil
.telugu_alpha: return Keyword.telugu_alpha
.telugu: return Keyword.telugu
.thai_alpha: return Keyword.thai_alpha
.thai: return Keyword.thai
.tibetan: return Keyword.tibetan
.tigre: return Keyword.tigre
.trad_chinese_formal: return Keyword.trad_chinese_formal
.trad_chinese_informal: return Keyword.trad_chinese_informal
.upper_alpha_symbolic: return Keyword.upper_alpha_symbolic
.upper_alpha: return Keyword.upper_alpha
.upper_armenian: return Keyword.upper_armenian
.upper_belorussian: return Keyword.upper_belorussian
.upper_bulgarian: return Keyword.upper_bulgarian
.upper_hexadecimal: return Keyword.upper_hexadecimal
.upper_latin: return Keyword.upper_latin
.upper_macedonian: return Keyword.upper_macedonian
.upper_oromo_qubee: return Keyword.upper_oromo_qubee
.upper_roman: return Keyword.upper_roman
.upper_russian_full: return Keyword.upper_russian_full
.upper_russian: return Keyword.upper_russian
.upper_serbian: return Keyword.upper_serbian
.upper_ukrainian_full: return Keyword.upper_ukrainian_full
.upper_ukrainian: return Keyword.upper_ukrainian
.urdu_abjad: return Keyword.urdu_abjad
.urdu_alphabetic: return Keyword.urdu_alphabetic
.urdu: return Keyword.urdu
.warang_citi: return Keyword.warang_citi
.wolaita: return Keyword.wolaita
.yemsa: return Keyword.yemsa
.zhuyin: return Keyword.zhuyin
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(CounterStyleNameKeyword).
pub func to_string_counter_style_name_keyword(value: CounterStyleNameKeyword) -> ak.StringView:
match value:
.adlam: return ak.sv("adlam")
.afar: return ak.sv("afar")
.agaw: return ak.sv("agaw")
.ancient_tamil: return ak.sv("ancient-tamil")
.arabic_abjad: return ak.sv("arabic-abjad")
.arabic_indic: return ak.sv("arabic-indic")
.ari: return ak.sv("ari")
.armenian: return ak.sv("armenian")
.balinese: return ak.sv("balinese")
.bamum: return ak.sv("bamum")
.bangla: return ak.sv("bangla")
.bengali: return ak.sv("bengali")
.binary: return ak.sv("binary")
.blin: return ak.sv("blin")
.bodo: return ak.sv("bodo")
.cambodian: return ak.sv("cambodian")
.circle: return ak.sv("circle")
.circled_decimal: return ak.sv("circled-decimal")
.circled_ideograph: return ak.sv("circled-ideograph")
.circled_katakana: return ak.sv("circled-katakana")
.circled_korean_consonant: return ak.sv("circled-korean-consonant")
.circled_korean_syllable: return ak.sv("circled-korean-syllable")
.circled_lower_latin: return ak.sv("circled-lower-latin")
.circled_upper_latin: return ak.sv("circled-upper-latin")
.cjk_decimal: return ak.sv("cjk-decimal")
.cjk_earthly_branch: return ak.sv("cjk-earthly-branch")
.cjk_heavenly_stem: return ak.sv("cjk-heavenly-stem")
.cjk_ideographic: return ak.sv("cjk-ideographic")
.cjk_stem_branch: return ak.sv("cjk-stem-branch")
.cjk_tally_mark: return ak.sv("cjk-tally-mark")
.decimal: return ak.sv("decimal")
.decimal_leading_zero: return ak.sv("decimal-leading-zero")
.devanagari: return ak.sv("devanagari")
.disc: return ak.sv("disc")
.disclosure_closed: return ak.sv("disclosure-closed")
.disclosure_open: return ak.sv("disclosure-open")
.dizi: return ak.sv("dizi")
.dogri: return ak.sv("dogri")
.dotted_decimal: return ak.sv("dotted-decimal")
.double_circled_decimal: return ak.sv("double-circled-decimal")
.ethiopic_halehame_am: return ak.sv("ethiopic-halehame-am")
.ethiopic_halehame_ti_er: return ak.sv("ethiopic-halehame-ti-er")
.ethiopic_halehame_ti_et: return ak.sv("ethiopic-halehame-ti-et")
.ethiopic_halehame: return ak.sv("ethiopic-halehame")
.ethiopic_numeric: return ak.sv("ethiopic-numeric")
.filled_circled_decimal: return ak.sv("filled-circled-decimal")
.fullwidth_decimal: return ak.sv("fullwidth-decimal")
.fullwidth_lower_alpha: return ak.sv("fullwidth-lower-alpha")
.fullwidth_upper_alpha: return ak.sv("fullwidth-upper-alpha")
.fullwidth_upper_roman: return ak.sv("fullwidth-upper-roman")
.gedeo: return ak.sv("gedeo")
.georgian: return ak.sv("georgian")
.greek_lower_ancient: return ak.sv("greek-lower-ancient")
.greek_lower_modern: return ak.sv("greek-lower-modern")
.greek_upper_ancient: return ak.sv("greek-upper-ancient")
.greek_upper_modern: return ak.sv("greek-upper-modern")
.gujarati_alpha: return ak.sv("gujarati-alpha")
.gujarati: return ak.sv("gujarati")
.gumuz: return ak.sv("gumuz")
.gurmukhi: return ak.sv("gurmukhi")
.hadiyaa: return ak.sv("hadiyaa")
.hangul_consonant: return ak.sv("hangul-consonant")
.hangul: return ak.sv("hangul")
.hanifi_rohingya: return ak.sv("hanifi-rohingya")
.harari: return ak.sv("harari")
.hebrew: return ak.sv("hebrew")
.hindi: return ak.sv("hindi")
.hiragana_iroha: return ak.sv("hiragana-iroha")
.hiragana: return ak.sv("hiragana")
.japanese_formal: return ak.sv("japanese-formal")
.japanese_informal: return ak.sv("japanese-informal")
.javanese: return ak.sv("javanese")
.kaffa: return ak.sv("kaffa")
.kannada_alpha: return ak.sv("kannada-alpha")
.kannada: return ak.sv("kannada")
.kashmiri: return ak.sv("kashmiri")
.katakana_iroha: return ak.sv("katakana-iroha")
.katakana: return ak.sv("katakana")
.kayah_li: return ak.sv("kayah-li")
.kebena: return ak.sv("kebena")
.kembata: return ak.sv("kembata")
.khmer_consonant: return ak.sv("khmer-consonant")
.khmer: return ak.sv("khmer")
.konkani: return ak.sv("konkani")
.konso: return ak.sv("konso")
.korean_consonant: return ak.sv("korean-consonant")
.korean_hangul_formal: return ak.sv("korean-hangul-formal")
.korean_hanja_formal: return ak.sv("korean-hanja-formal")
.korean_hanja_informal: return ak.sv("korean-hanja-informal")
.korean_syllable: return ak.sv("korean-syllable")
.kunama: return ak.sv("kunama")
.lanna_hora: return ak.sv("lanna-hora")
.lanna_tham: return ak.sv("lanna-tham")
.lao: return ak.sv("lao")
.lepcha: return ak.sv("lepcha")
.limbu: return ak.sv("limbu")
.lower_alpha_symbolic: return ak.sv("lower-alpha-symbolic")
.lower_alpha: return ak.sv("lower-alpha")
.lower_armenian: return ak.sv("lower-armenian")
.lower_belorussian: return ak.sv("lower-belorussian")
.lower_bulgarian: return ak.sv("lower-bulgarian")
.lower_greek: return ak.sv("lower-greek")
.lower_hexadecimal: return ak.sv("lower-hexadecimal")
.lower_latin: return ak.sv("lower-latin")
.lower_macedonian: return ak.sv("lower-macedonian")
.lower_oromo_qubee: return ak.sv("lower-oromo-qubee")
.lower_roman: return ak.sv("lower-roman")
.lower_russian_full: return ak.sv("lower-russian-full")
.lower_russian: return ak.sv("lower-russian")
.lower_serbian: return ak.sv("lower-serbian")
.lower_ukrainian_full: return ak.sv("lower-ukrainian-full")
.lower_ukrainian: return ak.sv("lower-ukrainian")
.maghrebi_abjad: return ak.sv("maghrebi-abjad")
.maithili: return ak.sv("maithili")
.malayalam_alpha: return ak.sv("malayalam-alpha")
.malayalam: return ak.sv("malayalam")
.manipuri: return ak.sv("manipuri")
.marathi: return ak.sv("marathi")
.meen: return ak.sv("meen")
.meetei: return ak.sv("meetei")
.mongolian: return ak.sv("mongolian")
.mro: return ak.sv("mro")
.myanmar: return ak.sv("myanmar")
.nag_mundari: return ak.sv("nag-mundari")
.new_base60: return ak.sv("new-base-60")
.newa: return ak.sv("newa")
.nko_cardinal: return ak.sv("nko-cardinal")
.octal: return ak.sv("octal")
.odia: return ak.sv("odia")
.ol_chiki: return ak.sv("ol-chiki")
.oriya: return ak.sv("oriya")
.oromo: return ak.sv("oromo")
.parenthesized_decimal: return ak.sv("parenthesized-decimal")
.parenthesized_hangul_consonant: return ak.sv("parenthesized-hangul-consonant")
.parenthesized_hangul_syllable: return ak.sv("parenthesized-hangul-syllable")
.parenthesized_ideograph: return ak.sv("parenthesized-ideograph")
.parenthesized_lower_latin: return ak.sv("parenthesized-lower-latin")
.persian_abjad: return ak.sv("persian-abjad")
.persian_alphabetic: return ak.sv("persian-alphabetic")
.persian: return ak.sv("persian")
.punjabi: return ak.sv("punjabi")
.saho: return ak.sv("saho")
.sanskrit: return ak.sv("sanskrit")
.santali: return ak.sv("santali")
.shan: return ak.sv("shan")
.sidama: return ak.sv("sidama")
.silti: return ak.sv("silti")
.simp_chinese_formal: return ak.sv("simp-chinese-formal")
.simp_chinese_informal: return ak.sv("simp-chinese-informal")
.simple_lower_roman: return ak.sv("simple-lower-roman")
.simple_upper_roman: return ak.sv("simple-upper-roman")
.sindhi: return ak.sv("sindhi")
.square: return ak.sv("square")
.sundanese: return ak.sv("sundanese")
.super_decimal: return ak.sv("super-decimal")
.tai_lue: return ak.sv("tai-lue")
.tally_mark: return ak.sv("tally-mark")
.tamil: return ak.sv("tamil")
.telugu_alpha: return ak.sv("telugu-alpha")
.telugu: return ak.sv("telugu")
.thai_alpha: return ak.sv("thai-alpha")
.thai: return ak.sv("thai")
.tibetan: return ak.sv("tibetan")
.tigre: return ak.sv("tigre")
.trad_chinese_formal: return ak.sv("trad-chinese-formal")
.trad_chinese_informal: return ak.sv("trad-chinese-informal")
.upper_alpha_symbolic: return ak.sv("upper-alpha-symbolic")
.upper_alpha: return ak.sv("upper-alpha")
.upper_armenian: return ak.sv("upper-armenian")
.upper_belorussian: return ak.sv("upper-belorussian")
.upper_bulgarian: return ak.sv("upper-bulgarian")
.upper_hexadecimal: return ak.sv("upper-hexadecimal")
.upper_latin: return ak.sv("upper-latin")
.upper_macedonian: return ak.sv("upper-macedonian")
.upper_oromo_qubee: return ak.sv("upper-oromo-qubee")
.upper_roman: return ak.sv("upper-roman")
.upper_russian_full: return ak.sv("upper-russian-full")
.upper_russian: return ak.sv("upper-russian")
.upper_serbian: return ak.sv("upper-serbian")
.upper_ukrainian_full: return ak.sv("upper-ukrainian-full")
.upper_ukrainian: return ak.sv("upper-ukrainian")
.urdu_abjad: return ak.sv("urdu-abjad")
.urdu_alphabetic: return ak.sv("urdu-alphabetic")
.urdu: return ak.sv("urdu")
.warang_citi: return ak.sv("warang-citi")
.wolaita: return ak.sv("wolaita")
.yemsa: return ak.sv("yemsa")
.zhuyin: return ak.sv("zhuyin")
_: trap("VERIFY_NOT_REACHED")
# mark: CounterStyleSystem ======================================================================
## Web::CSS::CounterStyleSystem (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum CounterStyleSystem as u8:
cyclic = 0
numeric = 1
alphabetic = 2
symbolic = 3
additive = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_counter_style_system.
pub func keyword_to_counter_style_system(keyword: Keyword) -> CounterStyleSystem?:
match keyword:
.cyclic: return CounterStyleSystem.cyclic
.numeric: return CounterStyleSystem.numeric
.alphabetic: return CounterStyleSystem.alphabetic
.symbolic: return CounterStyleSystem.symbolic
.additive: return CounterStyleSystem.additive
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(CounterStyleSystem).
pub func to_keyword_counter_style_system(counter_style_system_value: CounterStyleSystem) -> Keyword:
match counter_style_system_value:
.cyclic: return Keyword.cyclic
.numeric: return Keyword.numeric
.alphabetic: return Keyword.alphabetic
.symbolic: return Keyword.symbolic
.additive: return Keyword.additive
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(CounterStyleSystem).
pub func to_string_counter_style_system(value: CounterStyleSystem) -> ak.StringView:
match value:
.cyclic: return ak.sv("cyclic")
.numeric: return ak.sv("numeric")
.alphabetic: return ak.sv("alphabetic")
.symbolic: return ak.sv("symbolic")
.additive: return ak.sv("additive")
_: trap("VERIFY_NOT_REACHED")
# mark: CrossOriginModifierValue ================================================================
## Web::CSS::CrossOriginModifierValue (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum CrossOriginModifierValue as u8:
anonymous = 0
use_credentials = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_cross_origin_modifier_value.
pub func keyword_to_cross_origin_modifier_value(keyword: Keyword) -> CrossOriginModifierValue?:
match keyword:
.anonymous: return CrossOriginModifierValue.anonymous
.use_credentials: return CrossOriginModifierValue.use_credentials
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(CrossOriginModifierValue).
pub func to_keyword_cross_origin_modifier_value(cross_origin_modifier_value_value: CrossOriginModifierValue) -> Keyword:
match cross_origin_modifier_value_value:
.anonymous: return Keyword.anonymous
.use_credentials: return Keyword.use_credentials
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(CrossOriginModifierValue).
pub func to_string_cross_origin_modifier_value(value: CrossOriginModifierValue) -> ak.StringView:
match value:
.anonymous: return ak.sv("anonymous")
.use_credentials: return ak.sv("use-credentials")
_: trap("VERIFY_NOT_REACHED")
# mark: CursorPredefined ========================================================================
## Web::CSS::CursorPredefined (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum CursorPredefined as u8:
auto = 0
default = 1
none_ = 2
context_menu = 3
help = 4
pointer = 5
progress = 6
wait = 7
cell = 8
crosshair = 9
text = 10
vertical_text = 11
alias = 12
copy = 13
move = 14
no_drop = 15
not_allowed = 16
grab = 17
grabbing = 18
e_resize = 19
n_resize = 20
ne_resize = 21
nw_resize = 22
s_resize = 23
se_resize = 24
sw_resize = 25
w_resize = 26
ew_resize = 27
ns_resize = 28
nesw_resize = 29
nwse_resize = 30
col_resize = 31
row_resize = 32
all_scroll = 33
zoom_in = 34
zoom_out = 35
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_cursor_predefined.
pub func keyword_to_cursor_predefined(keyword: Keyword) -> CursorPredefined?:
match keyword:
.auto: return CursorPredefined.auto
.default: return CursorPredefined.default
.none_: return CursorPredefined.none_
.context_menu: return CursorPredefined.context_menu
.help: return CursorPredefined.help
.pointer: return CursorPredefined.pointer
.progress: return CursorPredefined.progress
.wait: return CursorPredefined.wait
.cell: return CursorPredefined.cell
.crosshair: return CursorPredefined.crosshair
.text: return CursorPredefined.text
.vertical_text: return CursorPredefined.vertical_text
.alias: return CursorPredefined.alias
.copy: return CursorPredefined.copy
.move: return CursorPredefined.move
.no_drop: return CursorPredefined.no_drop
.not_allowed: return CursorPredefined.not_allowed
.grab: return CursorPredefined.grab
.grabbing: return CursorPredefined.grabbing
.e_resize: return CursorPredefined.e_resize
.n_resize: return CursorPredefined.n_resize
.ne_resize: return CursorPredefined.ne_resize
.nw_resize: return CursorPredefined.nw_resize
.s_resize: return CursorPredefined.s_resize
.se_resize: return CursorPredefined.se_resize
.sw_resize: return CursorPredefined.sw_resize
.w_resize: return CursorPredefined.w_resize
.ew_resize: return CursorPredefined.ew_resize
.ns_resize: return CursorPredefined.ns_resize
.nesw_resize: return CursorPredefined.nesw_resize
.nwse_resize: return CursorPredefined.nwse_resize
.col_resize: return CursorPredefined.col_resize
.row_resize: return CursorPredefined.row_resize
.all_scroll: return CursorPredefined.all_scroll
.zoom_in: return CursorPredefined.zoom_in
.zoom_out: return CursorPredefined.zoom_out
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(CursorPredefined).
pub func to_keyword_cursor_predefined(cursor_predefined_value: CursorPredefined) -> Keyword:
match cursor_predefined_value:
.auto: return Keyword.auto
.default: return Keyword.default
.none_: return Keyword.none_
.context_menu: return Keyword.context_menu
.help: return Keyword.help
.pointer: return Keyword.pointer
.progress: return Keyword.progress
.wait: return Keyword.wait
.cell: return Keyword.cell
.crosshair: return Keyword.crosshair
.text: return Keyword.text
.vertical_text: return Keyword.vertical_text
.alias: return Keyword.alias
.copy: return Keyword.copy
.move: return Keyword.move
.no_drop: return Keyword.no_drop
.not_allowed: return Keyword.not_allowed
.grab: return Keyword.grab
.grabbing: return Keyword.grabbing
.e_resize: return Keyword.e_resize
.n_resize: return Keyword.n_resize
.ne_resize: return Keyword.ne_resize
.nw_resize: return Keyword.nw_resize
.s_resize: return Keyword.s_resize
.se_resize: return Keyword.se_resize
.sw_resize: return Keyword.sw_resize
.w_resize: return Keyword.w_resize
.ew_resize: return Keyword.ew_resize
.ns_resize: return Keyword.ns_resize
.nesw_resize: return Keyword.nesw_resize
.nwse_resize: return Keyword.nwse_resize
.col_resize: return Keyword.col_resize
.row_resize: return Keyword.row_resize
.all_scroll: return Keyword.all_scroll
.zoom_in: return Keyword.zoom_in
.zoom_out: return Keyword.zoom_out
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(CursorPredefined).
pub func to_string_cursor_predefined(value: CursorPredefined) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.default: return ak.sv("default")
.none_: return ak.sv("none")
.context_menu: return ak.sv("context-menu")
.help: return ak.sv("help")
.pointer: return ak.sv("pointer")
.progress: return ak.sv("progress")
.wait: return ak.sv("wait")
.cell: return ak.sv("cell")
.crosshair: return ak.sv("crosshair")
.text: return ak.sv("text")
.vertical_text: return ak.sv("vertical-text")
.alias: return ak.sv("alias")
.copy: return ak.sv("copy")
.move: return ak.sv("move")
.no_drop: return ak.sv("no-drop")
.not_allowed: return ak.sv("not-allowed")
.grab: return ak.sv("grab")
.grabbing: return ak.sv("grabbing")
.e_resize: return ak.sv("e-resize")
.n_resize: return ak.sv("n-resize")
.ne_resize: return ak.sv("ne-resize")
.nw_resize: return ak.sv("nw-resize")
.s_resize: return ak.sv("s-resize")
.se_resize: return ak.sv("se-resize")
.sw_resize: return ak.sv("sw-resize")
.w_resize: return ak.sv("w-resize")
.ew_resize: return ak.sv("ew-resize")
.ns_resize: return ak.sv("ns-resize")
.nesw_resize: return ak.sv("nesw-resize")
.nwse_resize: return ak.sv("nwse-resize")
.col_resize: return ak.sv("col-resize")
.row_resize: return ak.sv("row-resize")
.all_scroll: return ak.sv("all-scroll")
.zoom_in: return ak.sv("zoom-in")
.zoom_out: return ak.sv("zoom-out")
_: trap("VERIFY_NOT_REACHED")
# mark: Direction ===============================================================================
## Web::CSS::Direction (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Direction as u8:
ltr = 0
rtl = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_direction.
pub func keyword_to_direction(keyword: Keyword) -> Direction?:
match keyword:
.ltr: return Direction.ltr
.rtl: return Direction.rtl
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Direction).
pub func to_keyword_direction(direction_value: Direction) -> Keyword:
match direction_value:
.ltr: return Keyword.ltr
.rtl: return Keyword.rtl
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Direction).
pub func to_string_direction(value: Direction) -> ak.StringView:
match value:
.ltr: return ak.sv("ltr")
.rtl: return ak.sv("rtl")
_: trap("VERIFY_NOT_REACHED")
# mark: DiscretionaryLigValue ===================================================================
## Web::CSS::DiscretionaryLigValue (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum DiscretionaryLigValue as u8:
discretionary_ligatures = 0
no_discretionary_ligatures = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_discretionary_lig_value.
pub func keyword_to_discretionary_lig_value(keyword: Keyword) -> DiscretionaryLigValue?:
match keyword:
.discretionary_ligatures: return DiscretionaryLigValue.discretionary_ligatures
.no_discretionary_ligatures: return DiscretionaryLigValue.no_discretionary_ligatures
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(DiscretionaryLigValue).
pub func to_keyword_discretionary_lig_value(discretionary_lig_value_value: DiscretionaryLigValue) -> Keyword:
match discretionary_lig_value_value:
.discretionary_ligatures: return Keyword.discretionary_ligatures
.no_discretionary_ligatures: return Keyword.no_discretionary_ligatures
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(DiscretionaryLigValue).
pub func to_string_discretionary_lig_value(value: DiscretionaryLigValue) -> ak.StringView:
match value:
.discretionary_ligatures: return ak.sv("discretionary-ligatures")
.no_discretionary_ligatures: return ak.sv("no-discretionary-ligatures")
_: trap("VERIFY_NOT_REACHED")
# mark: DisplayBox ==============================================================================
## Web::CSS::DisplayBox (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum DisplayBox as u8:
contents = 0
none_ = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_display_box.
pub func keyword_to_display_box(keyword: Keyword) -> DisplayBox?:
match keyword:
.contents: return DisplayBox.contents
.none_: return DisplayBox.none_
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(DisplayBox).
pub func to_keyword_display_box(display_box_value: DisplayBox) -> Keyword:
match display_box_value:
.contents: return Keyword.contents
.none_: return Keyword.none_
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(DisplayBox).
pub func to_string_display_box(value: DisplayBox) -> ak.StringView:
match value:
.contents: return ak.sv("contents")
.none_: return ak.sv("none")
_: trap("VERIFY_NOT_REACHED")
# mark: DisplayInside ===========================================================================
## Web::CSS::DisplayInside (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum DisplayInside as u8:
flow = 0
flow_root = 1
table = 2
flex = 3
grid = 4
ruby = 5
math = 6
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_display_inside.
pub func keyword_to_display_inside(keyword: Keyword) -> DisplayInside?:
match keyword:
.flow: return DisplayInside.flow
.flow_root: return DisplayInside.flow_root
.table: return DisplayInside.table
.flex: return DisplayInside.flex
.grid: return DisplayInside.grid
.ruby: return DisplayInside.ruby
.math: return DisplayInside.math
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(DisplayInside).
pub func to_keyword_display_inside(display_inside_value: DisplayInside) -> Keyword:
match display_inside_value:
.flow: return Keyword.flow
.flow_root: return Keyword.flow_root
.table: return Keyword.table
.flex: return Keyword.flex
.grid: return Keyword.grid
.ruby: return Keyword.ruby
.math: return Keyword.math
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(DisplayInside).
pub func to_string_display_inside(value: DisplayInside) -> ak.StringView:
match value:
.flow: return ak.sv("flow")
.flow_root: return ak.sv("flow-root")
.table: return ak.sv("table")
.flex: return ak.sv("flex")
.grid: return ak.sv("grid")
.ruby: return ak.sv("ruby")
.math: return ak.sv("math")
_: trap("VERIFY_NOT_REACHED")
# mark: DisplayInternal =========================================================================
## Web::CSS::DisplayInternal (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum DisplayInternal as u8:
table_row_group = 0
table_header_group = 1
table_footer_group = 2
table_row = 3
table_cell = 4
table_column_group = 5
table_column = 6
table_caption = 7
ruby_base = 8
ruby_text = 9
ruby_base_container = 10
ruby_text_container = 11
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_display_internal.
pub func keyword_to_display_internal(keyword: Keyword) -> DisplayInternal?:
match keyword:
.table_row_group: return DisplayInternal.table_row_group
.table_header_group: return DisplayInternal.table_header_group
.table_footer_group: return DisplayInternal.table_footer_group
.table_row: return DisplayInternal.table_row
.table_cell: return DisplayInternal.table_cell
.table_column_group: return DisplayInternal.table_column_group
.table_column: return DisplayInternal.table_column
.table_caption: return DisplayInternal.table_caption
.ruby_base: return DisplayInternal.ruby_base
.ruby_text: return DisplayInternal.ruby_text
.ruby_base_container: return DisplayInternal.ruby_base_container
.ruby_text_container: return DisplayInternal.ruby_text_container
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(DisplayInternal).
pub func to_keyword_display_internal(display_internal_value: DisplayInternal) -> Keyword:
match display_internal_value:
.table_row_group: return Keyword.table_row_group
.table_header_group: return Keyword.table_header_group
.table_footer_group: return Keyword.table_footer_group
.table_row: return Keyword.table_row
.table_cell: return Keyword.table_cell
.table_column_group: return Keyword.table_column_group
.table_column: return Keyword.table_column
.table_caption: return Keyword.table_caption
.ruby_base: return Keyword.ruby_base
.ruby_text: return Keyword.ruby_text
.ruby_base_container: return Keyword.ruby_base_container
.ruby_text_container: return Keyword.ruby_text_container
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(DisplayInternal).
pub func to_string_display_internal(value: DisplayInternal) -> ak.StringView:
match value:
.table_row_group: return ak.sv("table-row-group")
.table_header_group: return ak.sv("table-header-group")
.table_footer_group: return ak.sv("table-footer-group")
.table_row: return ak.sv("table-row")
.table_cell: return ak.sv("table-cell")
.table_column_group: return ak.sv("table-column-group")
.table_column: return ak.sv("table-column")
.table_caption: return ak.sv("table-caption")
.ruby_base: return ak.sv("ruby-base")
.ruby_text: return ak.sv("ruby-text")
.ruby_base_container: return ak.sv("ruby-base-container")
.ruby_text_container: return ak.sv("ruby-text-container")
_: trap("VERIFY_NOT_REACHED")
# mark: DisplayLegacy ===========================================================================
## Web::CSS::DisplayLegacy (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum DisplayLegacy as u8:
inline_block = 0
inline_table = 1
inline_flex = 2
inline_grid = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_display_legacy.
pub func keyword_to_display_legacy(keyword: Keyword) -> DisplayLegacy?:
match keyword:
.inline_block: return DisplayLegacy.inline_block
.inline_table: return DisplayLegacy.inline_table
.inline_flex: return DisplayLegacy.inline_flex
.inline_grid: return DisplayLegacy.inline_grid
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(DisplayLegacy).
pub func to_keyword_display_legacy(display_legacy_value: DisplayLegacy) -> Keyword:
match display_legacy_value:
.inline_block: return Keyword.inline_block
.inline_table: return Keyword.inline_table
.inline_flex: return Keyword.inline_flex
.inline_grid: return Keyword.inline_grid
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(DisplayLegacy).
pub func to_string_display_legacy(value: DisplayLegacy) -> ak.StringView:
match value:
.inline_block: return ak.sv("inline-block")
.inline_table: return ak.sv("inline-table")
.inline_flex: return ak.sv("inline-flex")
.inline_grid: return ak.sv("inline-grid")
_: trap("VERIFY_NOT_REACHED")
# mark: DisplayOutside ==========================================================================
## Web::CSS::DisplayOutside (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum DisplayOutside as u8:
block = 0
inline = 1
run_in = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_display_outside.
pub func keyword_to_display_outside(keyword: Keyword) -> DisplayOutside?:
match keyword:
.block: return DisplayOutside.block
.inline: return DisplayOutside.inline
.run_in: return DisplayOutside.run_in
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(DisplayOutside).
pub func to_keyword_display_outside(display_outside_value: DisplayOutside) -> Keyword:
match display_outside_value:
.block: return Keyword.block
.inline: return Keyword.inline
.run_in: return Keyword.run_in
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(DisplayOutside).
pub func to_string_display_outside(value: DisplayOutside) -> ak.StringView:
match value:
.block: return ak.sv("block")
.inline: return ak.sv("inline")
.run_in: return ak.sv("run-in")
_: trap("VERIFY_NOT_REACHED")
# mark: EasingKeyword ===========================================================================
## Web::CSS::EasingKeyword (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum EasingKeyword as u8:
linear = 0
ease = 1
ease_in = 2
ease_out = 3
ease_in_out = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_easing_keyword.
pub func keyword_to_easing_keyword(keyword: Keyword) -> EasingKeyword?:
match keyword:
.linear: return EasingKeyword.linear
.ease: return EasingKeyword.ease
.ease_in: return EasingKeyword.ease_in
.ease_out: return EasingKeyword.ease_out
.ease_in_out: return EasingKeyword.ease_in_out
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(EasingKeyword).
pub func to_keyword_easing_keyword(easing_keyword_value: EasingKeyword) -> Keyword:
match easing_keyword_value:
.linear: return Keyword.linear
.ease: return Keyword.ease
.ease_in: return Keyword.ease_in
.ease_out: return Keyword.ease_out
.ease_in_out: return Keyword.ease_in_out
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(EasingKeyword).
pub func to_string_easing_keyword(value: EasingKeyword) -> ak.StringView:
match value:
.linear: return ak.sv("linear")
.ease: return ak.sv("ease")
.ease_in: return ak.sv("ease-in")
.ease_out: return ak.sv("ease-out")
.ease_in_out: return ak.sv("ease-in-out")
_: trap("VERIFY_NOT_REACHED")
# mark: EastAsianVariant ========================================================================
## Web::CSS::EastAsianVariant (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum EastAsianVariant as u8:
jis78 = 0
jis83 = 1
jis90 = 2
jis04 = 3
simplified = 4
traditional = 5
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_east_asian_variant.
pub func keyword_to_east_asian_variant(keyword: Keyword) -> EastAsianVariant?:
match keyword:
.jis78: return EastAsianVariant.jis78
.jis83: return EastAsianVariant.jis83
.jis90: return EastAsianVariant.jis90
.jis04: return EastAsianVariant.jis04
.simplified: return EastAsianVariant.simplified
.traditional: return EastAsianVariant.traditional
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(EastAsianVariant).
pub func to_keyword_east_asian_variant(east_asian_variant_value: EastAsianVariant) -> Keyword:
match east_asian_variant_value:
.jis78: return Keyword.jis78
.jis83: return Keyword.jis83
.jis90: return Keyword.jis90
.jis04: return Keyword.jis04
.simplified: return Keyword.simplified
.traditional: return Keyword.traditional
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(EastAsianVariant).
pub func to_string_east_asian_variant(value: EastAsianVariant) -> ak.StringView:
match value:
.jis78: return ak.sv("jis78")
.jis83: return ak.sv("jis83")
.jis90: return ak.sv("jis90")
.jis04: return ak.sv("jis04")
.simplified: return ak.sv("simplified")
.traditional: return ak.sv("traditional")
_: trap("VERIFY_NOT_REACHED")
# mark: EastAsianWidth ==========================================================================
## Web::CSS::EastAsianWidth (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum EastAsianWidth as u8:
full_width = 0
proportional_width = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_east_asian_width.
pub func keyword_to_east_asian_width(keyword: Keyword) -> EastAsianWidth?:
match keyword:
.full_width: return EastAsianWidth.full_width
.proportional_width: return EastAsianWidth.proportional_width
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(EastAsianWidth).
pub func to_keyword_east_asian_width(east_asian_width_value: EastAsianWidth) -> Keyword:
match east_asian_width_value:
.full_width: return Keyword.full_width
.proportional_width: return Keyword.proportional_width
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(EastAsianWidth).
pub func to_string_east_asian_width(value: EastAsianWidth) -> ak.StringView:
match value:
.full_width: return ak.sv("full-width")
.proportional_width: return ak.sv("proportional-width")
_: trap("VERIFY_NOT_REACHED")
# mark: EmptyCells ==============================================================================
## Web::CSS::EmptyCells (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum EmptyCells as u8:
show = 0
hide = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_empty_cells.
pub func keyword_to_empty_cells(keyword: Keyword) -> EmptyCells?:
match keyword:
.show: return EmptyCells.show
.hide: return EmptyCells.hide
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(EmptyCells).
pub func to_keyword_empty_cells(empty_cells_value: EmptyCells) -> Keyword:
match empty_cells_value:
.show: return Keyword.show
.hide: return Keyword.hide
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(EmptyCells).
pub func to_string_empty_cells(value: EmptyCells) -> ak.StringView:
match value:
.show: return ak.sv("show")
.hide: return ak.sv("hide")
_: trap("VERIFY_NOT_REACHED")
# mark: FillRule ================================================================================
## Web::CSS::FillRule (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FillRule as u8:
nonzero = 0
evenodd = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_fill_rule.
pub func keyword_to_fill_rule(keyword: Keyword) -> FillRule?:
match keyword:
.nonzero: return FillRule.nonzero
.evenodd: return FillRule.evenodd
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FillRule).
pub func to_keyword_fill_rule(fill_rule_value: FillRule) -> Keyword:
match fill_rule_value:
.nonzero: return Keyword.nonzero
.evenodd: return Keyword.evenodd
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FillRule).
pub func to_string_fill_rule(value: FillRule) -> ak.StringView:
match value:
.nonzero: return ak.sv("nonzero")
.evenodd: return ak.sv("evenodd")
_: trap("VERIFY_NOT_REACHED")
# mark: FlexDirection ===========================================================================
## Web::CSS::FlexDirection (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FlexDirection as u8:
row = 0
row_reverse = 1
column = 2
column_reverse = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_flex_direction.
pub func keyword_to_flex_direction(keyword: Keyword) -> FlexDirection?:
match keyword:
.row: return FlexDirection.row
.row_reverse: return FlexDirection.row_reverse
.column: return FlexDirection.column
.column_reverse: return FlexDirection.column_reverse
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FlexDirection).
pub func to_keyword_flex_direction(flex_direction_value: FlexDirection) -> Keyword:
match flex_direction_value:
.row: return Keyword.row
.row_reverse: return Keyword.row_reverse
.column: return Keyword.column
.column_reverse: return Keyword.column_reverse
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FlexDirection).
pub func to_string_flex_direction(value: FlexDirection) -> ak.StringView:
match value:
.row: return ak.sv("row")
.row_reverse: return ak.sv("row-reverse")
.column: return ak.sv("column")
.column_reverse: return ak.sv("column-reverse")
_: trap("VERIFY_NOT_REACHED")
# mark: FlexWrap ================================================================================
## Web::CSS::FlexWrap (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FlexWrap as u8:
nowrap = 0
wrap = 1
wrap_reverse = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_flex_wrap.
pub func keyword_to_flex_wrap(keyword: Keyword) -> FlexWrap?:
match keyword:
.nowrap: return FlexWrap.nowrap
.wrap: return FlexWrap.wrap
.wrap_reverse: return FlexWrap.wrap_reverse
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FlexWrap).
pub func to_keyword_flex_wrap(flex_wrap_value: FlexWrap) -> Keyword:
match flex_wrap_value:
.nowrap: return Keyword.nowrap
.wrap: return Keyword.wrap
.wrap_reverse: return Keyword.wrap_reverse
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FlexWrap).
pub func to_string_flex_wrap(value: FlexWrap) -> ak.StringView:
match value:
.nowrap: return ak.sv("nowrap")
.wrap: return ak.sv("wrap")
.wrap_reverse: return ak.sv("wrap-reverse")
_: trap("VERIFY_NOT_REACHED")
# mark: Float ===================================================================================
## Web::CSS::Float (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Float as u8:
none_ = 0
left = 1
right = 2
inline_start = 3
inline_end = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_float.
pub func keyword_to_float(keyword: Keyword) -> Float?:
match keyword:
.none_: return Float.none_
.left: return Float.left
.right: return Float.right
.inline_start: return Float.inline_start
.inline_end: return Float.inline_end
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Float).
pub func to_keyword_float(float_value: Float) -> Keyword:
match float_value:
.none_: return Keyword.none_
.left: return Keyword.left
.right: return Keyword.right
.inline_start: return Keyword.inline_start
.inline_end: return Keyword.inline_end
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Float).
pub func to_string_float(value: Float) -> ak.StringView:
match value:
.none_: return ak.sv("none")
.left: return ak.sv("left")
.right: return ak.sv("right")
.inline_start: return ak.sv("inline-start")
.inline_end: return ak.sv("inline-end")
_: trap("VERIFY_NOT_REACHED")
# mark: FontDisplay =============================================================================
## Web::CSS::FontDisplay (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FontDisplay as u8:
auto = 0
block = 1
swap = 2
fallback = 3
optional = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_font_display.
pub func keyword_to_font_display(keyword: Keyword) -> FontDisplay?:
match keyword:
.auto: return FontDisplay.auto
.block: return FontDisplay.block
.swap: return FontDisplay.swap
.fallback: return FontDisplay.fallback
.optional: return FontDisplay.optional
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FontDisplay).
pub func to_keyword_font_display(font_display_value: FontDisplay) -> Keyword:
match font_display_value:
.auto: return Keyword.auto
.block: return Keyword.block
.swap: return Keyword.swap
.fallback: return Keyword.fallback
.optional: return Keyword.optional
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FontDisplay).
pub func to_string_font_display(value: FontDisplay) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.block: return ak.sv("block")
.swap: return ak.sv("swap")
.fallback: return ak.sv("fallback")
.optional: return ak.sv("optional")
_: trap("VERIFY_NOT_REACHED")
# mark: FontKerning =============================================================================
## Web::CSS::FontKerning (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FontKerning as u8:
auto = 0
normal = 1
none_ = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_font_kerning.
pub func keyword_to_font_kerning(keyword: Keyword) -> FontKerning?:
match keyword:
.auto: return FontKerning.auto
.normal: return FontKerning.normal
.none_: return FontKerning.none_
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FontKerning).
pub func to_keyword_font_kerning(font_kerning_value: FontKerning) -> Keyword:
match font_kerning_value:
.auto: return Keyword.auto
.normal: return Keyword.normal
.none_: return Keyword.none_
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FontKerning).
pub func to_string_font_kerning(value: FontKerning) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.normal: return ak.sv("normal")
.none_: return ak.sv("none")
_: trap("VERIFY_NOT_REACHED")
# mark: FontOpticalSizing =======================================================================
## Web::CSS::FontOpticalSizing (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FontOpticalSizing as u8:
auto = 0
none_ = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_font_optical_sizing.
pub func keyword_to_font_optical_sizing(keyword: Keyword) -> FontOpticalSizing?:
match keyword:
.auto: return FontOpticalSizing.auto
.none_: return FontOpticalSizing.none_
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FontOpticalSizing).
pub func to_keyword_font_optical_sizing(font_optical_sizing_value: FontOpticalSizing) -> Keyword:
match font_optical_sizing_value:
.auto: return Keyword.auto
.none_: return Keyword.none_
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FontOpticalSizing).
pub func to_string_font_optical_sizing(value: FontOpticalSizing) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.none_: return ak.sv("none")
_: trap("VERIFY_NOT_REACHED")
# mark: FontStyleKeyword ========================================================================
## Web::CSS::FontStyleKeyword (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FontStyleKeyword as u8:
normal = 0
italic = 1
left = 2
right = 3
oblique = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_font_style_keyword.
pub func keyword_to_font_style_keyword(keyword: Keyword) -> FontStyleKeyword?:
match keyword:
.normal: return FontStyleKeyword.normal
.italic: return FontStyleKeyword.italic
.left: return FontStyleKeyword.left
.right: return FontStyleKeyword.right
.oblique: return FontStyleKeyword.oblique
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FontStyleKeyword).
pub func to_keyword_font_style_keyword(font_style_keyword_value: FontStyleKeyword) -> Keyword:
match font_style_keyword_value:
.normal: return Keyword.normal
.italic: return Keyword.italic
.left: return Keyword.left
.right: return Keyword.right
.oblique: return Keyword.oblique
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FontStyleKeyword).
pub func to_string_font_style_keyword(value: FontStyleKeyword) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.italic: return ak.sv("italic")
.left: return ak.sv("left")
.right: return ak.sv("right")
.oblique: return ak.sv("oblique")
_: trap("VERIFY_NOT_REACHED")
# mark: FontTech ================================================================================
## Web::CSS::FontTech (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FontTech as u8:
avar2 = 0
color_cbdt = 1
color_colrv0 = 2
color_colrv1 = 3
color_sbix = 4
color_svg = 5
features_aat = 6
features_graphite = 7
features_opentype = 8
incremental = 9
palettes = 10
variations = 11
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_font_tech.
pub func keyword_to_font_tech(keyword: Keyword) -> FontTech?:
match keyword:
.avar2: return FontTech.avar2
.color_cbdt: return FontTech.color_cbdt
.color_colrv0: return FontTech.color_colrv0
.color_colrv1: return FontTech.color_colrv1
.color_sbix: return FontTech.color_sbix
.color_svg: return FontTech.color_svg
.features_aat: return FontTech.features_aat
.features_graphite: return FontTech.features_graphite
.features_opentype: return FontTech.features_opentype
.incremental: return FontTech.incremental
.palettes: return FontTech.palettes
.variations: return FontTech.variations
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FontTech).
pub func to_keyword_font_tech(font_tech_value: FontTech) -> Keyword:
match font_tech_value:
.avar2: return Keyword.avar2
.color_cbdt: return Keyword.color_cbdt
.color_colrv0: return Keyword.color_colrv0
.color_colrv1: return Keyword.color_colrv1
.color_sbix: return Keyword.color_sbix
.color_svg: return Keyword.color_svg
.features_aat: return Keyword.features_aat
.features_graphite: return Keyword.features_graphite
.features_opentype: return Keyword.features_opentype
.incremental: return Keyword.incremental
.palettes: return Keyword.palettes
.variations: return Keyword.variations
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FontTech).
pub func to_string_font_tech(value: FontTech) -> ak.StringView:
match value:
.avar2: return ak.sv("avar2")
.color_cbdt: return ak.sv("color-cbdt")
.color_colrv0: return ak.sv("color-colrv0")
.color_colrv1: return ak.sv("color-colrv1")
.color_sbix: return ak.sv("color-sbix")
.color_svg: return ak.sv("color-svg")
.features_aat: return ak.sv("features-aat")
.features_graphite: return ak.sv("features-graphite")
.features_opentype: return ak.sv("features-opentype")
.incremental: return ak.sv("incremental")
.palettes: return ak.sv("palettes")
.variations: return ak.sv("variations")
_: trap("VERIFY_NOT_REACHED")
# mark: FontVariantCaps =========================================================================
## Web::CSS::FontVariantCaps (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FontVariantCaps as u8:
normal = 0
small_caps = 1
all_small_caps = 2
petite_caps = 3
all_petite_caps = 4
unicase = 5
titling_caps = 6
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_font_variant_caps.
pub func keyword_to_font_variant_caps(keyword: Keyword) -> FontVariantCaps?:
match keyword:
.normal: return FontVariantCaps.normal
.small_caps: return FontVariantCaps.small_caps
.all_small_caps: return FontVariantCaps.all_small_caps
.petite_caps: return FontVariantCaps.petite_caps
.all_petite_caps: return FontVariantCaps.all_petite_caps
.unicase: return FontVariantCaps.unicase
.titling_caps: return FontVariantCaps.titling_caps
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FontVariantCaps).
pub func to_keyword_font_variant_caps(font_variant_caps_value: FontVariantCaps) -> Keyword:
match font_variant_caps_value:
.normal: return Keyword.normal
.small_caps: return Keyword.small_caps
.all_small_caps: return Keyword.all_small_caps
.petite_caps: return Keyword.petite_caps
.all_petite_caps: return Keyword.all_petite_caps
.unicase: return Keyword.unicase
.titling_caps: return Keyword.titling_caps
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FontVariantCaps).
pub func to_string_font_variant_caps(value: FontVariantCaps) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.small_caps: return ak.sv("small-caps")
.all_small_caps: return ak.sv("all-small-caps")
.petite_caps: return ak.sv("petite-caps")
.all_petite_caps: return ak.sv("all-petite-caps")
.unicase: return ak.sv("unicase")
.titling_caps: return ak.sv("titling-caps")
_: trap("VERIFY_NOT_REACHED")
# mark: FontVariantEmoji ========================================================================
## Web::CSS::FontVariantEmoji (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FontVariantEmoji as u8:
normal = 0
text = 1
emoji = 2
unicode = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_font_variant_emoji.
pub func keyword_to_font_variant_emoji(keyword: Keyword) -> FontVariantEmoji?:
match keyword:
.normal: return FontVariantEmoji.normal
.text: return FontVariantEmoji.text
.emoji: return FontVariantEmoji.emoji
.unicode: return FontVariantEmoji.unicode
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FontVariantEmoji).
pub func to_keyword_font_variant_emoji(font_variant_emoji_value: FontVariantEmoji) -> Keyword:
match font_variant_emoji_value:
.normal: return Keyword.normal
.text: return Keyword.text
.emoji: return Keyword.emoji
.unicode: return Keyword.unicode
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FontVariantEmoji).
pub func to_string_font_variant_emoji(value: FontVariantEmoji) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.text: return ak.sv("text")
.emoji: return ak.sv("emoji")
.unicode: return ak.sv("unicode")
_: trap("VERIFY_NOT_REACHED")
# mark: FontVariantPosition =====================================================================
## Web::CSS::FontVariantPosition (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FontVariantPosition as u8:
normal = 0
sub = 1
super = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_font_variant_position.
pub func keyword_to_font_variant_position(keyword: Keyword) -> FontVariantPosition?:
match keyword:
.normal: return FontVariantPosition.normal
.sub: return FontVariantPosition.sub
.super: return FontVariantPosition.super
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FontVariantPosition).
pub func to_keyword_font_variant_position(font_variant_position_value: FontVariantPosition) -> Keyword:
match font_variant_position_value:
.normal: return Keyword.normal
.sub: return Keyword.sub
.super: return Keyword.super
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FontVariantPosition).
pub func to_string_font_variant_position(value: FontVariantPosition) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.sub: return ak.sv("sub")
.super: return ak.sv("super")
_: trap("VERIFY_NOT_REACHED")
# mark: FontWidth ===============================================================================
## Web::CSS::FontWidth (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum FontWidth as u8:
ultra_condensed = 0
extra_condensed = 1
condensed = 2
semi_condensed = 3
normal = 4
semi_expanded = 5
expanded = 6
extra_expanded = 7
ultra_expanded = 8
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_font_width.
pub func keyword_to_font_width(keyword: Keyword) -> FontWidth?:
match keyword:
.ultra_condensed: return FontWidth.ultra_condensed
.extra_condensed: return FontWidth.extra_condensed
.condensed: return FontWidth.condensed
.semi_condensed: return FontWidth.semi_condensed
.normal: return FontWidth.normal
.semi_expanded: return FontWidth.semi_expanded
.expanded: return FontWidth.expanded
.extra_expanded: return FontWidth.extra_expanded
.ultra_expanded: return FontWidth.ultra_expanded
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(FontWidth).
pub func to_keyword_font_width(font_width_value: FontWidth) -> Keyword:
match font_width_value:
.ultra_condensed: return Keyword.ultra_condensed
.extra_condensed: return Keyword.extra_condensed
.condensed: return Keyword.condensed
.semi_condensed: return Keyword.semi_condensed
.normal: return Keyword.normal
.semi_expanded: return Keyword.semi_expanded
.expanded: return Keyword.expanded
.extra_expanded: return Keyword.extra_expanded
.ultra_expanded: return Keyword.ultra_expanded
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(FontWidth).
pub func to_string_font_width(value: FontWidth) -> ak.StringView:
match value:
.ultra_condensed: return ak.sv("ultra-condensed")
.extra_condensed: return ak.sv("extra-condensed")
.condensed: return ak.sv("condensed")
.semi_condensed: return ak.sv("semi-condensed")
.normal: return ak.sv("normal")
.semi_expanded: return ak.sv("semi-expanded")
.expanded: return ak.sv("expanded")
.extra_expanded: return ak.sv("extra-expanded")
.ultra_expanded: return ak.sv("ultra-expanded")
_: trap("VERIFY_NOT_REACHED")
# mark: GenericFontFamily =======================================================================
## Web::CSS::GenericFontFamily (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum GenericFontFamily as u8:
serif = 0
sans_serif = 1
cursive = 2
fantasy = 3
monospace = 4
math = 5
ui_serif = 6
ui_sans_serif = 7
ui_monospace = 8
ui_rounded = 9
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_generic_font_family.
pub func keyword_to_generic_font_family(keyword: Keyword) -> GenericFontFamily?:
match keyword:
.serif: return GenericFontFamily.serif
.sans_serif: return GenericFontFamily.sans_serif
.cursive: return GenericFontFamily.cursive
.fantasy: return GenericFontFamily.fantasy
.monospace: return GenericFontFamily.monospace
.math: return GenericFontFamily.math
.ui_serif: return GenericFontFamily.ui_serif
.ui_sans_serif: return GenericFontFamily.ui_sans_serif
.ui_monospace: return GenericFontFamily.ui_monospace
.ui_rounded: return GenericFontFamily.ui_rounded
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(GenericFontFamily).
pub func to_keyword_generic_font_family(generic_font_family_value: GenericFontFamily) -> Keyword:
match generic_font_family_value:
.serif: return Keyword.serif
.sans_serif: return Keyword.sans_serif
.cursive: return Keyword.cursive
.fantasy: return Keyword.fantasy
.monospace: return Keyword.monospace
.math: return Keyword.math
.ui_serif: return Keyword.ui_serif
.ui_sans_serif: return Keyword.ui_sans_serif
.ui_monospace: return Keyword.ui_monospace
.ui_rounded: return Keyword.ui_rounded
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(GenericFontFamily).
pub func to_string_generic_font_family(value: GenericFontFamily) -> ak.StringView:
match value:
.serif: return ak.sv("serif")
.sans_serif: return ak.sv("sans-serif")
.cursive: return ak.sv("cursive")
.fantasy: return ak.sv("fantasy")
.monospace: return ak.sv("monospace")
.math: return ak.sv("math")
.ui_serif: return ak.sv("ui-serif")
.ui_sans_serif: return ak.sv("ui-sans-serif")
.ui_monospace: return ak.sv("ui-monospace")
.ui_rounded: return ak.sv("ui-rounded")
_: trap("VERIFY_NOT_REACHED")
# mark: HistoricalLigValue ======================================================================
## Web::CSS::HistoricalLigValue (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum HistoricalLigValue as u8:
historical_ligatures = 0
no_historical_ligatures = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_historical_lig_value.
pub func keyword_to_historical_lig_value(keyword: Keyword) -> HistoricalLigValue?:
match keyword:
.historical_ligatures: return HistoricalLigValue.historical_ligatures
.no_historical_ligatures: return HistoricalLigValue.no_historical_ligatures
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(HistoricalLigValue).
pub func to_keyword_historical_lig_value(historical_lig_value_value: HistoricalLigValue) -> Keyword:
match historical_lig_value_value:
.historical_ligatures: return Keyword.historical_ligatures
.no_historical_ligatures: return Keyword.no_historical_ligatures
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(HistoricalLigValue).
pub func to_string_historical_lig_value(value: HistoricalLigValue) -> ak.StringView:
match value:
.historical_ligatures: return ak.sv("historical-ligatures")
.no_historical_ligatures: return ak.sv("no-historical-ligatures")
_: trap("VERIFY_NOT_REACHED")
# mark: HueInterpolationMethod ==================================================================
## Web::CSS::HueInterpolationMethod (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum HueInterpolationMethod as u8:
shorter = 0
longer = 1
increasing = 2
decreasing = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_hue_interpolation_method.
pub func keyword_to_hue_interpolation_method(keyword: Keyword) -> HueInterpolationMethod?:
match keyword:
.shorter: return HueInterpolationMethod.shorter
.longer: return HueInterpolationMethod.longer
.increasing: return HueInterpolationMethod.increasing
.decreasing: return HueInterpolationMethod.decreasing
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(HueInterpolationMethod).
pub func to_keyword_hue_interpolation_method(hue_interpolation_method_value: HueInterpolationMethod) -> Keyword:
match hue_interpolation_method_value:
.shorter: return Keyword.shorter
.longer: return Keyword.longer
.increasing: return Keyword.increasing
.decreasing: return Keyword.decreasing
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(HueInterpolationMethod).
pub func to_string_hue_interpolation_method(value: HueInterpolationMethod) -> ak.StringView:
match value:
.shorter: return ak.sv("shorter")
.longer: return ak.sv("longer")
.increasing: return ak.sv("increasing")
.decreasing: return ak.sv("decreasing")
_: trap("VERIFY_NOT_REACHED")
# mark: ImageRendering ==========================================================================
## Web::CSS::ImageRendering (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ImageRendering as u8:
auto = 0
crisp_edges = 1
high_quality = 2
pixelated = 3
smooth = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_image_rendering.
pub func keyword_to_image_rendering(keyword: Keyword) -> ImageRendering?:
match keyword:
.auto: return ImageRendering.auto
.crisp_edges: return ImageRendering.crisp_edges
.high_quality: return ImageRendering.high_quality
.pixelated: return ImageRendering.pixelated
.smooth: return ImageRendering.smooth
.optimizespeed: return ImageRendering.pixelated
.optimizequality: return ImageRendering.smooth
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ImageRendering).
pub func to_keyword_image_rendering(image_rendering_value: ImageRendering) -> Keyword:
match image_rendering_value:
.auto: return Keyword.auto
.crisp_edges: return Keyword.crisp_edges
.high_quality: return Keyword.high_quality
.pixelated: return Keyword.pixelated
.smooth: return Keyword.smooth
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ImageRendering).
pub func to_string_image_rendering(value: ImageRendering) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.crisp_edges: return ak.sv("crisp-edges")
.high_quality: return ak.sv("high-quality")
.pixelated: return ak.sv("pixelated")
.smooth: return ak.sv("smooth")
_: trap("VERIFY_NOT_REACHED")
# mark: Isolation ===============================================================================
## Web::CSS::Isolation (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Isolation as u8:
auto = 0
isolate = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_isolation.
pub func keyword_to_isolation(keyword: Keyword) -> Isolation?:
match keyword:
.auto: return Isolation.auto
.isolate: return Isolation.isolate
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Isolation).
pub func to_keyword_isolation(isolation_value: Isolation) -> Keyword:
match isolation_value:
.auto: return Keyword.auto
.isolate: return Keyword.isolate
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Isolation).
pub func to_string_isolation(value: Isolation) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.isolate: return ak.sv("isolate")
_: trap("VERIFY_NOT_REACHED")
# mark: JustifyContent ==========================================================================
## Web::CSS::JustifyContent (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum JustifyContent as u8:
normal = 0
start = 1
end = 2
flex_start = 3
flex_end = 4
center = 5
space_between = 6
space_around = 7
space_evenly = 8
stretch = 9
left = 10
right = 11
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_justify_content.
pub func keyword_to_justify_content(keyword: Keyword) -> JustifyContent?:
match keyword:
.normal: return JustifyContent.normal
.start: return JustifyContent.start
.end: return JustifyContent.end
.flex_start: return JustifyContent.flex_start
.flex_end: return JustifyContent.flex_end
.center: return JustifyContent.center
.space_between: return JustifyContent.space_between
.space_around: return JustifyContent.space_around
.space_evenly: return JustifyContent.space_evenly
.stretch: return JustifyContent.stretch
.left: return JustifyContent.left
.right: return JustifyContent.right
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(JustifyContent).
pub func to_keyword_justify_content(justify_content_value: JustifyContent) -> Keyword:
match justify_content_value:
.normal: return Keyword.normal
.start: return Keyword.start
.end: return Keyword.end
.flex_start: return Keyword.flex_start
.flex_end: return Keyword.flex_end
.center: return Keyword.center
.space_between: return Keyword.space_between
.space_around: return Keyword.space_around
.space_evenly: return Keyword.space_evenly
.stretch: return Keyword.stretch
.left: return Keyword.left
.right: return Keyword.right
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(JustifyContent).
pub func to_string_justify_content(value: JustifyContent) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.start: return ak.sv("start")
.end: return ak.sv("end")
.flex_start: return ak.sv("flex-start")
.flex_end: return ak.sv("flex-end")
.center: return ak.sv("center")
.space_between: return ak.sv("space-between")
.space_around: return ak.sv("space-around")
.space_evenly: return ak.sv("space-evenly")
.stretch: return ak.sv("stretch")
.left: return ak.sv("left")
.right: return ak.sv("right")
_: trap("VERIFY_NOT_REACHED")
# mark: JustifyItems ============================================================================
## Web::CSS::JustifyItems (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum JustifyItems as u8:
baseline = 0
center = 1
end = 2
flex_end = 3
flex_start = 4
legacy = 5
normal = 6
safe = 7
self_end = 8
self_start = 9
start = 10
stretch = 11
unsafe = 12
left = 13
right = 14
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_justify_items.
pub func keyword_to_justify_items(keyword: Keyword) -> JustifyItems?:
match keyword:
.baseline: return JustifyItems.baseline
.center: return JustifyItems.center
.end: return JustifyItems.end
.flex_end: return JustifyItems.flex_end
.flex_start: return JustifyItems.flex_start
.legacy: return JustifyItems.legacy
.normal: return JustifyItems.normal
.safe: return JustifyItems.safe
.self_end: return JustifyItems.self_end
.self_start: return JustifyItems.self_start
.start: return JustifyItems.start
.stretch: return JustifyItems.stretch
.unsafe: return JustifyItems.unsafe
.left: return JustifyItems.left
.right: return JustifyItems.right
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(JustifyItems).
pub func to_keyword_justify_items(justify_items_value: JustifyItems) -> Keyword:
match justify_items_value:
.baseline: return Keyword.baseline
.center: return Keyword.center
.end: return Keyword.end
.flex_end: return Keyword.flex_end
.flex_start: return Keyword.flex_start
.legacy: return Keyword.legacy
.normal: return Keyword.normal
.safe: return Keyword.safe
.self_end: return Keyword.self_end
.self_start: return Keyword.self_start
.start: return Keyword.start
.stretch: return Keyword.stretch
.unsafe: return Keyword.unsafe
.left: return Keyword.left
.right: return Keyword.right
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(JustifyItems).
pub func to_string_justify_items(value: JustifyItems) -> ak.StringView:
match value:
.baseline: return ak.sv("baseline")
.center: return ak.sv("center")
.end: return ak.sv("end")
.flex_end: return ak.sv("flex-end")
.flex_start: return ak.sv("flex-start")
.legacy: return ak.sv("legacy")
.normal: return ak.sv("normal")
.safe: return ak.sv("safe")
.self_end: return ak.sv("self-end")
.self_start: return ak.sv("self-start")
.start: return ak.sv("start")
.stretch: return ak.sv("stretch")
.unsafe: return ak.sv("unsafe")
.left: return ak.sv("left")
.right: return ak.sv("right")
_: trap("VERIFY_NOT_REACHED")
# mark: JustifySelf =============================================================================
## Web::CSS::JustifySelf (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum JustifySelf as u8:
auto = 0
baseline = 1
center = 2
end = 3
flex_end = 4
flex_start = 5
normal = 6
safe = 7
self_end = 8
self_start = 9
start = 10
stretch = 11
unsafe = 12
left = 13
right = 14
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_justify_self.
pub func keyword_to_justify_self(keyword: Keyword) -> JustifySelf?:
match keyword:
.auto: return JustifySelf.auto
.baseline: return JustifySelf.baseline
.center: return JustifySelf.center
.end: return JustifySelf.end
.flex_end: return JustifySelf.flex_end
.flex_start: return JustifySelf.flex_start
.normal: return JustifySelf.normal
.safe: return JustifySelf.safe
.self_end: return JustifySelf.self_end
.self_start: return JustifySelf.self_start
.start: return JustifySelf.start
.stretch: return JustifySelf.stretch
.unsafe: return JustifySelf.unsafe
.left: return JustifySelf.left
.right: return JustifySelf.right
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(JustifySelf).
pub func to_keyword_justify_self(justify_self_value: JustifySelf) -> Keyword:
match justify_self_value:
.auto: return Keyword.auto
.baseline: return Keyword.baseline
.center: return Keyword.center
.end: return Keyword.end
.flex_end: return Keyword.flex_end
.flex_start: return Keyword.flex_start
.normal: return Keyword.normal
.safe: return Keyword.safe
.self_end: return Keyword.self_end
.self_start: return Keyword.self_start
.start: return Keyword.start
.stretch: return Keyword.stretch
.unsafe: return Keyword.unsafe
.left: return Keyword.left
.right: return Keyword.right
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(JustifySelf).
pub func to_string_justify_self(value: JustifySelf) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.baseline: return ak.sv("baseline")
.center: return ak.sv("center")
.end: return ak.sv("end")
.flex_end: return ak.sv("flex-end")
.flex_start: return ak.sv("flex-start")
.normal: return ak.sv("normal")
.safe: return ak.sv("safe")
.self_end: return ak.sv("self-end")
.self_start: return ak.sv("self-start")
.start: return ak.sv("start")
.stretch: return ak.sv("stretch")
.unsafe: return ak.sv("unsafe")
.left: return ak.sv("left")
.right: return ak.sv("right")
_: trap("VERIFY_NOT_REACHED")
# mark: LineStyle ===============================================================================
## Web::CSS::LineStyle (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum LineStyle as u8:
none_ = 0
hidden = 1
dotted = 2
dashed = 3
solid = 4
double = 5
groove = 6
ridge = 7
inset = 8
outset = 9
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_line_style.
pub func keyword_to_line_style(keyword: Keyword) -> LineStyle?:
match keyword:
.none_: return LineStyle.none_
.hidden: return LineStyle.hidden
.dotted: return LineStyle.dotted
.dashed: return LineStyle.dashed
.solid: return LineStyle.solid
.double: return LineStyle.double
.groove: return LineStyle.groove
.ridge: return LineStyle.ridge
.inset: return LineStyle.inset
.outset: return LineStyle.outset
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(LineStyle).
pub func to_keyword_line_style(line_style_value: LineStyle) -> Keyword:
match line_style_value:
.none_: return Keyword.none_
.hidden: return Keyword.hidden
.dotted: return Keyword.dotted
.dashed: return Keyword.dashed
.solid: return Keyword.solid
.double: return Keyword.double
.groove: return Keyword.groove
.ridge: return Keyword.ridge
.inset: return Keyword.inset
.outset: return Keyword.outset
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(LineStyle).
pub func to_string_line_style(value: LineStyle) -> ak.StringView:
match value:
.none_: return ak.sv("none")
.hidden: return ak.sv("hidden")
.dotted: return ak.sv("dotted")
.dashed: return ak.sv("dashed")
.solid: return ak.sv("solid")
.double: return ak.sv("double")
.groove: return ak.sv("groove")
.ridge: return ak.sv("ridge")
.inset: return ak.sv("inset")
.outset: return ak.sv("outset")
_: trap("VERIFY_NOT_REACHED")
# mark: LineWidth ===============================================================================
## Web::CSS::LineWidth (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum LineWidth as u8:
thin = 0
medium = 1
thick = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_line_width.
pub func keyword_to_line_width(keyword: Keyword) -> LineWidth?:
match keyword:
.thin: return LineWidth.thin
.medium: return LineWidth.medium
.thick: return LineWidth.thick
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(LineWidth).
pub func to_keyword_line_width(line_width_value: LineWidth) -> Keyword:
match line_width_value:
.thin: return Keyword.thin
.medium: return Keyword.medium
.thick: return Keyword.thick
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(LineWidth).
pub func to_string_line_width(value: LineWidth) -> ak.StringView:
match value:
.thin: return ak.sv("thin")
.medium: return ak.sv("medium")
.thick: return ak.sv("thick")
_: trap("VERIFY_NOT_REACHED")
# mark: ListStylePosition =======================================================================
## Web::CSS::ListStylePosition (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ListStylePosition as u8:
inside = 0
outside = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_list_style_position.
pub func keyword_to_list_style_position(keyword: Keyword) -> ListStylePosition?:
match keyword:
.inside: return ListStylePosition.inside
.outside: return ListStylePosition.outside
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ListStylePosition).
pub func to_keyword_list_style_position(list_style_position_value: ListStylePosition) -> Keyword:
match list_style_position_value:
.inside: return Keyword.inside
.outside: return Keyword.outside
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ListStylePosition).
pub func to_string_list_style_position(value: ListStylePosition) -> ak.StringView:
match value:
.inside: return ak.sv("inside")
.outside: return ak.sv("outside")
_: trap("VERIFY_NOT_REACHED")
# mark: MaskType ================================================================================
## Web::CSS::MaskType (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum MaskType as u8:
luminance = 0
alpha = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_mask_type.
pub func keyword_to_mask_type(keyword: Keyword) -> MaskType?:
match keyword:
.luminance: return MaskType.luminance
.alpha: return MaskType.alpha
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(MaskType).
pub func to_keyword_mask_type(mask_type_value: MaskType) -> Keyword:
match mask_type_value:
.luminance: return Keyword.luminance
.alpha: return Keyword.alpha
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(MaskType).
pub func to_string_mask_type(value: MaskType) -> ak.StringView:
match value:
.luminance: return ak.sv("luminance")
.alpha: return ak.sv("alpha")
_: trap("VERIFY_NOT_REACHED")
# mark: MaskingMode =============================================================================
## Web::CSS::MaskingMode (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum MaskingMode as u8:
alpha = 0
luminance = 1
match_source = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_masking_mode.
pub func keyword_to_masking_mode(keyword: Keyword) -> MaskingMode?:
match keyword:
.alpha: return MaskingMode.alpha
.luminance: return MaskingMode.luminance
.match_source: return MaskingMode.match_source
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(MaskingMode).
pub func to_keyword_masking_mode(masking_mode_value: MaskingMode) -> Keyword:
match masking_mode_value:
.alpha: return Keyword.alpha
.luminance: return Keyword.luminance
.match_source: return Keyword.match_source
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(MaskingMode).
pub func to_string_masking_mode(value: MaskingMode) -> ak.StringView:
match value:
.alpha: return ak.sv("alpha")
.luminance: return ak.sv("luminance")
.match_source: return ak.sv("match-source")
_: trap("VERIFY_NOT_REACHED")
# mark: MathShift ===============================================================================
## Web::CSS::MathShift (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum MathShift as u8:
normal = 0
compact = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_math_shift.
pub func keyword_to_math_shift(keyword: Keyword) -> MathShift?:
match keyword:
.normal: return MathShift.normal
.compact: return MathShift.compact
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(MathShift).
pub func to_keyword_math_shift(math_shift_value: MathShift) -> Keyword:
match math_shift_value:
.normal: return Keyword.normal
.compact: return Keyword.compact
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(MathShift).
pub func to_string_math_shift(value: MathShift) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.compact: return ak.sv("compact")
_: trap("VERIFY_NOT_REACHED")
# mark: MathStyle ===============================================================================
## Web::CSS::MathStyle (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum MathStyle as u8:
normal = 0
compact = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_math_style.
pub func keyword_to_math_style(keyword: Keyword) -> MathStyle?:
match keyword:
.normal: return MathStyle.normal
.compact: return MathStyle.compact
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(MathStyle).
pub func to_keyword_math_style(math_style_value: MathStyle) -> Keyword:
match math_style_value:
.normal: return Keyword.normal
.compact: return Keyword.compact
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(MathStyle).
pub func to_string_math_style(value: MathStyle) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.compact: return ak.sv("compact")
_: trap("VERIFY_NOT_REACHED")
# mark: MixBlendMode ============================================================================
## Web::CSS::MixBlendMode (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum MixBlendMode as u8:
normal = 0
multiply = 1
screen = 2
overlay = 3
darken = 4
lighten = 5
color_dodge = 6
color_burn = 7
hard_light = 8
soft_light = 9
difference = 10
exclusion = 11
hue = 12
saturation = 13
color = 14
luminosity = 15
plus_darker = 16
plus_lighter = 17
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_mix_blend_mode.
pub func keyword_to_mix_blend_mode(keyword: Keyword) -> MixBlendMode?:
match keyword:
.normal: return MixBlendMode.normal
.multiply: return MixBlendMode.multiply
.screen: return MixBlendMode.screen
.overlay: return MixBlendMode.overlay
.darken: return MixBlendMode.darken
.lighten: return MixBlendMode.lighten
.color_dodge: return MixBlendMode.color_dodge
.color_burn: return MixBlendMode.color_burn
.hard_light: return MixBlendMode.hard_light
.soft_light: return MixBlendMode.soft_light
.difference: return MixBlendMode.difference
.exclusion: return MixBlendMode.exclusion
.hue: return MixBlendMode.hue
.saturation: return MixBlendMode.saturation
.color: return MixBlendMode.color
.luminosity: return MixBlendMode.luminosity
.plus_darker: return MixBlendMode.plus_darker
.plus_lighter: return MixBlendMode.plus_lighter
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(MixBlendMode).
pub func to_keyword_mix_blend_mode(mix_blend_mode_value: MixBlendMode) -> Keyword:
match mix_blend_mode_value:
.normal: return Keyword.normal
.multiply: return Keyword.multiply
.screen: return Keyword.screen
.overlay: return Keyword.overlay
.darken: return Keyword.darken
.lighten: return Keyword.lighten
.color_dodge: return Keyword.color_dodge
.color_burn: return Keyword.color_burn
.hard_light: return Keyword.hard_light
.soft_light: return Keyword.soft_light
.difference: return Keyword.difference
.exclusion: return Keyword.exclusion
.hue: return Keyword.hue
.saturation: return Keyword.saturation
.color: return Keyword.color
.luminosity: return Keyword.luminosity
.plus_darker: return Keyword.plus_darker
.plus_lighter: return Keyword.plus_lighter
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(MixBlendMode).
pub func to_string_mix_blend_mode(value: MixBlendMode) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.multiply: return ak.sv("multiply")
.screen: return ak.sv("screen")
.overlay: return ak.sv("overlay")
.darken: return ak.sv("darken")
.lighten: return ak.sv("lighten")
.color_dodge: return ak.sv("color-dodge")
.color_burn: return ak.sv("color-burn")
.hard_light: return ak.sv("hard-light")
.soft_light: return ak.sv("soft-light")
.difference: return ak.sv("difference")
.exclusion: return ak.sv("exclusion")
.hue: return ak.sv("hue")
.saturation: return ak.sv("saturation")
.color: return ak.sv("color")
.luminosity: return ak.sv("luminosity")
.plus_darker: return ak.sv("plus-darker")
.plus_lighter: return ak.sv("plus-lighter")
_: trap("VERIFY_NOT_REACHED")
# mark: NumericFigureValue ======================================================================
## Web::CSS::NumericFigureValue (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum NumericFigureValue as u8:
lining_nums = 0
oldstyle_nums = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_numeric_figure_value.
pub func keyword_to_numeric_figure_value(keyword: Keyword) -> NumericFigureValue?:
match keyword:
.lining_nums: return NumericFigureValue.lining_nums
.oldstyle_nums: return NumericFigureValue.oldstyle_nums
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(NumericFigureValue).
pub func to_keyword_numeric_figure_value(numeric_figure_value_value: NumericFigureValue) -> Keyword:
match numeric_figure_value_value:
.lining_nums: return Keyword.lining_nums
.oldstyle_nums: return Keyword.oldstyle_nums
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(NumericFigureValue).
pub func to_string_numeric_figure_value(value: NumericFigureValue) -> ak.StringView:
match value:
.lining_nums: return ak.sv("lining-nums")
.oldstyle_nums: return ak.sv("oldstyle-nums")
_: trap("VERIFY_NOT_REACHED")
# mark: NumericFractionValue ====================================================================
## Web::CSS::NumericFractionValue (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum NumericFractionValue as u8:
diagonal_fractions = 0
stacked_fractions = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_numeric_fraction_value.
pub func keyword_to_numeric_fraction_value(keyword: Keyword) -> NumericFractionValue?:
match keyword:
.diagonal_fractions: return NumericFractionValue.diagonal_fractions
.stacked_fractions: return NumericFractionValue.stacked_fractions
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(NumericFractionValue).
pub func to_keyword_numeric_fraction_value(numeric_fraction_value_value: NumericFractionValue) -> Keyword:
match numeric_fraction_value_value:
.diagonal_fractions: return Keyword.diagonal_fractions
.stacked_fractions: return Keyword.stacked_fractions
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(NumericFractionValue).
pub func to_string_numeric_fraction_value(value: NumericFractionValue) -> ak.StringView:
match value:
.diagonal_fractions: return ak.sv("diagonal-fractions")
.stacked_fractions: return ak.sv("stacked-fractions")
_: trap("VERIFY_NOT_REACHED")
# mark: NumericSpacingValue =====================================================================
## Web::CSS::NumericSpacingValue (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum NumericSpacingValue as u8:
proportional_nums = 0
tabular_nums = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_numeric_spacing_value.
pub func keyword_to_numeric_spacing_value(keyword: Keyword) -> NumericSpacingValue?:
match keyword:
.proportional_nums: return NumericSpacingValue.proportional_nums
.tabular_nums: return NumericSpacingValue.tabular_nums
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(NumericSpacingValue).
pub func to_keyword_numeric_spacing_value(numeric_spacing_value_value: NumericSpacingValue) -> Keyword:
match numeric_spacing_value_value:
.proportional_nums: return Keyword.proportional_nums
.tabular_nums: return Keyword.tabular_nums
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(NumericSpacingValue).
pub func to_string_numeric_spacing_value(value: NumericSpacingValue) -> ak.StringView:
match value:
.proportional_nums: return ak.sv("proportional-nums")
.tabular_nums: return ak.sv("tabular-nums")
_: trap("VERIFY_NOT_REACHED")
# mark: ObjectFit ===============================================================================
## Web::CSS::ObjectFit (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ObjectFit as u8:
fill = 0
contain = 1
cover = 2
none_ = 3
scale_down = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_object_fit.
pub func keyword_to_object_fit(keyword: Keyword) -> ObjectFit?:
match keyword:
.fill: return ObjectFit.fill
.contain: return ObjectFit.contain
.cover: return ObjectFit.cover
.none_: return ObjectFit.none_
.scale_down: return ObjectFit.scale_down
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ObjectFit).
pub func to_keyword_object_fit(object_fit_value: ObjectFit) -> Keyword:
match object_fit_value:
.fill: return Keyword.fill
.contain: return Keyword.contain
.cover: return Keyword.cover
.none_: return Keyword.none_
.scale_down: return Keyword.scale_down
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ObjectFit).
pub func to_string_object_fit(value: ObjectFit) -> ak.StringView:
match value:
.fill: return ak.sv("fill")
.contain: return ak.sv("contain")
.cover: return ak.sv("cover")
.none_: return ak.sv("none")
.scale_down: return ak.sv("scale-down")
_: trap("VERIFY_NOT_REACHED")
# mark: OutlineStyle ============================================================================
## Web::CSS::OutlineStyle (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum OutlineStyle as u8:
auto = 0
none_ = 1
dotted = 2
dashed = 3
solid = 4
double = 5
groove = 6
ridge = 7
inset = 8
outset = 9
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_outline_style.
pub func keyword_to_outline_style(keyword: Keyword) -> OutlineStyle?:
match keyword:
.auto: return OutlineStyle.auto
.none_: return OutlineStyle.none_
.dotted: return OutlineStyle.dotted
.dashed: return OutlineStyle.dashed
.solid: return OutlineStyle.solid
.double: return OutlineStyle.double
.groove: return OutlineStyle.groove
.ridge: return OutlineStyle.ridge
.inset: return OutlineStyle.inset
.outset: return OutlineStyle.outset
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(OutlineStyle).
pub func to_keyword_outline_style(outline_style_value: OutlineStyle) -> Keyword:
match outline_style_value:
.auto: return Keyword.auto
.none_: return Keyword.none_
.dotted: return Keyword.dotted
.dashed: return Keyword.dashed
.solid: return Keyword.solid
.double: return Keyword.double
.groove: return Keyword.groove
.ridge: return Keyword.ridge
.inset: return Keyword.inset
.outset: return Keyword.outset
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(OutlineStyle).
pub func to_string_outline_style(value: OutlineStyle) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.none_: return ak.sv("none")
.dotted: return ak.sv("dotted")
.dashed: return ak.sv("dashed")
.solid: return ak.sv("solid")
.double: return ak.sv("double")
.groove: return ak.sv("groove")
.ridge: return ak.sv("ridge")
.inset: return ak.sv("inset")
.outset: return ak.sv("outset")
_: trap("VERIFY_NOT_REACHED")
# mark: Overflow ================================================================================
## Web::CSS::Overflow (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Overflow as u8:
auto = 0
clip = 1
hidden = 2
scroll = 3
visible = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_overflow.
pub func keyword_to_overflow(keyword: Keyword) -> Overflow?:
match keyword:
.auto: return Overflow.auto
.clip: return Overflow.clip
.hidden: return Overflow.hidden
.scroll: return Overflow.scroll
.visible: return Overflow.visible
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Overflow).
pub func to_keyword_overflow(overflow_value: Overflow) -> Keyword:
match overflow_value:
.auto: return Keyword.auto
.clip: return Keyword.clip
.hidden: return Keyword.hidden
.scroll: return Keyword.scroll
.visible: return Keyword.visible
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Overflow).
pub func to_string_overflow(value: Overflow) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.clip: return ak.sv("clip")
.hidden: return ak.sv("hidden")
.scroll: return ak.sv("scroll")
.visible: return ak.sv("visible")
_: trap("VERIFY_NOT_REACHED")
# mark: PageSize ================================================================================
## Web::CSS::PageSize (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum PageSize as u8:
a5 = 0
a4 = 1
a3 = 2
b5 = 3
b4 = 4
jis_b5 = 5
jis_b4 = 6
letter = 7
legal = 8
ledger = 9
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_page_size.
pub func keyword_to_page_size(keyword: Keyword) -> PageSize?:
match keyword:
.a5: return PageSize.a5
.a4: return PageSize.a4
.a3: return PageSize.a3
.b5: return PageSize.b5
.b4: return PageSize.b4
.jis_b5: return PageSize.jis_b5
.jis_b4: return PageSize.jis_b4
.letter: return PageSize.letter
.legal: return PageSize.legal
.ledger: return PageSize.ledger
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(PageSize).
pub func to_keyword_page_size(page_size_value: PageSize) -> Keyword:
match page_size_value:
.a5: return Keyword.a5
.a4: return Keyword.a4
.a3: return Keyword.a3
.b5: return Keyword.b5
.b4: return Keyword.b4
.jis_b5: return Keyword.jis_b5
.jis_b4: return Keyword.jis_b4
.letter: return Keyword.letter
.legal: return Keyword.legal
.ledger: return Keyword.ledger
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(PageSize).
pub func to_string_page_size(value: PageSize) -> ak.StringView:
match value:
.a5: return ak.sv("a5")
.a4: return ak.sv("a4")
.a3: return ak.sv("a3")
.b5: return ak.sv("b5")
.b4: return ak.sv("b4")
.jis_b5: return ak.sv("jis-b5")
.jis_b4: return ak.sv("jis-b4")
.letter: return ak.sv("letter")
.legal: return ak.sv("legal")
.ledger: return ak.sv("ledger")
_: trap("VERIFY_NOT_REACHED")
# mark: PaintOrder ==============================================================================
## Web::CSS::PaintOrder (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum PaintOrder as u8:
fill = 0
stroke = 1
markers = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_paint_order.
pub func keyword_to_paint_order(keyword: Keyword) -> PaintOrder?:
match keyword:
.fill: return PaintOrder.fill
.stroke: return PaintOrder.stroke
.markers: return PaintOrder.markers
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(PaintOrder).
pub func to_keyword_paint_order(paint_order_value: PaintOrder) -> Keyword:
match paint_order_value:
.fill: return Keyword.fill
.stroke: return Keyword.stroke
.markers: return Keyword.markers
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(PaintOrder).
pub func to_string_paint_order(value: PaintOrder) -> ak.StringView:
match value:
.fill: return ak.sv("fill")
.stroke: return ak.sv("stroke")
.markers: return ak.sv("markers")
_: trap("VERIFY_NOT_REACHED")
# mark: PointerEvents ===========================================================================
## Web::CSS::PointerEvents (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum PointerEvents as u8:
auto = 0
all = 1
none_ = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_pointer_events.
pub func keyword_to_pointer_events(keyword: Keyword) -> PointerEvents?:
match keyword:
.auto: return PointerEvents.auto
.all: return PointerEvents.all
.none_: return PointerEvents.none_
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(PointerEvents).
pub func to_keyword_pointer_events(pointer_events_value: PointerEvents) -> Keyword:
match pointer_events_value:
.auto: return Keyword.auto
.all: return Keyword.all
.none_: return Keyword.none_
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(PointerEvents).
pub func to_string_pointer_events(value: PointerEvents) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.all: return ak.sv("all")
.none_: return ak.sv("none")
_: trap("VERIFY_NOT_REACHED")
# mark: PolarColorSpace =========================================================================
## Web::CSS::PolarColorSpace (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum PolarColorSpace as u8:
hsl = 0
hwb = 1
lch = 2
oklch = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_polar_color_space.
pub func keyword_to_polar_color_space(keyword: Keyword) -> PolarColorSpace?:
match keyword:
.hsl: return PolarColorSpace.hsl
.hwb: return PolarColorSpace.hwb
.lch: return PolarColorSpace.lch
.oklch: return PolarColorSpace.oklch
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(PolarColorSpace).
pub func to_keyword_polar_color_space(polar_color_space_value: PolarColorSpace) -> Keyword:
match polar_color_space_value:
.hsl: return Keyword.hsl
.hwb: return Keyword.hwb
.lch: return Keyword.lch
.oklch: return Keyword.oklch
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(PolarColorSpace).
pub func to_string_polar_color_space(value: PolarColorSpace) -> ak.StringView:
match value:
.hsl: return ak.sv("hsl")
.hwb: return ak.sv("hwb")
.lch: return ak.sv("lch")
.oklch: return ak.sv("oklch")
_: trap("VERIFY_NOT_REACHED")
# mark: PositionArea ============================================================================
## Web::CSS::PositionArea (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum PositionArea as u8:
left = 0
center = 1
right = 2
span_left = 3
span_right = 4
x_start = 5
x_end = 6
span_x_start = 7
span_x_end = 8
self_x_start = 9
self_x_end = 10
span_self_x_start = 11
span_self_x_end = 12
span_all = 13
top = 14
bottom = 15
span_top = 16
span_bottom = 17
y_start = 18
y_end = 19
span_y_start = 20
span_y_end = 21
self_y_start = 22
self_y_end = 23
span_self_y_start = 24
span_self_y_end = 25
block_start = 26
block_end = 27
span_block_start = 28
span_block_end = 29
inline_start = 30
inline_end = 31
span_inline_start = 32
span_inline_end = 33
self_block_start = 34
self_block_end = 35
span_self_block_start = 36
span_self_block_end = 37
self_inline_start = 38
self_inline_end = 39
span_self_inline_start = 40
span_self_inline_end = 41
start = 42
end = 43
span_start = 44
span_end = 45
self_start = 46
self_end = 47
span_self_start = 48
span_self_end = 49
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_position_area.
pub func keyword_to_position_area(keyword: Keyword) -> PositionArea?:
match keyword:
.left: return PositionArea.left
.center: return PositionArea.center
.right: return PositionArea.right
.span_left: return PositionArea.span_left
.span_right: return PositionArea.span_right
.x_start: return PositionArea.x_start
.x_end: return PositionArea.x_end
.span_x_start: return PositionArea.span_x_start
.span_x_end: return PositionArea.span_x_end
.self_x_start: return PositionArea.self_x_start
.self_x_end: return PositionArea.self_x_end
.span_self_x_start: return PositionArea.span_self_x_start
.span_self_x_end: return PositionArea.span_self_x_end
.span_all: return PositionArea.span_all
.top: return PositionArea.top
.bottom: return PositionArea.bottom
.span_top: return PositionArea.span_top
.span_bottom: return PositionArea.span_bottom
.y_start: return PositionArea.y_start
.y_end: return PositionArea.y_end
.span_y_start: return PositionArea.span_y_start
.span_y_end: return PositionArea.span_y_end
.self_y_start: return PositionArea.self_y_start
.self_y_end: return PositionArea.self_y_end
.span_self_y_start: return PositionArea.span_self_y_start
.span_self_y_end: return PositionArea.span_self_y_end
.block_start: return PositionArea.block_start
.block_end: return PositionArea.block_end
.span_block_start: return PositionArea.span_block_start
.span_block_end: return PositionArea.span_block_end
.inline_start: return PositionArea.inline_start
.inline_end: return PositionArea.inline_end
.span_inline_start: return PositionArea.span_inline_start
.span_inline_end: return PositionArea.span_inline_end
.self_block_start: return PositionArea.self_block_start
.self_block_end: return PositionArea.self_block_end
.span_self_block_start: return PositionArea.span_self_block_start
.span_self_block_end: return PositionArea.span_self_block_end
.self_inline_start: return PositionArea.self_inline_start
.self_inline_end: return PositionArea.self_inline_end
.span_self_inline_start: return PositionArea.span_self_inline_start
.span_self_inline_end: return PositionArea.span_self_inline_end
.start: return PositionArea.start
.end: return PositionArea.end
.span_start: return PositionArea.span_start
.span_end: return PositionArea.span_end
.self_start: return PositionArea.self_start
.self_end: return PositionArea.self_end
.span_self_start: return PositionArea.span_self_start
.span_self_end: return PositionArea.span_self_end
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(PositionArea).
pub func to_keyword_position_area(position_area_value: PositionArea) -> Keyword:
match position_area_value:
.left: return Keyword.left
.center: return Keyword.center
.right: return Keyword.right
.span_left: return Keyword.span_left
.span_right: return Keyword.span_right
.x_start: return Keyword.x_start
.x_end: return Keyword.x_end
.span_x_start: return Keyword.span_x_start
.span_x_end: return Keyword.span_x_end
.self_x_start: return Keyword.self_x_start
.self_x_end: return Keyword.self_x_end
.span_self_x_start: return Keyword.span_self_x_start
.span_self_x_end: return Keyword.span_self_x_end
.span_all: return Keyword.span_all
.top: return Keyword.top
.bottom: return Keyword.bottom
.span_top: return Keyword.span_top
.span_bottom: return Keyword.span_bottom
.y_start: return Keyword.y_start
.y_end: return Keyword.y_end
.span_y_start: return Keyword.span_y_start
.span_y_end: return Keyword.span_y_end
.self_y_start: return Keyword.self_y_start
.self_y_end: return Keyword.self_y_end
.span_self_y_start: return Keyword.span_self_y_start
.span_self_y_end: return Keyword.span_self_y_end
.block_start: return Keyword.block_start
.block_end: return Keyword.block_end
.span_block_start: return Keyword.span_block_start
.span_block_end: return Keyword.span_block_end
.inline_start: return Keyword.inline_start
.inline_end: return Keyword.inline_end
.span_inline_start: return Keyword.span_inline_start
.span_inline_end: return Keyword.span_inline_end
.self_block_start: return Keyword.self_block_start
.self_block_end: return Keyword.self_block_end
.span_self_block_start: return Keyword.span_self_block_start
.span_self_block_end: return Keyword.span_self_block_end
.self_inline_start: return Keyword.self_inline_start
.self_inline_end: return Keyword.self_inline_end
.span_self_inline_start: return Keyword.span_self_inline_start
.span_self_inline_end: return Keyword.span_self_inline_end
.start: return Keyword.start
.end: return Keyword.end
.span_start: return Keyword.span_start
.span_end: return Keyword.span_end
.self_start: return Keyword.self_start
.self_end: return Keyword.self_end
.span_self_start: return Keyword.span_self_start
.span_self_end: return Keyword.span_self_end
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(PositionArea).
pub func to_string_position_area(value: PositionArea) -> ak.StringView:
match value:
.left: return ak.sv("left")
.center: return ak.sv("center")
.right: return ak.sv("right")
.span_left: return ak.sv("span-left")
.span_right: return ak.sv("span-right")
.x_start: return ak.sv("x-start")
.x_end: return ak.sv("x-end")
.span_x_start: return ak.sv("span-x-start")
.span_x_end: return ak.sv("span-x-end")
.self_x_start: return ak.sv("self-x-start")
.self_x_end: return ak.sv("self-x-end")
.span_self_x_start: return ak.sv("span-self-x-start")
.span_self_x_end: return ak.sv("span-self-x-end")
.span_all: return ak.sv("span-all")
.top: return ak.sv("top")
.bottom: return ak.sv("bottom")
.span_top: return ak.sv("span-top")
.span_bottom: return ak.sv("span-bottom")
.y_start: return ak.sv("y-start")
.y_end: return ak.sv("y-end")
.span_y_start: return ak.sv("span-y-start")
.span_y_end: return ak.sv("span-y-end")
.self_y_start: return ak.sv("self-y-start")
.self_y_end: return ak.sv("self-y-end")
.span_self_y_start: return ak.sv("span-self-y-start")
.span_self_y_end: return ak.sv("span-self-y-end")
.block_start: return ak.sv("block-start")
.block_end: return ak.sv("block-end")
.span_block_start: return ak.sv("span-block-start")
.span_block_end: return ak.sv("span-block-end")
.inline_start: return ak.sv("inline-start")
.inline_end: return ak.sv("inline-end")
.span_inline_start: return ak.sv("span-inline-start")
.span_inline_end: return ak.sv("span-inline-end")
.self_block_start: return ak.sv("self-block-start")
.self_block_end: return ak.sv("self-block-end")
.span_self_block_start: return ak.sv("span-self-block-start")
.span_self_block_end: return ak.sv("span-self-block-end")
.self_inline_start: return ak.sv("self-inline-start")
.self_inline_end: return ak.sv("self-inline-end")
.span_self_inline_start: return ak.sv("span-self-inline-start")
.span_self_inline_end: return ak.sv("span-self-inline-end")
.start: return ak.sv("start")
.end: return ak.sv("end")
.span_start: return ak.sv("span-start")
.span_end: return ak.sv("span-end")
.self_start: return ak.sv("self-start")
.self_end: return ak.sv("self-end")
.span_self_start: return ak.sv("span-self-start")
.span_self_end: return ak.sv("span-self-end")
_: trap("VERIFY_NOT_REACHED")
# mark: PositionEdge ============================================================================
## Web::CSS::PositionEdge (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum PositionEdge as u8:
center = 0
left = 1
right = 2
top = 3
bottom = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_position_edge.
pub func keyword_to_position_edge(keyword: Keyword) -> PositionEdge?:
match keyword:
.center: return PositionEdge.center
.left: return PositionEdge.left
.right: return PositionEdge.right
.top: return PositionEdge.top
.bottom: return PositionEdge.bottom
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(PositionEdge).
pub func to_keyword_position_edge(position_edge_value: PositionEdge) -> Keyword:
match position_edge_value:
.center: return Keyword.center
.left: return Keyword.left
.right: return Keyword.right
.top: return Keyword.top
.bottom: return Keyword.bottom
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(PositionEdge).
pub func to_string_position_edge(value: PositionEdge) -> ak.StringView:
match value:
.center: return ak.sv("center")
.left: return ak.sv("left")
.right: return ak.sv("right")
.top: return ak.sv("top")
.bottom: return ak.sv("bottom")
_: trap("VERIFY_NOT_REACHED")
# mark: Positioning =============================================================================
## Web::CSS::Positioning (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Positioning as u8:
absolute = 0
fixed = 1
relative = 2
static_ = 3
sticky = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_positioning.
pub func keyword_to_positioning(keyword: Keyword) -> Positioning?:
match keyword:
.absolute: return Positioning.absolute
.fixed: return Positioning.fixed
.relative: return Positioning.relative
.static_: return Positioning.static_
.sticky: return Positioning.sticky
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Positioning).
pub func to_keyword_positioning(positioning_value: Positioning) -> Keyword:
match positioning_value:
.absolute: return Keyword.absolute
.fixed: return Keyword.fixed
.relative: return Keyword.relative
.static_: return Keyword.static_
.sticky: return Keyword.sticky
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Positioning).
pub func to_string_positioning(value: Positioning) -> ak.StringView:
match value:
.absolute: return ak.sv("absolute")
.fixed: return ak.sv("fixed")
.relative: return ak.sv("relative")
.static_: return ak.sv("static")
.sticky: return ak.sv("sticky")
_: trap("VERIFY_NOT_REACHED")
# mark: RadialExtent ============================================================================
## Web::CSS::RadialExtent (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum RadialExtent as u8:
closest_corner = 0
closest_side = 1
farthest_corner = 2
farthest_side = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_radial_extent.
pub func keyword_to_radial_extent(keyword: Keyword) -> RadialExtent?:
match keyword:
.closest_corner: return RadialExtent.closest_corner
.closest_side: return RadialExtent.closest_side
.farthest_corner: return RadialExtent.farthest_corner
.farthest_side: return RadialExtent.farthest_side
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(RadialExtent).
pub func to_keyword_radial_extent(radial_extent_value: RadialExtent) -> Keyword:
match radial_extent_value:
.closest_corner: return Keyword.closest_corner
.closest_side: return Keyword.closest_side
.farthest_corner: return Keyword.farthest_corner
.farthest_side: return Keyword.farthest_side
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(RadialExtent).
pub func to_string_radial_extent(value: RadialExtent) -> ak.StringView:
match value:
.closest_corner: return ak.sv("closest-corner")
.closest_side: return ak.sv("closest-side")
.farthest_corner: return ak.sv("farthest-corner")
.farthest_side: return ak.sv("farthest-side")
_: trap("VERIFY_NOT_REACHED")
# mark: RectangularColorSpace ===================================================================
## Web::CSS::RectangularColorSpace (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum RectangularColorSpace as u8:
srgb = 0
srgb_linear = 1
display_p3 = 2
display_p3_linear = 3
a98_rgb = 4
prophoto_rgb = 5
rec2020 = 6
lab = 7
oklab = 8
xyz = 9
xyz_d50 = 10
xyz_d65 = 11
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_rectangular_color_space.
pub func keyword_to_rectangular_color_space(keyword: Keyword) -> RectangularColorSpace?:
match keyword:
.srgb: return RectangularColorSpace.srgb
.srgb_linear: return RectangularColorSpace.srgb_linear
.display_p3: return RectangularColorSpace.display_p3
.display_p3_linear: return RectangularColorSpace.display_p3_linear
.a98_rgb: return RectangularColorSpace.a98_rgb
.prophoto_rgb: return RectangularColorSpace.prophoto_rgb
.rec2020: return RectangularColorSpace.rec2020
.lab: return RectangularColorSpace.lab
.oklab: return RectangularColorSpace.oklab
.xyz: return RectangularColorSpace.xyz
.xyz_d50: return RectangularColorSpace.xyz_d50
.xyz_d65: return RectangularColorSpace.xyz_d65
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(RectangularColorSpace).
pub func to_keyword_rectangular_color_space(rectangular_color_space_value: RectangularColorSpace) -> Keyword:
match rectangular_color_space_value:
.srgb: return Keyword.srgb
.srgb_linear: return Keyword.srgb_linear
.display_p3: return Keyword.display_p3
.display_p3_linear: return Keyword.display_p3_linear
.a98_rgb: return Keyword.a98_rgb
.prophoto_rgb: return Keyword.prophoto_rgb
.rec2020: return Keyword.rec2020
.lab: return Keyword.lab
.oklab: return Keyword.oklab
.xyz: return Keyword.xyz
.xyz_d50: return Keyword.xyz_d50
.xyz_d65: return Keyword.xyz_d65
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(RectangularColorSpace).
pub func to_string_rectangular_color_space(value: RectangularColorSpace) -> ak.StringView:
match value:
.srgb: return ak.sv("srgb")
.srgb_linear: return ak.sv("srgb-linear")
.display_p3: return ak.sv("display-p3")
.display_p3_linear: return ak.sv("display-p3-linear")
.a98_rgb: return ak.sv("a98-rgb")
.prophoto_rgb: return ak.sv("prophoto-rgb")
.rec2020: return ak.sv("rec2020")
.lab: return ak.sv("lab")
.oklab: return ak.sv("oklab")
.xyz: return ak.sv("xyz")
.xyz_d50: return ak.sv("xyz-d50")
.xyz_d65: return ak.sv("xyz-d65")
_: trap("VERIFY_NOT_REACHED")
# mark: ReferrerPolicyModifierValue =============================================================
## Web::CSS::ReferrerPolicyModifierValue (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ReferrerPolicyModifierValue as u8:
no_referrer = 0
no_referrer_when_downgrade = 1
same_origin = 2
origin = 3
strict_origin = 4
origin_when_cross_origin = 5
strict_origin_when_cross_origin = 6
unsafe_url = 7
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_referrer_policy_modifier_value.
pub func keyword_to_referrer_policy_modifier_value(keyword: Keyword) -> ReferrerPolicyModifierValue?:
match keyword:
.no_referrer: return ReferrerPolicyModifierValue.no_referrer
.no_referrer_when_downgrade: return ReferrerPolicyModifierValue.no_referrer_when_downgrade
.same_origin: return ReferrerPolicyModifierValue.same_origin
.origin: return ReferrerPolicyModifierValue.origin
.strict_origin: return ReferrerPolicyModifierValue.strict_origin
.origin_when_cross_origin: return ReferrerPolicyModifierValue.origin_when_cross_origin
.strict_origin_when_cross_origin: return ReferrerPolicyModifierValue.strict_origin_when_cross_origin
.unsafe_url: return ReferrerPolicyModifierValue.unsafe_url
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ReferrerPolicyModifierValue).
pub func to_keyword_referrer_policy_modifier_value(referrer_policy_modifier_value_value: ReferrerPolicyModifierValue) -> Keyword:
match referrer_policy_modifier_value_value:
.no_referrer: return Keyword.no_referrer
.no_referrer_when_downgrade: return Keyword.no_referrer_when_downgrade
.same_origin: return Keyword.same_origin
.origin: return Keyword.origin
.strict_origin: return Keyword.strict_origin
.origin_when_cross_origin: return Keyword.origin_when_cross_origin
.strict_origin_when_cross_origin: return Keyword.strict_origin_when_cross_origin
.unsafe_url: return Keyword.unsafe_url
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ReferrerPolicyModifierValue).
pub func to_string_referrer_policy_modifier_value(value: ReferrerPolicyModifierValue) -> ak.StringView:
match value:
.no_referrer: return ak.sv("no-referrer")
.no_referrer_when_downgrade: return ak.sv("no-referrer-when-downgrade")
.same_origin: return ak.sv("same-origin")
.origin: return ak.sv("origin")
.strict_origin: return ak.sv("strict-origin")
.origin_when_cross_origin: return ak.sv("origin-when-cross-origin")
.strict_origin_when_cross_origin: return ak.sv("strict-origin-when-cross-origin")
.unsafe_url: return ak.sv("unsafe-url")
_: trap("VERIFY_NOT_REACHED")
# mark: RelativeSize ============================================================================
## Web::CSS::RelativeSize (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum RelativeSize as u8:
smaller = 0
larger = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_relative_size.
pub func keyword_to_relative_size(keyword: Keyword) -> RelativeSize?:
match keyword:
.smaller: return RelativeSize.smaller
.larger: return RelativeSize.larger
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(RelativeSize).
pub func to_keyword_relative_size(relative_size_value: RelativeSize) -> Keyword:
match relative_size_value:
.smaller: return Keyword.smaller
.larger: return Keyword.larger
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(RelativeSize).
pub func to_string_relative_size(value: RelativeSize) -> ak.StringView:
match value:
.smaller: return ak.sv("smaller")
.larger: return ak.sv("larger")
_: trap("VERIFY_NOT_REACHED")
# mark: Repetition ==============================================================================
## Web::CSS::Repetition (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Repetition as u8:
no_repeat = 0
repeat = 1
round = 2
space = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_repetition.
pub func keyword_to_repetition(keyword: Keyword) -> Repetition?:
match keyword:
.no_repeat: return Repetition.no_repeat
.repeat: return Repetition.repeat
.round: return Repetition.round
.space: return Repetition.space
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Repetition).
pub func to_keyword_repetition(repetition_value: Repetition) -> Keyword:
match repetition_value:
.no_repeat: return Keyword.no_repeat
.repeat: return Keyword.repeat
.round: return Keyword.round
.space: return Keyword.space
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Repetition).
pub func to_string_repetition(value: Repetition) -> ak.StringView:
match value:
.no_repeat: return ak.sv("no-repeat")
.repeat: return ak.sv("repeat")
.round: return ak.sv("round")
.space: return ak.sv("space")
_: trap("VERIFY_NOT_REACHED")
# mark: Resize ==================================================================================
## Web::CSS::Resize (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Resize as u8:
none_ = 0
both = 1
horizontal = 2
vertical = 3
inline = 4
block = 5
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_resize.
pub func keyword_to_resize(keyword: Keyword) -> Resize?:
match keyword:
.none_: return Resize.none_
.both: return Resize.both
.horizontal: return Resize.horizontal
.vertical: return Resize.vertical
.inline: return Resize.inline
.block: return Resize.block
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Resize).
pub func to_keyword_resize(resize_value: Resize) -> Keyword:
match resize_value:
.none_: return Keyword.none_
.both: return Keyword.both
.horizontal: return Keyword.horizontal
.vertical: return Keyword.vertical
.inline: return Keyword.inline
.block: return Keyword.block
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Resize).
pub func to_string_resize(value: Resize) -> ak.StringView:
match value:
.none_: return ak.sv("none")
.both: return ak.sv("both")
.horizontal: return ak.sv("horizontal")
.vertical: return ak.sv("vertical")
.inline: return ak.sv("inline")
.block: return ak.sv("block")
_: trap("VERIFY_NOT_REACHED")
# mark: RoundingStrategy ========================================================================
## Web::CSS::RoundingStrategy (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum RoundingStrategy as u8:
down = 0
nearest = 1
to_zero = 2
up = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_rounding_strategy.
pub func keyword_to_rounding_strategy(keyword: Keyword) -> RoundingStrategy?:
match keyword:
.down: return RoundingStrategy.down
.nearest: return RoundingStrategy.nearest
.to_zero: return RoundingStrategy.to_zero
.up: return RoundingStrategy.up
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(RoundingStrategy).
pub func to_keyword_rounding_strategy(rounding_strategy_value: RoundingStrategy) -> Keyword:
match rounding_strategy_value:
.down: return Keyword.down
.nearest: return Keyword.nearest
.to_zero: return Keyword.to_zero
.up: return Keyword.up
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(RoundingStrategy).
pub func to_string_rounding_strategy(value: RoundingStrategy) -> ak.StringView:
match value:
.down: return ak.sv("down")
.nearest: return ak.sv("nearest")
.to_zero: return ak.sv("to-zero")
.up: return ak.sv("up")
_: trap("VERIFY_NOT_REACHED")
# mark: ScrollbarGutter =========================================================================
## Web::CSS::ScrollbarGutter (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ScrollbarGutter as u8:
auto = 0
stable = 1
both_edges = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_scrollbar_gutter.
pub func keyword_to_scrollbar_gutter(keyword: Keyword) -> ScrollbarGutter?:
match keyword:
.auto: return ScrollbarGutter.auto
.stable: return ScrollbarGutter.stable
.both_edges: return ScrollbarGutter.both_edges
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ScrollbarGutter).
pub func to_keyword_scrollbar_gutter(scrollbar_gutter_value: ScrollbarGutter) -> Keyword:
match scrollbar_gutter_value:
.auto: return Keyword.auto
.stable: return Keyword.stable
.both_edges: return Keyword.both_edges
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ScrollbarGutter).
pub func to_string_scrollbar_gutter(value: ScrollbarGutter) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.stable: return ak.sv("stable")
.both_edges: return ak.sv("both-edges")
_: trap("VERIFY_NOT_REACHED")
# mark: ScrollbarWidth ==========================================================================
## Web::CSS::ScrollbarWidth (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ScrollbarWidth as u8:
auto = 0
thin = 1
none_ = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_scrollbar_width.
pub func keyword_to_scrollbar_width(keyword: Keyword) -> ScrollbarWidth?:
match keyword:
.auto: return ScrollbarWidth.auto
.thin: return ScrollbarWidth.thin
.none_: return ScrollbarWidth.none_
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ScrollbarWidth).
pub func to_keyword_scrollbar_width(scrollbar_width_value: ScrollbarWidth) -> Keyword:
match scrollbar_width_value:
.auto: return Keyword.auto
.thin: return Keyword.thin
.none_: return Keyword.none_
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ScrollbarWidth).
pub func to_string_scrollbar_width(value: ScrollbarWidth) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.thin: return ak.sv("thin")
.none_: return ak.sv("none")
_: trap("VERIFY_NOT_REACHED")
# mark: Scroller ================================================================================
## Web::CSS::Scroller (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Scroller as u8:
root = 0
nearest = 1
self_ = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_scroller.
pub func keyword_to_scroller(keyword: Keyword) -> Scroller?:
match keyword:
.root: return Scroller.root
.nearest: return Scroller.nearest
.self_: return Scroller.self_
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Scroller).
pub func to_keyword_scroller(scroller_value: Scroller) -> Keyword:
match scroller_value:
.root: return Keyword.root
.nearest: return Keyword.nearest
.self_: return Keyword.self_
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Scroller).
pub func to_string_scroller(value: Scroller) -> ak.StringView:
match value:
.root: return ak.sv("root")
.nearest: return ak.sv("nearest")
.self_: return ak.sv("self")
_: trap("VERIFY_NOT_REACHED")
# mark: ShapeBox ================================================================================
## Web::CSS::ShapeBox (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ShapeBox as u8:
content_box = 0
padding_box = 1
border_box = 2
margin_box = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_shape_box.
pub func keyword_to_shape_box(keyword: Keyword) -> ShapeBox?:
match keyword:
.content_box: return ShapeBox.content_box
.padding_box: return ShapeBox.padding_box
.border_box: return ShapeBox.border_box
.margin_box: return ShapeBox.margin_box
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ShapeBox).
pub func to_keyword_shape_box(shape_box_value: ShapeBox) -> Keyword:
match shape_box_value:
.content_box: return Keyword.content_box
.padding_box: return Keyword.padding_box
.border_box: return Keyword.border_box
.margin_box: return Keyword.margin_box
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ShapeBox).
pub func to_string_shape_box(value: ShapeBox) -> ak.StringView:
match value:
.content_box: return ak.sv("content-box")
.padding_box: return ak.sv("padding-box")
.border_box: return ak.sv("border-box")
.margin_box: return ak.sv("margin-box")
_: trap("VERIFY_NOT_REACHED")
# mark: ShapeRendering ==========================================================================
## Web::CSS::ShapeRendering (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum ShapeRendering as u8:
auto = 0
optimizespeed = 1
crispedges = 2
geometricprecision = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_shape_rendering.
pub func keyword_to_shape_rendering(keyword: Keyword) -> ShapeRendering?:
match keyword:
.auto: return ShapeRendering.auto
.optimizespeed: return ShapeRendering.optimizespeed
.crispedges: return ShapeRendering.crispedges
.geometricprecision: return ShapeRendering.geometricprecision
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(ShapeRendering).
pub func to_keyword_shape_rendering(shape_rendering_value: ShapeRendering) -> Keyword:
match shape_rendering_value:
.auto: return Keyword.auto
.optimizespeed: return Keyword.optimizespeed
.crispedges: return Keyword.crispedges
.geometricprecision: return Keyword.geometricprecision
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(ShapeRendering).
pub func to_string_shape_rendering(value: ShapeRendering) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.optimizespeed: return ak.sv("optimizespeed")
.crispedges: return ak.sv("crispedges")
.geometricprecision: return ak.sv("geometricprecision")
_: trap("VERIFY_NOT_REACHED")
# mark: StepPosition ============================================================================
## Web::CSS::StepPosition (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum StepPosition as u8:
jump_start = 0
jump_end = 1
jump_none = 2
jump_both = 3
start = 4
end = 5
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_step_position.
pub func keyword_to_step_position(keyword: Keyword) -> StepPosition?:
match keyword:
.jump_start: return StepPosition.jump_start
.jump_end: return StepPosition.jump_end
.jump_none: return StepPosition.jump_none
.jump_both: return StepPosition.jump_both
.start: return StepPosition.start
.end: return StepPosition.end
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(StepPosition).
pub func to_keyword_step_position(step_position_value: StepPosition) -> Keyword:
match step_position_value:
.jump_start: return Keyword.jump_start
.jump_end: return Keyword.jump_end
.jump_none: return Keyword.jump_none
.jump_both: return Keyword.jump_both
.start: return Keyword.start
.end: return Keyword.end
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(StepPosition).
pub func to_string_step_position(value: StepPosition) -> ak.StringView:
match value:
.jump_start: return ak.sv("jump-start")
.jump_end: return ak.sv("jump-end")
.jump_none: return ak.sv("jump-none")
.jump_both: return ak.sv("jump-both")
.start: return ak.sv("start")
.end: return ak.sv("end")
_: trap("VERIFY_NOT_REACHED")
# mark: StrokeLinecap ===========================================================================
## Web::CSS::StrokeLinecap (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum StrokeLinecap as u8:
butt = 0
square = 1
round = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_stroke_linecap.
pub func keyword_to_stroke_linecap(keyword: Keyword) -> StrokeLinecap?:
match keyword:
.butt: return StrokeLinecap.butt
.square: return StrokeLinecap.square
.round: return StrokeLinecap.round
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(StrokeLinecap).
pub func to_keyword_stroke_linecap(stroke_linecap_value: StrokeLinecap) -> Keyword:
match stroke_linecap_value:
.butt: return Keyword.butt
.square: return Keyword.square
.round: return Keyword.round
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(StrokeLinecap).
pub func to_string_stroke_linecap(value: StrokeLinecap) -> ak.StringView:
match value:
.butt: return ak.sv("butt")
.square: return ak.sv("square")
.round: return ak.sv("round")
_: trap("VERIFY_NOT_REACHED")
# mark: StrokeLinejoin ==========================================================================
## Web::CSS::StrokeLinejoin (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum StrokeLinejoin as u8:
miter = 0
round = 1
bevel = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_stroke_linejoin.
pub func keyword_to_stroke_linejoin(keyword: Keyword) -> StrokeLinejoin?:
match keyword:
.miter: return StrokeLinejoin.miter
.round: return StrokeLinejoin.round
.bevel: return StrokeLinejoin.bevel
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(StrokeLinejoin).
pub func to_keyword_stroke_linejoin(stroke_linejoin_value: StrokeLinejoin) -> Keyword:
match stroke_linejoin_value:
.miter: return Keyword.miter
.round: return Keyword.round
.bevel: return Keyword.bevel
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(StrokeLinejoin).
pub func to_string_stroke_linejoin(value: StrokeLinejoin) -> ak.StringView:
match value:
.miter: return ak.sv("miter")
.round: return ak.sv("round")
.bevel: return ak.sv("bevel")
_: trap("VERIFY_NOT_REACHED")
# mark: SymbolsType =============================================================================
## Web::CSS::SymbolsType (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum SymbolsType as u8:
cyclic = 0
numeric = 1
alphabetic = 2
symbolic = 3
fixed = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_symbols_type.
pub func keyword_to_symbols_type(keyword: Keyword) -> SymbolsType?:
match keyword:
.cyclic: return SymbolsType.cyclic
.numeric: return SymbolsType.numeric
.alphabetic: return SymbolsType.alphabetic
.symbolic: return SymbolsType.symbolic
.fixed: return SymbolsType.fixed
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(SymbolsType).
pub func to_keyword_symbols_type(symbols_type_value: SymbolsType) -> Keyword:
match symbols_type_value:
.cyclic: return Keyword.cyclic
.numeric: return Keyword.numeric
.alphabetic: return Keyword.alphabetic
.symbolic: return Keyword.symbolic
.fixed: return Keyword.fixed
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(SymbolsType).
pub func to_string_symbols_type(value: SymbolsType) -> ak.StringView:
match value:
.cyclic: return ak.sv("cyclic")
.numeric: return ak.sv("numeric")
.alphabetic: return ak.sv("alphabetic")
.symbolic: return ak.sv("symbolic")
.fixed: return ak.sv("fixed")
_: trap("VERIFY_NOT_REACHED")
# mark: TableLayout =============================================================================
## Web::CSS::TableLayout (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TableLayout as u8:
auto = 0
fixed = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_table_layout.
pub func keyword_to_table_layout(keyword: Keyword) -> TableLayout?:
match keyword:
.auto: return TableLayout.auto
.fixed: return TableLayout.fixed
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TableLayout).
pub func to_keyword_table_layout(table_layout_value: TableLayout) -> Keyword:
match table_layout_value:
.auto: return Keyword.auto
.fixed: return Keyword.fixed
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TableLayout).
pub func to_string_table_layout(value: TableLayout) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.fixed: return ak.sv("fixed")
_: trap("VERIFY_NOT_REACHED")
# mark: TextAlign ===============================================================================
## Web::CSS::TextAlign (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextAlign as u8:
center = 0
justify = 1
start = 2
end = 3
left = 4
right = 5
match_parent = 6
libweb_center = 7
libweb_inherit_or_center = 8
libweb_left = 9
libweb_right = 10
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_align.
pub func keyword_to_text_align(keyword: Keyword) -> TextAlign?:
match keyword:
.center: return TextAlign.center
.justify: return TextAlign.justify
.start: return TextAlign.start
.end: return TextAlign.end
.left: return TextAlign.left
.right: return TextAlign.right
.match_parent: return TextAlign.match_parent
.libweb_center: return TextAlign.libweb_center
.libweb_inherit_or_center: return TextAlign.libweb_inherit_or_center
.libweb_left: return TextAlign.libweb_left
.libweb_right: return TextAlign.libweb_right
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextAlign).
pub func to_keyword_text_align(text_align_value: TextAlign) -> Keyword:
match text_align_value:
.center: return Keyword.center
.justify: return Keyword.justify
.start: return Keyword.start
.end: return Keyword.end
.left: return Keyword.left
.right: return Keyword.right
.match_parent: return Keyword.match_parent
.libweb_center: return Keyword.libweb_center
.libweb_inherit_or_center: return Keyword.libweb_inherit_or_center
.libweb_left: return Keyword.libweb_left
.libweb_right: return Keyword.libweb_right
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextAlign).
pub func to_string_text_align(value: TextAlign) -> ak.StringView:
match value:
.center: return ak.sv("center")
.justify: return ak.sv("justify")
.start: return ak.sv("start")
.end: return ak.sv("end")
.left: return ak.sv("left")
.right: return ak.sv("right")
.match_parent: return ak.sv("match-parent")
.libweb_center: return ak.sv("-libweb-center")
.libweb_inherit_or_center: return ak.sv("-libweb-inherit-or-center")
.libweb_left: return ak.sv("-libweb-left")
.libweb_right: return ak.sv("-libweb-right")
_: trap("VERIFY_NOT_REACHED")
# mark: TextAnchor ==============================================================================
## Web::CSS::TextAnchor (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextAnchor as u8:
start = 0
middle = 1
end = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_anchor.
pub func keyword_to_text_anchor(keyword: Keyword) -> TextAnchor?:
match keyword:
.start: return TextAnchor.start
.middle: return TextAnchor.middle
.end: return TextAnchor.end
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextAnchor).
pub func to_keyword_text_anchor(text_anchor_value: TextAnchor) -> Keyword:
match text_anchor_value:
.start: return Keyword.start
.middle: return Keyword.middle
.end: return Keyword.end
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextAnchor).
pub func to_string_text_anchor(value: TextAnchor) -> ak.StringView:
match value:
.start: return ak.sv("start")
.middle: return ak.sv("middle")
.end: return ak.sv("end")
_: trap("VERIFY_NOT_REACHED")
# mark: TextDecorationLine ======================================================================
## Web::CSS::TextDecorationLine (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextDecorationLine as u8:
none_ = 0
underline = 1
overline = 2
line_through = 3
blink = 4
spelling_error = 5
grammar_error = 6
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_decoration_line.
pub func keyword_to_text_decoration_line(keyword: Keyword) -> TextDecorationLine?:
match keyword:
.none_: return TextDecorationLine.none_
.underline: return TextDecorationLine.underline
.overline: return TextDecorationLine.overline
.line_through: return TextDecorationLine.line_through
.blink: return TextDecorationLine.blink
.spelling_error: return TextDecorationLine.spelling_error
.grammar_error: return TextDecorationLine.grammar_error
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextDecorationLine).
pub func to_keyword_text_decoration_line(text_decoration_line_value: TextDecorationLine) -> Keyword:
match text_decoration_line_value:
.none_: return Keyword.none_
.underline: return Keyword.underline
.overline: return Keyword.overline
.line_through: return Keyword.line_through
.blink: return Keyword.blink
.spelling_error: return Keyword.spelling_error
.grammar_error: return Keyword.grammar_error
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextDecorationLine).
pub func to_string_text_decoration_line(value: TextDecorationLine) -> ak.StringView:
match value:
.none_: return ak.sv("none")
.underline: return ak.sv("underline")
.overline: return ak.sv("overline")
.line_through: return ak.sv("line-through")
.blink: return ak.sv("blink")
.spelling_error: return ak.sv("spelling-error")
.grammar_error: return ak.sv("grammar-error")
_: trap("VERIFY_NOT_REACHED")
# mark: TextDecorationSkipInk ===================================================================
## Web::CSS::TextDecorationSkipInk (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextDecorationSkipInk as u8:
all = 0
auto = 1
none_ = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_decoration_skip_ink.
pub func keyword_to_text_decoration_skip_ink(keyword: Keyword) -> TextDecorationSkipInk?:
match keyword:
.all: return TextDecorationSkipInk.all
.auto: return TextDecorationSkipInk.auto
.none_: return TextDecorationSkipInk.none_
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextDecorationSkipInk).
pub func to_keyword_text_decoration_skip_ink(text_decoration_skip_ink_value: TextDecorationSkipInk) -> Keyword:
match text_decoration_skip_ink_value:
.all: return Keyword.all
.auto: return Keyword.auto
.none_: return Keyword.none_
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextDecorationSkipInk).
pub func to_string_text_decoration_skip_ink(value: TextDecorationSkipInk) -> ak.StringView:
match value:
.all: return ak.sv("all")
.auto: return ak.sv("auto")
.none_: return ak.sv("none")
_: trap("VERIFY_NOT_REACHED")
# mark: TextDecorationStyle =====================================================================
## Web::CSS::TextDecorationStyle (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextDecorationStyle as u8:
dashed = 0
dotted = 1
double = 2
solid = 3
wavy = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_decoration_style.
pub func keyword_to_text_decoration_style(keyword: Keyword) -> TextDecorationStyle?:
match keyword:
.dashed: return TextDecorationStyle.dashed
.dotted: return TextDecorationStyle.dotted
.double: return TextDecorationStyle.double
.solid: return TextDecorationStyle.solid
.wavy: return TextDecorationStyle.wavy
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextDecorationStyle).
pub func to_keyword_text_decoration_style(text_decoration_style_value: TextDecorationStyle) -> Keyword:
match text_decoration_style_value:
.dashed: return Keyword.dashed
.dotted: return Keyword.dotted
.double: return Keyword.double
.solid: return Keyword.solid
.wavy: return Keyword.wavy
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextDecorationStyle).
pub func to_string_text_decoration_style(value: TextDecorationStyle) -> ak.StringView:
match value:
.dashed: return ak.sv("dashed")
.dotted: return ak.sv("dotted")
.double: return ak.sv("double")
.solid: return ak.sv("solid")
.wavy: return ak.sv("wavy")
_: trap("VERIFY_NOT_REACHED")
# mark: TextJustify =============================================================================
## Web::CSS::TextJustify (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextJustify as u8:
auto = 0
none_ = 1
inter_word = 2
inter_character = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_justify.
pub func keyword_to_text_justify(keyword: Keyword) -> TextJustify?:
match keyword:
.auto: return TextJustify.auto
.none_: return TextJustify.none_
.inter_word: return TextJustify.inter_word
.inter_character: return TextJustify.inter_character
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextJustify).
pub func to_keyword_text_justify(text_justify_value: TextJustify) -> Keyword:
match text_justify_value:
.auto: return Keyword.auto
.none_: return Keyword.none_
.inter_word: return Keyword.inter_word
.inter_character: return Keyword.inter_character
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextJustify).
pub func to_string_text_justify(value: TextJustify) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.none_: return ak.sv("none")
.inter_word: return ak.sv("inter-word")
.inter_character: return ak.sv("inter-character")
_: trap("VERIFY_NOT_REACHED")
# mark: TextOverflow ============================================================================
## Web::CSS::TextOverflow (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextOverflow as u8:
clip = 0
ellipsis = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_overflow.
pub func keyword_to_text_overflow(keyword: Keyword) -> TextOverflow?:
match keyword:
.clip: return TextOverflow.clip
.ellipsis: return TextOverflow.ellipsis
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextOverflow).
pub func to_keyword_text_overflow(text_overflow_value: TextOverflow) -> Keyword:
match text_overflow_value:
.clip: return Keyword.clip
.ellipsis: return Keyword.ellipsis
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextOverflow).
pub func to_string_text_overflow(value: TextOverflow) -> ak.StringView:
match value:
.clip: return ak.sv("clip")
.ellipsis: return ak.sv("ellipsis")
_: trap("VERIFY_NOT_REACHED")
# mark: TextRendering ===========================================================================
## Web::CSS::TextRendering (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextRendering as u8:
auto = 0
optimizespeed = 1
optimizelegibility = 2
geometricprecision = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_rendering.
pub func keyword_to_text_rendering(keyword: Keyword) -> TextRendering?:
match keyword:
.auto: return TextRendering.auto
.optimizespeed: return TextRendering.optimizespeed
.optimizelegibility: return TextRendering.optimizelegibility
.geometricprecision: return TextRendering.geometricprecision
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextRendering).
pub func to_keyword_text_rendering(text_rendering_value: TextRendering) -> Keyword:
match text_rendering_value:
.auto: return Keyword.auto
.optimizespeed: return Keyword.optimizespeed
.optimizelegibility: return Keyword.optimizelegibility
.geometricprecision: return Keyword.geometricprecision
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextRendering).
pub func to_string_text_rendering(value: TextRendering) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.optimizespeed: return ak.sv("optimizespeed")
.optimizelegibility: return ak.sv("optimizelegibility")
.geometricprecision: return ak.sv("geometricprecision")
_: trap("VERIFY_NOT_REACHED")
# mark: TextTransform ===========================================================================
## Web::CSS::TextTransform (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextTransform as u8:
capitalize = 0
full_size_kana = 1
full_width = 2
lowercase = 3
math_auto = 4
none_ = 5
uppercase = 6
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_transform.
pub func keyword_to_text_transform(keyword: Keyword) -> TextTransform?:
match keyword:
.capitalize: return TextTransform.capitalize
.full_size_kana: return TextTransform.full_size_kana
.full_width: return TextTransform.full_width
.lowercase: return TextTransform.lowercase
.math_auto: return TextTransform.math_auto
.none_: return TextTransform.none_
.uppercase: return TextTransform.uppercase
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextTransform).
pub func to_keyword_text_transform(text_transform_value: TextTransform) -> Keyword:
match text_transform_value:
.capitalize: return Keyword.capitalize
.full_size_kana: return Keyword.full_size_kana
.full_width: return Keyword.full_width
.lowercase: return Keyword.lowercase
.math_auto: return Keyword.math_auto
.none_: return Keyword.none_
.uppercase: return Keyword.uppercase
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextTransform).
pub func to_string_text_transform(value: TextTransform) -> ak.StringView:
match value:
.capitalize: return ak.sv("capitalize")
.full_size_kana: return ak.sv("full-size-kana")
.full_width: return ak.sv("full-width")
.lowercase: return ak.sv("lowercase")
.math_auto: return ak.sv("math-auto")
.none_: return ak.sv("none")
.uppercase: return ak.sv("uppercase")
_: trap("VERIFY_NOT_REACHED")
# mark: TextUnderlinePositionHorizontal =========================================================
## Web::CSS::TextUnderlinePositionHorizontal (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextUnderlinePositionHorizontal as u8:
auto = 0
from_font = 1
under = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_underline_position_horizontal.
pub func keyword_to_text_underline_position_horizontal(keyword: Keyword) -> TextUnderlinePositionHorizontal?:
match keyword:
.auto: return TextUnderlinePositionHorizontal.auto
.from_font: return TextUnderlinePositionHorizontal.from_font
.under: return TextUnderlinePositionHorizontal.under
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextUnderlinePositionHorizontal).
pub func to_keyword_text_underline_position_horizo(text_underline_position_horizontal_value: TextUnderlinePositionHorizontal) -> Keyword:
match text_underline_position_horizontal_value:
.auto: return Keyword.auto
.from_font: return Keyword.from_font
.under: return Keyword.under
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextUnderlinePositionHorizontal).
pub func to_string_text_underline_position_horizo(value: TextUnderlinePositionHorizontal) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.from_font: return ak.sv("from-font")
.under: return ak.sv("under")
_: trap("VERIFY_NOT_REACHED")
# mark: TextUnderlinePositionVertical ===========================================================
## Web::CSS::TextUnderlinePositionVertical (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextUnderlinePositionVertical as u8:
auto = 0
left = 1
right = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_underline_position_vertical.
pub func keyword_to_text_underline_position_vertical(keyword: Keyword) -> TextUnderlinePositionVertical?:
match keyword:
.auto: return TextUnderlinePositionVertical.auto
.left: return TextUnderlinePositionVertical.left
.right: return TextUnderlinePositionVertical.right
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextUnderlinePositionVertical).
pub func to_keyword_text_underline_position_vertic(text_underline_position_vertical_value: TextUnderlinePositionVertical) -> Keyword:
match text_underline_position_vertical_value:
.auto: return Keyword.auto
.left: return Keyword.left
.right: return Keyword.right
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextUnderlinePositionVertical).
pub func to_string_text_underline_position_vertic(value: TextUnderlinePositionVertical) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.left: return ak.sv("left")
.right: return ak.sv("right")
_: trap("VERIFY_NOT_REACHED")
# mark: TextWrapMode ============================================================================
## Web::CSS::TextWrapMode (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextWrapMode as u8:
wrap = 0
nowrap = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_wrap_mode.
pub func keyword_to_text_wrap_mode(keyword: Keyword) -> TextWrapMode?:
match keyword:
.wrap: return TextWrapMode.wrap
.nowrap: return TextWrapMode.nowrap
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextWrapMode).
pub func to_keyword_text_wrap_mode(text_wrap_mode_value: TextWrapMode) -> Keyword:
match text_wrap_mode_value:
.wrap: return Keyword.wrap
.nowrap: return Keyword.nowrap
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextWrapMode).
pub func to_string_text_wrap_mode(value: TextWrapMode) -> ak.StringView:
match value:
.wrap: return ak.sv("wrap")
.nowrap: return ak.sv("nowrap")
_: trap("VERIFY_NOT_REACHED")
# mark: TextWrapStyle ===========================================================================
## Web::CSS::TextWrapStyle (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TextWrapStyle as u8:
auto = 0
balance = 1
stable = 2
pretty = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_text_wrap_style.
pub func keyword_to_text_wrap_style(keyword: Keyword) -> TextWrapStyle?:
match keyword:
.auto: return TextWrapStyle.auto
.balance: return TextWrapStyle.balance
.stable: return TextWrapStyle.stable
.pretty: return TextWrapStyle.pretty
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TextWrapStyle).
pub func to_keyword_text_wrap_style(text_wrap_style_value: TextWrapStyle) -> Keyword:
match text_wrap_style_value:
.auto: return Keyword.auto
.balance: return Keyword.balance
.stable: return Keyword.stable
.pretty: return Keyword.pretty
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TextWrapStyle).
pub func to_string_text_wrap_style(value: TextWrapStyle) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.balance: return ak.sv("balance")
.stable: return ak.sv("stable")
.pretty: return ak.sv("pretty")
_: trap("VERIFY_NOT_REACHED")
# mark: TouchAction =============================================================================
## Web::CSS::TouchAction (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TouchAction as u8:
auto = 0
manipulation = 1
none_ = 2
pan_down = 3
pan_left = 4
pan_right = 5
pan_up = 6
pan_x = 7
pan_y = 8
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_touch_action.
pub func keyword_to_touch_action(keyword: Keyword) -> TouchAction?:
match keyword:
.auto: return TouchAction.auto
.manipulation: return TouchAction.manipulation
.none_: return TouchAction.none_
.pan_down: return TouchAction.pan_down
.pan_left: return TouchAction.pan_left
.pan_right: return TouchAction.pan_right
.pan_up: return TouchAction.pan_up
.pan_x: return TouchAction.pan_x
.pan_y: return TouchAction.pan_y
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TouchAction).
pub func to_keyword_touch_action(touch_action_value: TouchAction) -> Keyword:
match touch_action_value:
.auto: return Keyword.auto
.manipulation: return Keyword.manipulation
.none_: return Keyword.none_
.pan_down: return Keyword.pan_down
.pan_left: return Keyword.pan_left
.pan_right: return Keyword.pan_right
.pan_up: return Keyword.pan_up
.pan_x: return Keyword.pan_x
.pan_y: return Keyword.pan_y
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TouchAction).
pub func to_string_touch_action(value: TouchAction) -> ak.StringView:
match value:
.auto: return ak.sv("auto")
.manipulation: return ak.sv("manipulation")
.none_: return ak.sv("none")
.pan_down: return ak.sv("pan-down")
.pan_left: return ak.sv("pan-left")
.pan_right: return ak.sv("pan-right")
.pan_up: return ak.sv("pan-up")
.pan_x: return ak.sv("pan-x")
.pan_y: return ak.sv("pan-y")
_: trap("VERIFY_NOT_REACHED")
# mark: TransformBox ============================================================================
## Web::CSS::TransformBox (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TransformBox as u8:
content_box = 0
border_box = 1
fill_box = 2
stroke_box = 3
view_box = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_transform_box.
pub func keyword_to_transform_box(keyword: Keyword) -> TransformBox?:
match keyword:
.content_box: return TransformBox.content_box
.border_box: return TransformBox.border_box
.fill_box: return TransformBox.fill_box
.stroke_box: return TransformBox.stroke_box
.view_box: return TransformBox.view_box
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TransformBox).
pub func to_keyword_transform_box(transform_box_value: TransformBox) -> Keyword:
match transform_box_value:
.content_box: return Keyword.content_box
.border_box: return Keyword.border_box
.fill_box: return Keyword.fill_box
.stroke_box: return Keyword.stroke_box
.view_box: return Keyword.view_box
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TransformBox).
pub func to_string_transform_box(value: TransformBox) -> ak.StringView:
match value:
.content_box: return ak.sv("content-box")
.border_box: return ak.sv("border-box")
.fill_box: return ak.sv("fill-box")
.stroke_box: return ak.sv("stroke-box")
.view_box: return ak.sv("view-box")
_: trap("VERIFY_NOT_REACHED")
# mark: TransformStyle ==========================================================================
## Web::CSS::TransformStyle (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TransformStyle as u8:
flat = 0
preserve3_d = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_transform_style.
pub func keyword_to_transform_style(keyword: Keyword) -> TransformStyle?:
match keyword:
.flat: return TransformStyle.flat
.preserve3_d: return TransformStyle.preserve3_d
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TransformStyle).
pub func to_keyword_transform_style(transform_style_value: TransformStyle) -> Keyword:
match transform_style_value:
.flat: return Keyword.flat
.preserve3_d: return Keyword.preserve3_d
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TransformStyle).
pub func to_string_transform_style(value: TransformStyle) -> ak.StringView:
match value:
.flat: return ak.sv("flat")
.preserve3_d: return ak.sv("preserve-3d")
_: trap("VERIFY_NOT_REACHED")
# mark: TransitionBehavior ======================================================================
## Web::CSS::TransitionBehavior (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TransitionBehavior as u8:
normal = 0
allow_discrete = 1
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_transition_behavior.
pub func keyword_to_transition_behavior(keyword: Keyword) -> TransitionBehavior?:
match keyword:
.normal: return TransitionBehavior.normal
.allow_discrete: return TransitionBehavior.allow_discrete
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TransitionBehavior).
pub func to_keyword_transition_behavior(transition_behavior_value: TransitionBehavior) -> Keyword:
match transition_behavior_value:
.normal: return Keyword.normal
.allow_discrete: return Keyword.allow_discrete
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TransitionBehavior).
pub func to_string_transition_behavior(value: TransitionBehavior) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.allow_discrete: return ak.sv("allow-discrete")
_: trap("VERIFY_NOT_REACHED")
# mark: TryOrder ================================================================================
## Web::CSS::TryOrder (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TryOrder as u8:
most_width = 0
most_height = 1
most_block_size = 2
most_inline_size = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_try_order.
pub func keyword_to_try_order(keyword: Keyword) -> TryOrder?:
match keyword:
.most_width: return TryOrder.most_width
.most_height: return TryOrder.most_height
.most_block_size: return TryOrder.most_block_size
.most_inline_size: return TryOrder.most_inline_size
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TryOrder).
pub func to_keyword_try_order(try_order_value: TryOrder) -> Keyword:
match try_order_value:
.most_width: return Keyword.most_width
.most_height: return Keyword.most_height
.most_block_size: return Keyword.most_block_size
.most_inline_size: return Keyword.most_inline_size
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TryOrder).
pub func to_string_try_order(value: TryOrder) -> ak.StringView:
match value:
.most_width: return ak.sv("most-width")
.most_height: return ak.sv("most-height")
.most_block_size: return ak.sv("most-block-size")
.most_inline_size: return ak.sv("most-inline-size")
_: trap("VERIFY_NOT_REACHED")
# mark: TryTactic ===============================================================================
## Web::CSS::TryTactic (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum TryTactic as u8:
flip_block = 0
flip_inline = 1
flip_start = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_try_tactic.
pub func keyword_to_try_tactic(keyword: Keyword) -> TryTactic?:
match keyword:
.flip_block: return TryTactic.flip_block
.flip_inline: return TryTactic.flip_inline
.flip_start: return TryTactic.flip_start
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(TryTactic).
pub func to_keyword_try_tactic(try_tactic_value: TryTactic) -> Keyword:
match try_tactic_value:
.flip_block: return Keyword.flip_block
.flip_inline: return Keyword.flip_inline
.flip_start: return Keyword.flip_start
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(TryTactic).
pub func to_string_try_tactic(value: TryTactic) -> ak.StringView:
match value:
.flip_block: return ak.sv("flip-block")
.flip_inline: return ak.sv("flip-inline")
.flip_start: return ak.sv("flip-start")
_: trap("VERIFY_NOT_REACHED")
# mark: UnicodeBidi =============================================================================
## Web::CSS::UnicodeBidi (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum UnicodeBidi as u8:
bidi_override = 0
embed = 1
isolate = 2
isolate_override = 3
normal = 4
plaintext = 5
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_unicode_bidi.
pub func keyword_to_unicode_bidi(keyword: Keyword) -> UnicodeBidi?:
match keyword:
.bidi_override: return UnicodeBidi.bidi_override
.embed: return UnicodeBidi.embed
.isolate: return UnicodeBidi.isolate
.isolate_override: return UnicodeBidi.isolate_override
.normal: return UnicodeBidi.normal
.plaintext: return UnicodeBidi.plaintext
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(UnicodeBidi).
pub func to_keyword_unicode_bidi(unicode_bidi_value: UnicodeBidi) -> Keyword:
match unicode_bidi_value:
.bidi_override: return Keyword.bidi_override
.embed: return Keyword.embed
.isolate: return Keyword.isolate
.isolate_override: return Keyword.isolate_override
.normal: return Keyword.normal
.plaintext: return Keyword.plaintext
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(UnicodeBidi).
pub func to_string_unicode_bidi(value: UnicodeBidi) -> ak.StringView:
match value:
.bidi_override: return ak.sv("bidi-override")
.embed: return ak.sv("embed")
.isolate: return ak.sv("isolate")
.isolate_override: return ak.sv("isolate-override")
.normal: return ak.sv("normal")
.plaintext: return ak.sv("plaintext")
_: trap("VERIFY_NOT_REACHED")
# mark: UserSelect ==============================================================================
## Web::CSS::UserSelect (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum UserSelect as u8:
all = 0
auto = 1
contain = 2
none_ = 3
text = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_user_select.
pub func keyword_to_user_select(keyword: Keyword) -> UserSelect?:
match keyword:
.all: return UserSelect.all
.auto: return UserSelect.auto
.contain: return UserSelect.contain
.none_: return UserSelect.none_
.text: return UserSelect.text
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(UserSelect).
pub func to_keyword_user_select(user_select_value: UserSelect) -> Keyword:
match user_select_value:
.all: return Keyword.all
.auto: return Keyword.auto
.contain: return Keyword.contain
.none_: return Keyword.none_
.text: return Keyword.text
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(UserSelect).
pub func to_string_user_select(value: UserSelect) -> ak.StringView:
match value:
.all: return ak.sv("all")
.auto: return ak.sv("auto")
.contain: return ak.sv("contain")
.none_: return ak.sv("none")
.text: return ak.sv("text")
_: trap("VERIFY_NOT_REACHED")
# mark: VerticalAlign ===========================================================================
## Web::CSS::VerticalAlign (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum VerticalAlign as u8:
baseline = 0
bottom = 1
middle = 2
sub = 3
super = 4
text_bottom = 5
text_top = 6
top = 7
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_vertical_align.
pub func keyword_to_vertical_align(keyword: Keyword) -> VerticalAlign?:
match keyword:
.baseline: return VerticalAlign.baseline
.bottom: return VerticalAlign.bottom
.middle: return VerticalAlign.middle
.sub: return VerticalAlign.sub
.super: return VerticalAlign.super
.text_bottom: return VerticalAlign.text_bottom
.text_top: return VerticalAlign.text_top
.top: return VerticalAlign.top
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(VerticalAlign).
pub func to_keyword_vertical_align(vertical_align_value: VerticalAlign) -> Keyword:
match vertical_align_value:
.baseline: return Keyword.baseline
.bottom: return Keyword.bottom
.middle: return Keyword.middle
.sub: return Keyword.sub
.super: return Keyword.super
.text_bottom: return Keyword.text_bottom
.text_top: return Keyword.text_top
.top: return Keyword.top
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(VerticalAlign).
pub func to_string_vertical_align(value: VerticalAlign) -> ak.StringView:
match value:
.baseline: return ak.sv("baseline")
.bottom: return ak.sv("bottom")
.middle: return ak.sv("middle")
.sub: return ak.sv("sub")
.super: return ak.sv("super")
.text_bottom: return ak.sv("text-bottom")
.text_top: return ak.sv("text-top")
.top: return ak.sv("top")
_: trap("VERIFY_NOT_REACHED")
# mark: Visibility ==============================================================================
## Web::CSS::Visibility (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum Visibility as u8:
collapse = 0
hidden = 1
visible = 2
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_visibility.
pub func keyword_to_visibility(keyword: Keyword) -> Visibility?:
match keyword:
.collapse: return Visibility.collapse
.hidden: return Visibility.hidden
.visible: return Visibility.visible
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(Visibility).
pub func to_keyword_visibility(visibility_value: Visibility) -> Keyword:
match visibility_value:
.collapse: return Keyword.collapse
.hidden: return Keyword.hidden
.visible: return Keyword.visible
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(Visibility).
pub func to_string_visibility(value: Visibility) -> ak.StringView:
match value:
.collapse: return ak.sv("collapse")
.hidden: return ak.sv("hidden")
.visible: return ak.sv("visible")
_: trap("VERIFY_NOT_REACHED")
# mark: WhiteSpace ==============================================================================
## Web::CSS::WhiteSpace (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum WhiteSpace as u8:
normal = 0
pre = 1
pre_line = 2
pre_wrap = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_white_space.
pub func keyword_to_white_space(keyword: Keyword) -> WhiteSpace?:
match keyword:
.normal: return WhiteSpace.normal
.pre: return WhiteSpace.pre
.pre_line: return WhiteSpace.pre_line
.pre_wrap: return WhiteSpace.pre_wrap
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(WhiteSpace).
pub func to_keyword_white_space(white_space_value: WhiteSpace) -> Keyword:
match white_space_value:
.normal: return Keyword.normal
.pre: return Keyword.pre
.pre_line: return Keyword.pre_line
.pre_wrap: return Keyword.pre_wrap
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(WhiteSpace).
pub func to_string_white_space(value: WhiteSpace) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.pre: return ak.sv("pre")
.pre_line: return ak.sv("pre-line")
.pre_wrap: return ak.sv("pre-wrap")
_: trap("VERIFY_NOT_REACHED")
# mark: WhiteSpaceCollapse ======================================================================
## Web::CSS::WhiteSpaceCollapse (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum WhiteSpaceCollapse as u8:
collapse = 0
discard_ = 1
preserve = 2
preserve_breaks = 3
preserve_spaces = 4
break_spaces = 5
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_white_space_collapse.
pub func keyword_to_white_space_collapse(keyword: Keyword) -> WhiteSpaceCollapse?:
match keyword:
.collapse: return WhiteSpaceCollapse.collapse
.discard_: return WhiteSpaceCollapse.discard_
.preserve: return WhiteSpaceCollapse.preserve
.preserve_breaks: return WhiteSpaceCollapse.preserve_breaks
.preserve_spaces: return WhiteSpaceCollapse.preserve_spaces
.break_spaces: return WhiteSpaceCollapse.break_spaces
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(WhiteSpaceCollapse).
pub func to_keyword_white_space_collapse(white_space_collapse_value: WhiteSpaceCollapse) -> Keyword:
match white_space_collapse_value:
.collapse: return Keyword.collapse
.discard_: return Keyword.discard_
.preserve: return Keyword.preserve
.preserve_breaks: return Keyword.preserve_breaks
.preserve_spaces: return Keyword.preserve_spaces
.break_spaces: return Keyword.break_spaces
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(WhiteSpaceCollapse).
pub func to_string_white_space_collapse(value: WhiteSpaceCollapse) -> ak.StringView:
match value:
.collapse: return ak.sv("collapse")
.discard_: return ak.sv("discard")
.preserve: return ak.sv("preserve")
.preserve_breaks: return ak.sv("preserve-breaks")
.preserve_spaces: return ak.sv("preserve-spaces")
.break_spaces: return ak.sv("break-spaces")
_: trap("VERIFY_NOT_REACHED")
# mark: WordBreak ===============================================================================
## Web::CSS::WordBreak (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum WordBreak as u8:
normal = 0
keep_all = 1
break_all = 2
break_word = 3
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_word_break.
pub func keyword_to_word_break(keyword: Keyword) -> WordBreak?:
match keyword:
.normal: return WordBreak.normal
.keep_all: return WordBreak.keep_all
.break_all: return WordBreak.break_all
.break_word: return WordBreak.break_word
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(WordBreak).
pub func to_keyword_word_break(word_break_value: WordBreak) -> Keyword:
match word_break_value:
.normal: return Keyword.normal
.keep_all: return Keyword.keep_all
.break_all: return Keyword.break_all
.break_word: return Keyword.break_word
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(WordBreak).
pub func to_string_word_break(value: WordBreak) -> ak.StringView:
match value:
.normal: return ak.sv("normal")
.keep_all: return ak.sv("keep-all")
.break_all: return ak.sv("break-all")
.break_word: return ak.sv("break-word")
_: trap("VERIFY_NOT_REACHED")
# mark: WritingMode =============================================================================
## Web::CSS::WritingMode (Build/Libraries/LibWeb/CSS/Enums.h).
pub enum WritingMode as u8:
horizontal_tb = 0
vertical_rl = 1
vertical_lr = 2
sideways_rl = 3
sideways_lr = 4
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::keyword_to_writing_mode.
pub func keyword_to_writing_mode(keyword: Keyword) -> WritingMode?:
match keyword:
.horizontal_tb: return WritingMode.horizontal_tb
.vertical_rl: return WritingMode.vertical_rl
.vertical_lr: return WritingMode.vertical_lr
.sideways_rl: return WritingMode.sideways_rl
.sideways_lr: return WritingMode.sideways_lr
_: return none
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_keyword(WritingMode).
pub func to_keyword_writing_mode(writing_mode_value: WritingMode) -> Keyword:
match writing_mode_value:
.horizontal_tb: return Keyword.horizontal_tb
.vertical_rl: return Keyword.vertical_rl
.vertical_lr: return Keyword.vertical_lr
.sideways_rl: return Keyword.sideways_rl
.sideways_lr: return Keyword.sideways_lr
_: trap("VERIFY_NOT_REACHED")
## Ported from Build/Libraries/LibWeb/CSS/Enums.cpp Web::CSS::to_string(WritingMode).
pub func to_string_writing_mode(value: WritingMode) -> ak.StringView:
match value:
.horizontal_tb: return ak.sv("horizontal-tb")
.vertical_rl: return ak.sv("vertical-rl")
.vertical_lr: return ak.sv("vertical-lr")
.sideways_rl: return ak.sv("sideways-rl")
.sideways_lr: return ak.sv("sideways-lr")
_: trap("VERIFY_NOT_REACHED")