PHP-CSS-Parser icon indicating copy to clipboard operation
PHP-CSS-Parser copied to clipboard

Rework our class structure and naming to match the official specs

Open oliverklee opened this issue 1 year ago • 2 comments

https://www.w3.org/TR/cssom-1/ https://www.w3.org/TR/css-syntax-3/

We'll probably need to use PHP class aliases and deprecate a lot of things.

oliverklee avatar Jun 22 '24 09:06 oliverklee

I'm not so sure.

The referenced documents are not an object model, but a syntax.

Current class hierarchy seems to fit. At least for me. But, yes, please review.

JakeQZ avatar Jun 23 '24 00:06 JakeQZ

Actually, I think there are some misnomers. E.g. the current Rule\Rule class should be a Declaration or CssDeclaration in some namespace (ref). And the Rule and Property namespaces seem to be transposed from their current official definitions: a 'rule' is an enclosing block; a 'property' is a single value.

JakeQZ avatar Jun 26 '24 01:06 JakeQZ