WICG / canvas-formatted-text

Other
80 stars 17 forks source link

assigned style vs computed style #11

Open travisleithead opened 3 years ago

travisleithead commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

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