mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
LibWeb: Add basic support for the attr() CSS function
CSS Values and Units Module Level 5 defines attr as: `attr(<q-name> <attr-type>?, <declaration-value>?)` This implementation does not contain support for the type argument, effectively supporting `attr(<q-name>, <declaration-value>?)`
This commit is contained in:
parent
ba6ba67fa0
commit
6437f5da36
4 changed files with 56 additions and 19 deletions
|
@ -151,6 +151,14 @@ public:
|
|||
Position const& start_position() const { return m_start_position; }
|
||||
Position const& end_position() const { return m_end_position; }
|
||||
|
||||
static Token of_string(FlyString str)
|
||||
{
|
||||
Token token;
|
||||
token.m_type = Type::String;
|
||||
token.m_value = move(str);
|
||||
return token;
|
||||
}
|
||||
|
||||
private:
|
||||
Type m_type { Type::Invalid };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue