Skip to content

Correct punctuation and other errors #55

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/03-code-internals/24-customizing-topic-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Plugin outlets can be used to inject content into existing cells on desktop, or

## Replacing the entire topic-list-item

If you want to completely replace the core topic-list-item implementation, then you can use the `topic-list-item` Wrapper Plugin Outlet. This should only be done when your design differs so much from core that you don't want it to be affected by future core changes, and you don't need it to be compatible with other themes / plugins.
If you want to completely replace the core topic-list-item implementation, then you can use the `topic-list-item` Wrapper Plugin Outlet. This should only be done when your design differs so much from core that you don't want it to be affected by future core changes, and you don't need it to be compatible with other themes/plugins.

If using this strategy, you should take extra care to ensure that your code is well tested, and you should make sure that your theme/plugin users are aware of the caveats.

Expand Down
8 changes: 4 additions & 4 deletions docs/07-theme-developer-tutorial/03-css.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ As we touched on in the last chapter, the main entrypoint for theme CSS is the `

You can also use `desktop/desktop.scss` and `mobile/mobile.scss`, although we're increasingly moving away from these separate files and towards breakpoint-based styling in `common.scss`.

But for more complex situations, you can put additional scss in files like `/stylesheets/my-styles.scss`, and import from `common.scss` like `@import "my-styles";`
But for more complex situations, you can put additional scss in files like `/stylesheets/my-styles.scss`, and import from `common.scss` like `@import "my-styles";`.

## Using variables

Expand All @@ -35,14 +35,14 @@ Let's make use of this knowledge by updating our theme to use the theme colors f

Great! Now your banner's colors will match the site color scheme, and automatically adjust based on light/dark modes.

For more information about the variables available, check out [this document](https://meta.discourse.org/t/77551)
For more information about the variables available, check out [this document](https://meta.discourse.org/t/77551).

## Finding CSS selectors to style

The number of elements and classes in Discourse can feel quite overwhelming from a re-styling standpoint. The key to having a maintainable theme is to keep your changes as small as possible, and match the selectors used in Discourse core's stylesheets.

For example, let's assume you want to style all the buttons in Discourse. One approach would be to use DevTools and try to find every variation of every button and style it. But a better approach would be to see how core is styling buttons, and base your approach on that.

To explore re-styling Discourse in more detail, check out [the Designer's guide to Discourse themes](https://meta.discourse.org/t/152002)
To explore re-styling Discourse in more detail, check out [the Designer's guide to Discourse themes](https://meta.discourse.org/t/152002).

Or if you're ready to explore more ways to add/change content in Discourse, let's go to the [next chapter](https://meta.discourse.org/t/357799)
Or if you're ready to explore more ways to add/change content in Discourse, let's go to the [next chapter](https://meta.discourse.org/t/357799).
2 changes: 1 addition & 1 deletion docs/07-theme-developer-tutorial/04-outlets.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ If you want to re-render the wrapped core implementation inside your component,

## Conclusion

Now we know how to create and insert content across the whole of Discourse, we'll explore some more advanced concepts you can use in your components. See [the next chapter](https://meta.discourse.org/t/357800)
Now we know how to create and insert content across the whole of Discourse, we'll explore some more advanced concepts you can use in your components. See [the next chapter](https://meta.discourse.org/t/357800).
6 changes: 3 additions & 3 deletions docs/07-theme-developer-tutorial/06-js-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default apiInitializer((api) => {

### headerIcons

`api.headerIcons` will allow you to add, remove and re-arrange icons in the header. For example, to add a new icon before the search icon, you'd do something like
`api.headerIcons` will allow you to add, remove and re-arrange icons in the header. For example, to add a new icon before the search icon, you'd do something like:

```gjs
import DButton from "discourse/components/d-button";
Expand Down Expand Up @@ -54,7 +54,7 @@ export default apiInitializer((api) => {
api.replaceIcon(source, destination);
```

With this method, you can easily replace any Discourse icon with another. For example, we have [a theme component](https://meta.discourse.org/t/change-the-like-icon/87748) that replaces the heart icon for like with a thumbs-up icon
With this method, you can easily replace any Discourse icon with another. For example, we have [a theme component](https://meta.discourse.org/t/change-the-like-icon/87748) that replaces the heart icon for like with a thumbs-up icon.

### decorateCookedElement()

Expand Down Expand Up @@ -99,7 +99,7 @@ export default apiInitializer((api) => {
api.registerValueTransformer("home-logo-href", () => "https://example.com");
```

For more information on Transformers, check out the [dedicated guide](https://meta.discourse.org/t/349954)
For more information on Transformers, check out the [dedicated guide](https://meta.discourse.org/t/349954).

## Finding more JS API methods

Expand Down
Loading