ladybird/Userland/Libraries/LibWeb/CSS/CSSRule.cpp
Andreas Kling 3db847c64a LibWeb: Implement CSSRule and CSSStyleDeclaration serialization
There are a handful of FIXME's here, but this seems generally good.
Note that CSS *values* don't get serialized in a spec-compliant way
since we currently rely on StyleValue::to_string() which is ad-hoc.
2021-10-01 20:17:15 +02:00

28 lines
532 B
C++

/*
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/CSS/CSSRule.h>
namespace Web::CSS {
CSSRule::~CSSRule()
{
}
// https://drafts.csswg.org/cssom/#dom-cssrule-csstext
String CSSRule::css_text() const
{
// The cssText attribute must return a serialization of the CSS rule.
return serialized();
}
// https://drafts.csswg.org/cssom/#dom-cssrule-csstext
void CSSRule::set_css_text(StringView)
{
// On setting the cssText attribute must do nothing.
}
}