Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Stop using shadow DOM selectors#789

Merged
as-cii merged 1 commit intomasterfrom
as-remove-shadow-dom-styles
Oct 17, 2016
Merged

Stop using shadow DOM selectors#789
as-cii merged 1 commit intomasterfrom
as-remove-shadow-dom-styles

Conversation

@as-cii
Copy link
Contributor

@as-cii as-cii commented Oct 7, 2016

We are in the process of removing the shadow DOM boundary from atom-text-editor elements. This pull request upgrades existing selectors so that they:

  • Stop using :host.
  • Stop using atom-text-editor::shadow.
  • Prepend syntax class names with syntax--.

/cc: @simurai

@as-cii as-cii merged commit 43245bb into master Oct 17, 2016
@as-cii as-cii deleted the as-remove-shadow-dom-styles branch October 17, 2016 10:15
@Alhadis
Copy link
Contributor

Alhadis commented Oct 29, 2016

@as-cii This is raising a warning in Deprecation Cop:

In styles/find-and-replace.less: Style elements within text editors using the atom-text-editor::shadow selector or the .atom-text-editor.less file extension.
If you want to target overlay elements, target them directly or as descendants of atom-overlay elements.

Is this to be expected?

@winstliu
Copy link
Contributor

@Alhadis make sure that if you have fnr apm linked that you've pulled from matter recently.

@Alhadis
Copy link
Contributor

Alhadis commented Oct 29, 2016

Erm. I understood everything except the fnr apm part...

@winstliu
Copy link
Contributor

fnr -> find-and-replace. And I really should have done apm link instead to make it clearer that fnr and apm were unrelated.

@Alhadis
Copy link
Contributor

Alhadis commented Oct 29, 2016

Oh! Right. Well I have, which is why I'm confused...

@as-cii
Copy link
Contributor Author

as-cii commented Oct 29, 2016

Thanks for the report, @Alhadis! I think you might be using a non-dev version of Atom (1.11 stable or 1.12 beta) and have this package linked locally at the same time. Linking newer versions of bundled packages with older versions of Atom is unsupported and could cause undefined behavior. Specifically, I think Atom stable/beta is running some heuristics that made sense when we still used shadow DOM boundaries for <atom-text-editor> elements; recently, however, we have removed such boundaries from editor elements, which is what's causing the older version of Atom you're using to get confused.

If that's the case, I would suggest either building Atom from master or unlinking this package and wait until it gets bundled in a newer official Atom build (1.13 beta/stable). 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants