Coverage Report

Created: 2025-08-28 06:26

/src/serenity/Userland/Libraries/LibWeb/CSS/StyleValues/CSSUnitValue.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (c) 2024, Sam Atkins <sam@ladybird.org>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#pragma once
8
9
#include <AK/FlyString.h>
10
#include <LibWeb/CSS/StyleValues/CSSNumericValue.h>
11
12
namespace Web::CSS {
13
14
// https://drafts.css-houdini.org/css-typed-om-1/#cssunitvalue
15
class CSSUnitValue : public CSSNumericValue {
16
public:
17
    virtual ~CSSUnitValue() override = default;
18
19
    virtual double value() const = 0;
20
    virtual StringView unit() const = 0;
21
22
protected:
23
    explicit CSSUnitValue(Type type)
24
0
        : CSSNumericValue(type)
25
0
    {
26
0
    }
27
};
28
29
}