Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<style> should use child text content changed steps #2996

Closed
domenic opened this issue Sep 3, 2017 · 0 comments
Closed

<style> should use child text content changed steps #2996

domenic opened this issue Sep 3, 2017 · 0 comments
Assignees
Labels
clarification Standard could be clearer topic: style

Comments

@domenic
Copy link
Member

domenic commented Sep 3, 2017

Currently it says

The element is not on the stack of open elements of an HTML parser or XML parser, and one of its child nodes is modified by a script.

This should be formalized, probably by using the somewhat-new child text content changed steps. However, this would probably depend on #2995, since XML-based styling languages need something more like "descendant changed steps".

See also:

For styling languages that consist of pure text (as opposed to XML), a style element's style data is the child text content of the style element. For XML-based styling languages, the style data consists of all the child nodes of the style element.

It's also worth testing that it truly is child text content, and not descendant text content (i.e. the value of textContent), by using DOM manipulation APIs to insert child nodes that wrap extra style rules (e.g. <span>s or even <style>s), and ensuring that those rules are not applied.

If we can resolve #2995 one way or another we can morph this into a "good first bug".

@domenic domenic added the clarification Standard could be clearer label Sep 3, 2017
@domenic domenic self-assigned this Sep 7, 2017
domenic added a commit that referenced this issue Sep 8, 2017
* De-genericizes <style> and <link rel="stylesheet"> to only deal with
  CSS. Fixes #2995.
* Makes type="" on <style> "obsolete but conforming", since it is always
  redundant.
* Makes type="(a JS MIME type)" on <script> obsolete but conforming as
  well. Previously we had a "should" requirement but had not recorded it
  in the centralized obsolete-but-conforming section that collects such
  requirements.
* Makes <style> operate on child text content. Fixes #2996.
* Adds pointers to #2997.
* Makes it clearer that parameters are not allowed in the content type
  value for script or style. Fixes #3022.
domenic added a commit that referenced this issue Sep 8, 2017
* De-genericizes <style> and <link rel="stylesheet"> to only deal with
  CSS. Fixes #2995.
* Makes type="" on <style> "obsolete but conforming", since it is always
  redundant.
* Makes type="(a JS MIME type)" on <script> obsolete but conforming as
  well. Previously we had a "should" requirement but had not recorded it
  in the centralized obsolete-but-conforming section that collects such
  requirements.
* Makes <style> operate on child text content. Fixes #2996.
* Replaces the conformance requirement (noted in the source as
  "temporary") prohibiting unmatched comment-like syntax inside <style>
  with a conformance requirement to be valid CSS.
* Adds pointers to #2997.
* Makes it clearer that parameters are not allowed in the content type
  value for script or style. Fixes #3022.
annevk pushed a commit that referenced this issue Sep 14, 2017
* De-genericizes <style> and <link rel="stylesheet"> to only deal with
  CSS. Fixes #2995.
* Makes type="" on <style> "obsolete but conforming", since it is always
  redundant.
* Makes type="(a JS MIME type)" on <script> obsolete but conforming as
  well. Previously we had a "should" requirement but had not recorded it
  in the centralized obsolete-but-conforming section that collects such
  requirements.
* Makes <style> operate on child text content. Fixes #2996.
* Replaces the conformance requirement (noted in the source as
  "temporary") prohibiting unmatched comment-like syntax inside <style>
  with a conformance requirement to be valid CSS.
* Adds pointers to #2997.
* Makes it clearer that parameters are not allowed in the content type
  value for script or style. Fixes #3022.
alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
* De-genericizes <style> and <link rel="stylesheet"> to only deal with
  CSS. Fixes whatwg#2995.
* Makes type="" on <style> "obsolete but conforming", since it is always
  redundant.
* Makes type="(a JS MIME type)" on <script> obsolete but conforming as
  well. Previously we had a "should" requirement but had not recorded it
  in the centralized obsolete-but-conforming section that collects such
  requirements.
* Makes <style> operate on child text content. Fixes whatwg#2996.
* Replaces the conformance requirement (noted in the source as
  "temporary") prohibiting unmatched comment-like syntax inside <style>
  with a conformance requirement to be valid CSS.
* Adds pointers to whatwg#2997.
* Makes it clearer that parameters are not allowed in the content type
  value for script or style. Fixes whatwg#3022.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer topic: style
Development

No branches or pull requests

2 participants