canvas-formatted-text icon indicating copy to clipboard operation
canvas-formatted-text copied to clipboard

assigned style vs computed style

Open travisleithead opened this issue 4 years ago • 2 comments
trafficstars

It may be good to differentiate between CSS properties assigned by the author, and whether those properties were applied in any way. For example, to support testing of what properties are/will be applied, and which are ignored by a given implementation.

travisleithead avatar Mar 19 '21 18:03 travisleithead

For the most part, we can't identify too many scenarios where scraping the applied styles actually matter when you have full metrics information. One use case not handled is feature-detection of what styles are supported, and that should be considered.

travisleithead avatar Aug 19 '21 01:08 travisleithead

With the addition of a FormattedTextStyle object that parses CSS, presumably only for this scenario, we could have non-relevant CSS dropped at parsing time allowing introspection of the results to help determine what CSS is supported by the implementation?

See PR https://github.com/WICG/canvas-formatted-text/pull/39

travisleithead avatar Feb 02 '22 19:02 travisleithead