mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 05:10:57 +00:00 
			
		
		
		
	 8952764267
			
		
	
	
		8952764267
		
	
	
	
	
		
			
			CSS-Typed-OM has the following hierarchy:
CSSStyleValue
- CSSNumericValue
  - CSSUnitValue
  - CSSMathValue
    - ...various math functions...
Somewhat unintuitively, numbers are also stored using CSSUnitValue with
`unit = "number"`.
There are no distinct classes for LengthStyleValue, etc in the spec, but
they're convenient for us, so they are implemented as subclasses of
CSSUnitValue, at least for now.
		
	
			
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			452 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			452 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2024, Sam Atkins <sam@ladybird.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibWeb/CSS/CSSStyleValue.h>
 | |
| 
 | |
| namespace Web::CSS {
 | |
| 
 | |
| // https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue
 | |
| class CSSNumericValue : public CSSStyleValue {
 | |
| public:
 | |
|     virtual ~CSSNumericValue() override = default;
 | |
| 
 | |
| protected:
 | |
|     explicit CSSNumericValue(Type type)
 | |
|         : CSSStyleValue(type)
 | |
|     {
 | |
|     }
 | |
| };
 | |
| 
 | |
| }
 |