Intent to Remove: style application from stylesheets in HTML imports

84 views
Skip to first unread message

Takayoshi Kochi

unread,
Jan 2, 2018, 8:44:14 AM1/2/18
to blink-dev
Contact email
ko...@chromium.org

Summary
Intent to deprecate was discussed here:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/VZraFwqnp9Y/discussion

Remove applying stylesheets in HTML Imports (via either inline <style> or external
<link rel="stylesheet">) their master document.
We can also remove the chapter 9 of HTML imports spec.

We have been showing deprecation message since M62 with the removal date
M65 (March 2018), so we are removing as originally planned.

Spec
The whole section of style in HTML Imports spec will be removed:
http://w3c.github.io/webcomponents/spec/imports/#style-imports
> The contents of the style elements and the external resources of the link elements in import
> must be considered as input sources of the style processing model [CSS2] of the master
> document.

A reference PR for removing this section:
https://github.com/w3c/webcomponents/pull/642

Motivation
As explained in the intent to deprecate, TL;DR reducing the complexity of the engine,
while its usage and usefulness is low.

Interoperability and Compatibility Risk
The bump in late October last year made it difficult to explain the usage trend.

However as far as the major usage we have seen are within from some of old Polymer's
elements, and for Polymer (1.0+) the element (<custom-style>) has already
been updated to handle this, although even after the update the counter is
still counted because the use counter checks the <style> existence in an import
file before the Polymer code moves the stylesheet to the main document.
Please see https://github.com/Polymer/polymer/issues/4679 for the details.

As no other browsers than Chrome and Opera shipped HTML Imports,
compatibility risk is only within Blink implementation and its users.

Usage information from UseCounter
https://www.chromestatus.com/metrics/feature/timeline/popularity/940
The launch of YouTube new UI affected some increase on this counter, but with the
polymer element update, this removal should not affect on this.

OWP launch tracking bug
http://crbug.com/523952

Entry on the feature dashboard
https://www.chromestatus.com/features/5144752345317376

Notes
We will eventually be deprecating HTML imports as a whole once a concrete successor
gets consensus; Deprecating the style application part is a stepping stone for it.
(see https://crbug.com/766694 for removing HTML imports)

--
Takayoshi Kochi

Daniel Bratell

unread,
Jan 4, 2018, 4:37:11 PM1/4/18
to blink-dev, Takayoshi Kochi
We discussed this at the weekly API owner meeting and there is a shared sense that we don't have enough data to be sure this will not break the web. Looking at the use counter it is still very high and though a portion, or the majority, or even all of it, might be non-critical use, there is no way for us to be sure that is the case. Even if only a small fraction of the counted usages are real, that would be well above traditional cutoff point.

I understand that leaving it around longer than necessary increases the risk that the usage increases but I think that the deprecation warning reduces that risk so we should make sure there are no real users affected already.

Is there something you can do to determine the true use of this feature?

/Daniel
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADP2%3Dhq1zGTZCRww2iH8dFuyXZWgaM6EP5zwQM21qejZKq%3D1Eg%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Takayoshi Kochi

unread,
Jan 5, 2018, 1:25:03 AM1/5/18
to Daniel Bratell, blink-dev
We found that our internal webUI (e.g. chrome://extensions) are still affected by this (crbug/735633), and
are investigating.

So let me suspend this intent for now, and implement somewhat better way of understanding real usage.


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */



--
Takayoshi Kochi

Ashley Gullen

unread,
Jan 5, 2018, 5:46:19 AM1/5/18
to Takayoshi Kochi, Daniel Bratell, blink-dev
Don't know if this helps but this is the code we used to migrate off HTML imports to a JS implementation: https://github.com/AshleyScirra/html-imports-polyfill

I also proposed a replacement feature based on ES6 modules here: https://github.com/AshleyScirra/import-as-and-html-modules

Reply all
Reply to author
Forward
0 new messages