https://drafts.csswg.org/cssom/#resolved-values
width
...
If the property applies to the element or pseudo-element and the resolved value of the display property is not none or contents, then the resolved value is the used value. Otherwise the resolved value is the computed value.
See web-platform-tests/wpt#7020
What should happen for getComputedStyle(el, '::before').width if el has no ::before box generated? This appears to not be particularly well defined.
https://drafts.csswg.org/cssom/#terminology says
In this specification the ::before and ::after pseudo-elements are assumed to exist for all elements even if no box is generated for them.