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

Remove Shadow DOM selectors#281

Merged
simurai merged 16 commits intomasterfrom
sm-shadow-dom
Nov 10, 2016
Merged

Remove Shadow DOM selectors#281
simurai merged 16 commits intomasterfrom
sm-shadow-dom

Conversation

@simurai
Copy link
Contributor

@simurai simurai commented Oct 18, 2016

This PR

  • adds an appendix with a guide how to remove Shadow DOM selectors
  • Removes Shadow DOM selectors from basic-customization
  • adds notes to "Upgrading to 1.0 APIs"

screen shot 2016-10-18 at 8 33 50 pm

Ref: atom/atom#12903


### Removing Shadow DOM styles

In Atom `1.13` the Shadow DOM got removed from text editors. For more background on the reasoning, check out the [Pull Request](https://github.com/atom/atom/pull/12903). In this guide you will learn how to migrate your theme or package.
Copy link
Contributor

@thomasjo thomasjo Oct 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "[...] check out the pull request where it was removed. [...]" or something along those lines?

@simurai simurai changed the title [WIP] Remove Shadow DOM selectors Remove Shadow DOM selectors Oct 18, 2016
---|---|---
`atom-text-editor::shadow {}` | - `::shadow` | `atom-text-editor {}`
`.class /deep/ .class {}` | - `/deep/` | `.class .class {}`
`index.atom-text-editor.less` | - `.atom-text-editor` | `index.less`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't clear that this is a file name whereas all the other examples are CSS selectors. Perhaps remove this line and leave it for the context-specific stylesheets section below?

}
```

__Note__: Selectors like the `.gutter`, `.indent-guide`, `.cursor` etc., that also get styled in Syntax themes, don't need a prefix. __Only__ grammar selectors that get used by language packages. E.g. `.syntax--keyword`, `.syntax--keyword.syntax--operator.syntax--js`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latin abbreviations are hard to understand both for native English speakers and especially for people whom English is not their first language. I suggest replacing "etc" with "among others" and "e.g." with "For example".

#### When should I migrate my theme/package?

- If you already want to test the migration on master or Beta channel, make sure to change your `package.json` file to `"engines": { "atom": ">=1.13.0 <2.0.0" }`. This will prevent Atom from updating your theme or package before the user also updates Atom to version `1.13`.
- Or you can wait until Atom `1.13` reaches __Stable__ (probably beginning of December 2016). Don't worry if you're a bit late, Atom will transform the deprecated selectors automatically to avoid breaking any themes or packages. But users will start to see a deprecation warning in [deprecation-cop](https://github.com/atom/deprecation-cop).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the mention of December 2016. Replace it with a link to https://github.com/atom/atom/releases/tag/v1.13.0 and say that if that link doesn't 404, then v1.13.0 has reached Stable 😀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a neat idea, but the link checker complains. 😩 How about we just link to http://blog.atom.io where it's easy to see if 1.13 is out already.


{{#note}}

**Note:** The Shadow DOM got removed in Atom `1.13`. The `:host` selector described below won't work and should not be used anymore.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"got removed" → "was removed"


{{#note}}

**Note:** The Shadow DOM got removed in Atom `1.13`. The `::shadow` and `/deep/` selectors and the context-targeted style sheets described below won't work and should not be used anymore.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"got removed" → "was removed"

@simurai
Copy link
Contributor Author

simurai commented Oct 20, 2016

@lee-dohm Thanks for your suggestions. 👍

@simurai
Copy link
Contributor Author

simurai commented Nov 10, 2016

Ok, now that the Shadow DOM removal hit Beta, let's publish this so people can update their themes.

@simurai simurai merged commit afa72ba into master Nov 10, 2016
@simurai simurai deleted the sm-shadow-dom branch November 10, 2016 08:50
@Tanapl02 Tanapl02 mentioned this pull request Nov 8, 2021
26 tasks
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.

3 participants