Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0a1fb8b

Browse files
authoredDec 27, 2022
npm run format
1 parent 18d4aa2 commit 0a1fb8b

7 files changed

+110
-116
lines changed
 

‎CODE_OF_CONDUCT.md

Lines changed: 33 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,75 +2,60 @@
22

33
## Our Pledge
44

5-
In the interest of fostering an open and welcoming environment, we as
6-
contributors and maintainers pledge to making participation in our project and
7-
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, sex characteristics, gender identity and expression,
9-
level of experience, education, socio-economic status, nationality, personal
10-
appearance, race, religion, or sexual identity and orientation.
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
6+
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
7+
disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education,
8+
socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
119

1210
## Our Standards
1311

14-
Examples of behavior that contributes to creating a positive environment
15-
include:
12+
Examples of behavior that contributes to creating a positive environment include:
1613

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
14+
- Using welcoming and inclusive language
15+
- Being respectful of differing viewpoints and experiences
16+
- Gracefully accepting constructive criticism
17+
- Focusing on what is best for the community
18+
- Showing empathy towards other community members
2219

2320
Examples of unacceptable behavior by participants include:
2421

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
22+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
23+
- Trolling, insulting/derogatory comments, and personal or political attacks
24+
- Public or private harassment
25+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
26+
- Other conduct which could reasonably be considered inappropriate in a professional setting
3327

3428
## Our Responsibilities
3529

36-
Project maintainers are responsible for clarifying the standards of acceptable
37-
behavior and are expected to take appropriate and fair corrective action in
38-
response to any instances of unacceptable behavior.
30+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
31+
appropriate and fair corrective action in response to any instances of unacceptable behavior.
3932

40-
Project maintainers have the right and responsibility to remove, edit, or
41-
reject comments, commits, code, wiki edits, issues, and other contributions
42-
that are not aligned to this Code of Conduct, or to ban temporarily or
43-
permanently any contributor for other behaviors that they deem inappropriate,
44-
threatening, offensive, or harmful.
33+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
34+
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
35+
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
4536

4637
## Scope
4738

48-
This Code of Conduct applies both within project spaces and in public spaces
49-
when an individual is representing the project or its community. Examples of
50-
representing a project or community include using an official project e-mail
51-
address, posting via an official social media account, or acting as an appointed
52-
representative at an online or offline event. Representation of a project may be
53-
further defined and clarified by project maintainers.
39+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
40+
project or its community. Examples of representing a project or community include using an official project e-mail
41+
address, posting via an official social media account, or acting as an appointed representative at an online or offline
42+
event. Representation of a project may be further defined and clarified by project maintainers.
5443

5544
## Enforcement
5645

57-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at webcomponentsguide@keithcirkel.co.uk. All
59-
complaints will be reviewed and investigated and will result in a response that
60-
is deemed necessary and appropriate to the circumstances. The project team is
61-
obligated to maintain confidentiality with regard to the reporter of an incident.
62-
Further details of specific enforcement policies may be posted separately.
46+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
47+
webcomponentsguide@keithcirkel.co.uk. All complaints will be reviewed and investigated and will result in a response
48+
that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality
49+
with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
6350

64-
Project maintainers who do not follow or enforce the Code of Conduct in good
65-
faith may face temporary or permanent repercussions as determined by other
66-
members of the project's leadership.
51+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
52+
repercussions as determined by other members of the project's leadership.
6753

6854
## Attribution
6955

70-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
56+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
57+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
7258

7359
[homepage]: https://www.contributor-covenant.org
7460

75-
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
61+
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq

‎CONTRIBUTING.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# Contributing
22

3-
Contributions are always welcome! Before contributing, please read the [code of conduct](https://github.com/WebComponentsGuide/webcomponents.guide/blob/main/CODE_OF_CONDUCT.md).
3+
Contributions are always welcome! Before contributing, please read the
4+
[code of conduct](https://github.com/WebComponentsGuide/webcomponents.guide/blob/main/CODE_OF_CONDUCT.md).
45

56
## Where to start
67

78
- If you've found typos or mistakes in the documentation, please go right ahead and raise a PR!.
8-
- If you're looking for issues to resolve, a good place to start is the [help wanted label](https://github.com/WebComponentsGuide/webcomponents.guide/labels/help%20wanted) and/or [good first issue label](https://github.com/WebComponentsGuide/webcomponents.guide/labels/good%20first%20issue).
9-
- If you have to contribute to bigger pieces, like an idea or new section, tutorial, or blog post, then please raise an issue first! This way we can discuss an action plan and figure out a high level overview of what should be written.
9+
- If you're looking for issues to resolve, a good place to start is the
10+
[help wanted label](https://github.com/WebComponentsGuide/webcomponents.guide/labels/help%20wanted) and/or
11+
[good first issue label](https://github.com/WebComponentsGuide/webcomponents.guide/labels/good%20first%20issue).
12+
- If you have to contribute to bigger pieces, like an idea or new section, tutorial, or blog post, then please raise an
13+
issue first! This way we can discuss an action plan and figure out a high level overview of what should be written.
1014

1115
### Setup
1216

@@ -19,8 +23,10 @@ $ npm install
1923
$ npm start
2024
```
2125

22-
Once this is done you can visit http://localhost:8080/ to see the local copy of the website. As you edit files the website will automatically rebuild, and you can see the changes reflected in your browser.
26+
Once this is done you can visit http://localhost:8080/ to see the local copy of the website. As you edit files the
27+
website will automatically rebuild, and you can see the changes reflected in your browser.
2328

2429
### Running checks/tests
2530

26-
When making contributions, please make sure to run `npm run check`, to ensure your contributions are correctly formatted and spelled. You can also run `npm run format` to automatically format all files.
31+
When making contributions, please make sure to run `npm run check`, to ensure your contributions are correctly formatted
32+
and spelled. You can also run `npm run format` to automatically format all files.

‎learn/components/autonomous-vs-customized-elements.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ tag and extending `HTMLElement`. However, each style comes with different trade-
1010
[defining-a-component]: /learn/components/defining-a-component
1111

1212
Choosing a type of component to build will depend on a lot of factors. _Autonomous Custom Elements_ give you a blank
13-
canvas to work with. _Customized Built-ins_ **extend** the element you're customizing. Here are some considerations to think
14-
about:
13+
canvas to work with. _Customized Built-ins_ **extend** the element you're customizing. Here are some considerations to
14+
think about:
1515

1616
### Tag Name
1717

18-
Perhaps the most obvious difference between the two is that _Autonomous Custom Elements_ get to create an entirely new tag
19-
name, and this means if you're querying for the element in the DOM, you'll need to reference that tag name, e.g.
18+
Perhaps the most obvious difference between the two is that _Autonomous Custom Elements_ get to create an entirely new
19+
tag name, and this means if you're querying for the element in the DOM, you'll need to reference that tag name, e.g.
2020
`.querySelector('fancy-button')` will return the first `<fancy-button>`.
2121

22-
With _Customized Built-in_ elements, the tag name must match the element you're customising. For example if you wanted to
23-
customise a `<button>` element then your HTML will take the shape of `<button is="fancy-button>`. In order to query this
24-
element you'd need to use an _attribute selector_, for example `.querySelector('button[is="fancy-button"]')`. This also
25-
means existing code that queries for `button` elements will also find your _Customized Built-ins_. Calling
26-
`.querySelectorAll('button')` will find all button elements, including ones which are _Customized Built-in elements_. The
27-
way to find _non-Customized Built-ins_ is to use a selector like: `.querySelectorAll('button:not([is])')`.
22+
With _Customized Built-in_ elements, the tag name must match the element you're customising. For example if you wanted
23+
to customise a `<button>` element then your HTML will take the shape of `<button is="fancy-button>`. In order to query
24+
this element you'd need to use an _attribute selector_, for example `.querySelector('button[is="fancy-button"]')`. This
25+
also means existing code that queries for `button` elements will also find your _Customized Built-ins_. Calling
26+
`.querySelectorAll('button')` will find all button elements, including ones which are _Customized Built-in elements_.
27+
The way to find _non-Customized Built-ins_ is to use a selector like: `.querySelectorAll('button:not([is])')`.
2828

2929
This difference in tag name also effects how you'll select for these elements in CSS. There are additional CSS
3030
considerations...
@@ -34,16 +34,16 @@ considerations...
3434
Given _Autonomous Custom Elements_ have their own tag, they are unlikely to conflict with existing CSS. They can have
3535
_classes_ added to them, and so can be styled by existing CSS but it is opt-in.
3636

37-
As _Customised Built-ins_ keep their tags (e.g. `<button is="fancy-button">`) any CSS that has rules like `button {}` will
38-
apply. This means if you have some existing CSS that applies to _built-ins_, it'll also apply to the _Customized built-ins_.
39-
This also includes the default _user agent CSS_.
37+
As _Customised Built-ins_ keep their tags (e.g. `<button is="fancy-button">`) any CSS that has rules like `button {}`
38+
will apply. This means if you have some existing CSS that applies to _built-ins_, it'll also apply to the _Customized
39+
built-ins_. This also includes the default _user agent CSS_.
4040

41-
All _built-ins_ have some _user-agent CSS_ supplied already, for example `div` elements have `display: block;`, `<button>`
42-
elements are styled to look like your operating systems buttons. _Customised Built-ins_ will also get these styles, so
43-
`<button is="fancy-button">` will look the same as `<button>` until you customise it further.
41+
All _built-ins_ have some _user-agent CSS_ supplied already, for example `div` elements have `display: block;`,
42+
`<button>` elements are styled to look like your operating systems buttons. _Customised Built-ins_ will also get these
43+
styles, so `<button is="fancy-button">` will look the same as `<button>` until you customise it further.
4444

45-
If you want to customize a _built-in_ by applying only new styles and not adding any new logic, it might be best to use a
46-
CSS class instead. The main benefit of _Customized Built-ins_ is to extend or add new logic.
45+
If you want to customize a _built-in_ by applying only new styles and not adding any new logic, it might be best to use
46+
a CSS class instead. The main benefit of _Customized Built-ins_ is to extend or add new logic.
4747

4848
If you create an _Autonomous Custom Element_ (e.g. `<fancy-button>`) you'll need to style it from scratch as _Autonomous
4949
Custom Elements_ have no default CSS. You will probably want to add some CSS to these elements - even if it's just
@@ -54,8 +54,8 @@ One other thing to think about with regard to styling is _encapsulated styles_ w
5454
### ShadowDOM
5555

5656
_Autonomous Custom Elements_ can make use of the [_ShadowDOM_][shadowdom]. Only a limited set of _built-ins_ can use the
57-
_ShadowDOM_. If you want to alter any nested elements, it's a great idea to use _ShadowDOM_, and so you probably won't want
58-
to customise a _built-in_. Here's a list of _built-ins_ that you can customise with _ShadowDOM_:
57+
_ShadowDOM_. If you want to alter any nested elements, it's a great idea to use _ShadowDOM_, and so you probably won't
58+
want to customise a _built-in_. Here's a list of _built-ins_ that you can customise with _ShadowDOM_:
5959

6060
- `<article>`
6161
- `<aside>`
@@ -70,13 +70,13 @@ to customise a _built-in_. Here's a list of _built-ins_ that you can customise w
7070
- `<section>`
7171
- `<span>`
7272

73-
_ShadowDOM_ can be really useful for providing encapsulated markup and styles. Styles within _ShadowDOM_ don't
74-
effect the rest of the page, and so it can be a really useful place to add styles to your elements. If this is a high
75-
priority, you might find using an _Autonomous Custom Element_ to be a better choice than the limited set of built-ins
76-
which can use _ShadowDOM_.
73+
_ShadowDOM_ can be really useful for providing encapsulated markup and styles. Styles within _ShadowDOM_ don't effect
74+
the rest of the page, and so it can be a really useful place to add styles to your elements. If this is a high priority,
75+
you might find using an _Autonomous Custom Element_ to be a better choice than the limited set of built-ins which can
76+
use _ShadowDOM_.
7777

78-
_ShadowDOM_ also provides elements with the ability to chose how nested elements render. An ability that many _built-ins_
79-
already have...
78+
_ShadowDOM_ also provides elements with the ability to chose how nested elements render. An ability that many
79+
_built-ins_ already have...
8080

8181
[shadowdom]: /learn/components/shadowdom
8282

@@ -85,11 +85,11 @@ already have...
8585
Many _built-in_ elements will only allow certain tags to nest inside ([you can read more about _Content Categories_ on
8686
MDN][content-categories]). For example a `<button>` tag only allows _[phrasing content]_ tags like `<b>`, `<strong>`,
8787
`<span>` and so on. Some elements, for example the `<details>` element will have specific associations with other
88-
elements. A `<summary>` tag can only exist as the _first child_ to a `<details>` element, and if it doesn't exist, it will
89-
be created by the `<details>` tag.
88+
elements. A `<summary>` tag can only exist as the _first child_ to a `<details>` element, and if it doesn't exist, it
89+
will be created by the `<details>` tag.
9090

91-
_Customized Built-ins_ match the semantics of the _built-in_ they're customising, and that cannot be changed. So for example
92-
a `<button is="fancy-button">` will only allow nested _[phrasing content][phrasing-content]_ tags just like a
91+
_Customized Built-ins_ match the semantics of the _built-in_ they're customising, and that cannot be changed. So for
92+
example a `<button is="fancy-button">` will only allow nested _[phrasing content][phrasing-content]_ tags just like a
9393
`<button>`.
9494

9595
_Autonomous Custom Elements_ allow any nested tag by default. This can be customised with _ShadowDOM_, but the default
@@ -121,15 +121,15 @@ into issues with code that isn't expecting to see the newly added logic.
121121

122122
### Accessibility
123123

124-
_Customised Built-ins_ have very good accessibility information built right into them. Most have an _implicit role_ which
125-
means that assistive technologies know how to interpret them. For example using a _screen reader_, it is possible to
126-
navigate through all of the headings in a webpage, and the purpose of form controls is explained as each one is focused
127-
(e.g. buttons are read out not only by their label but also referred to as "buttons").
124+
_Customised Built-ins_ have very good accessibility information built right into them. Most have an _implicit role_
125+
which means that assistive technologies know how to interpret them. For example using a _screen reader_, it is possible
126+
to navigate through all of the headings in a webpage, and the purpose of form controls is explained as each one is
127+
focused (e.g. buttons are read out not only by their label but also referred to as "buttons").
128128

129129
_Autonomous Custom Elements_, on the other hand, do not have any accessibility information built into them. Assistive
130-
technologies such as _screen readers_ will read the contents of the element as if it were plain text; treating it the same
131-
as a `<div>` or `<span>`. It's possible to customise how assistive technology like _screen readers_ handle your element by
132-
using the [Accessible Internet Rich Applications (or ARIA)][aria] APIs, such as the `role=` attribute.
130+
technologies such as _screen readers_ will read the contents of the element as if it were plain text; treating it the
131+
same as a `<div>` or `<span>`. It's possible to customise how assistive technology like _screen readers_ handle your
132+
element by using the [Accessible Internet Rich Applications (or ARIA)][aria] APIs, such as the `role=` attribute.
133133

134134
Accessibility can be hard to get right. Many assistive tools behave differently, and much like browsers, support is not
135135
universal and consistent. It's always worth getting comfortable with these tools, and testing your web applications

‎learn/components/defining-a-component.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ _Custom Elements Registry_ to attach your class so the browser knows to use it.
99

1010
Without the _Custom Element Registry_ the browser won't know what JavaScript to associate to what elements. By default,
1111
whenever the browser encounters a tag it does not know, it will use the `HTMLUnknownElement` class to give it a default
12-
behaviour. You can tell the browser to use a different class by _defining_ the tag name in the _Custom Element Registry_.
13-
With your own class _defined_, any time the browser sees the defined tag, it will set it up using the _associated class_.
12+
behaviour. You can tell the browser to use a different class by _defining_ the tag name in the _Custom Element
13+
Registry_. With your own class _defined_, any time the browser sees the defined tag, it will set it up using the
14+
_associated class_.
1415

1516
To define a _Custom Element_, you can use the global `customElements` API. You won't need to include any JavaScript
1617
libraries to use `customElements`, it's a global that already exists, like `console` or `localStorage`. There are two
@@ -48,10 +49,11 @@ message like `autonomous custom elements must extend HTMLElement`.
4849
## Customized Built-in Elements
4950

5051
_Customized Built-in_ elements are extensions to the browsers existing _built-in_ elements. For example if you wanted to
51-
make a button extends the normal behaviours, you can customise it with a _Customized Built-in_. Instead of making up your
52-
own tag name, you'll use the same tag as the _built-in_ you're targeting. Your class will also have to extend from the
53-
existing _built-in's_ class. For example extending the `<button>` element means your class will need to `extends HTMLButtonElement`. When
54-
you call `customElements.define` you will need to tell it that you're extending a _built-in_ tag:
52+
make a button extends the normal behaviours, you can customise it with a _Customized Built-in_. Instead of making up
53+
your own tag name, you'll use the same tag as the _built-in_ you're targeting. Your class will also have to extend from
54+
the existing _built-in's_ class. For example extending the `<button>` element means your class will need to
55+
`extends HTMLButtonElement`. When you call `customElements.define` you will need to tell it that you're extending a
56+
_built-in_ tag:
5557

5658
```js
5759
customElements.define(
@@ -181,11 +183,9 @@ Another thing you could do is move the definition into a static method on the cl
181183

182184
```js
183185
class MyElement extends HTMLElement {
184-
185186
static define() {
186187
customElements.define("my-element", MyElement)
187188
}
188-
189189
}
190190
```
191191

‎learn/components/naming-your-components.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ Try typing a tag name below to see if it's a valid custom element tag:
3939

4040
### Reserved tag names
4141

42-
Some names are **disallowed** because they have existed in the _HTML spec_ before _custom elements_ were added. These are:
42+
Some names are **disallowed** because they have existed in the _HTML spec_ before _custom elements_ were added. These
43+
are:
4344

4445
- `annotation-xml`
4546
- `color-profile`
@@ -58,19 +59,20 @@ DOMException: CustomElementRegistry.define: 'annotation-xml' is not a valid cust
5859

5960
## Tips on naming element
6061

61-
While none of the following is prescriptive, here are some tips and tricks on how to pick a good name for your _custom elements_:
62+
While none of the following is prescriptive, here are some tips and tricks on how to pick a good name for your _custom
63+
elements_:
6264

6365
### Avoid splitting compound words
6466

65-
It can be tricky to think of two words for every element, so it might be tempting to add a dash inside a compound word.
67+
It can be tricky to think of two words for every element, so it might be tempting to add a dash inside a compound word.
6668
For example splitting "tooltip" into `tool-tip` or "overlay" into `over-lay`. Adding dashes to compound words like this
67-
can look a little confusing so it might be beneficial to spend the effort and think of another word to add to these,
68-
for example `tooltip-popover` or `overlay-dialog`.
69+
can look a little confusing so it might be beneficial to spend the effort and think of another word to add to these, for
70+
example `tooltip-popover` or `overlay-dialog`.
6971

7072
### Using names from existing elements
7173

7274
If your _Autonomous Custom Element_ borrows concepts from other _built-ins_ then you could make up a similar name. For
73-
example `fancy-button` for an element like `<button>`, `color-input` for an element like `<input>`, or `radial-meter`
75+
example `fancy-button` for an element like `<button>`, `color-input` for an element like `<input>`, or `radial-meter`
7476
for an element like `<meter>`. You might want to avoid doing this for all except _Customised Built-ins_. If your element
7577
doesn't share anything in common with an existing _built-in_, then it's best to avoid having a similar name, as it might
7678
cause confusion.
@@ -83,22 +85,23 @@ unclear what they do until you familiarise yourself with them. Good components h
8385
clear!
8486

8587
Conversely using difficult to spell words can cause errors and typos more often. It's best to avoid difficult to spell
86-
element names like `<abbreviated-text>` or `<widget-accessory>`. Words longer than 10 characters tend to be difficult
87-
to spell, so try to avoid those. Words with double letters (abbreviated, occasion, accommodate) can be tricky too. Words
88+
element names like `<abbreviated-text>` or `<widget-accessory>`. Words longer than 10 characters tend to be difficult to
89+
spell, so try to avoid those. Words with double letters (abbreviated, occasion, accommodate) can be tricky too. Words
8890
using different letters with the same sound (necessary, accessory) often get misspelled. Words with "silent" consanants
89-
(knack, assign, doubt) are difficult, especially people whom English is not their first language. In these cases it might
90-
be better to replace a hard to spell word with a simpler word, e.g. `<abbreviated-text>` could be come `<short-text>`, `<approximate-date>` could be `<rounded-date>`. Alternatively you could replace one hard to spell word with two easier to
91-
spell words that mean the same thing, for example `<establish-account>` could be `<set-up-account>`.
91+
(knack, assign, doubt) are difficult, especially people whom English is not their first language. In these cases it
92+
might be better to replace a hard to spell word with a simpler word, e.g. `<abbreviated-text>` could be come
93+
`<short-text>`, `<approximate-date>` could be `<rounded-date>`. Alternatively you could replace one hard to spell word
94+
with two easier to spell words that mean the same thing, for example `<establish-account>` could be `<set-up-account>`.
9295

9396
Tag names don't have to use a single dash! Names like `<auto-complete-input>` or `<ajax-form-provider>` are valid, and
9497
can sometimes be clearer! However just like long methods or class names they can be overly verbose which makes them
9598
tiresome to read and type. It's good to avoid generic "filler" words that don't add to the meaning, like `wrapper`,
9699
`provider`, `effect`, or `element`.
97100

98101
Some design systems will prefix their _Web Components_ with a branding. For example all of [Adobe Spectrum's][spectrum]
99-
_Web Components_ are prefixed `<sp-`, [Shoelace Components][shoelace] are prefixed `<sl-`. This can be useful, as you can
100-
easily tell apart a component from a design system to a generic off-the-shelf component. On the other hand, this makes
101-
every component name longer.
102+
_Web Components_ are prefixed `<sp-`, [Shoelace Components][shoelace] are prefixed `<sl-`. This can be useful, as you
103+
can easily tell apart a component from a design system to a generic off-the-shelf component. On the other hand, this
104+
makes every component name longer.
102105

103106
[spectrum]: https://opensource.adobe.com/spectrum-web-components/
104107
[shoelace]: https://shoelace.style/

‎learn/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ _Web Components_ are a native way for web developers to build user interfaces. T
1010
you don't have to download any framework to get started! _Web Components_ fit right into your existing HTML today. If
1111
you've got a server that can render HTML, then you can render Web Components!
1212

13-
_Web Components_ allow you to extend the vocabulary of your HTML. You can define new behaviors that go beyond the built in
14-
tags. New features such as `<slide-out-menu>` or `<stop-watch>` are at your finger tips. JavaScript can drive these
13+
_Web Components_ allow you to extend the vocabulary of your HTML. You can define new behaviors that go beyond the built
14+
in tags. New features such as `<slide-out-menu>` or `<stop-watch>` are at your finger tips. JavaScript can drive these
1515
definitions, allowing advanced behaviors and interactions.
1616

1717
{% tip %}

‎learn/your-first-web-component.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ you've written JavaScript for the web before, you might already be familiar with
1111
APIs.
1212

1313
_Web Components_ go further to add a powerful set of additional APIs. One of those is [_Custom
14-
Elements_][defining-a-component] which allows you to define your own HTML Elements. _Web Components_ can also make use of
15-
[_ShadowDOM_][shadowdom] which is a powerful API that allows you to manage how an element is rendered.
14+
Elements_][defining-a-component] which allows you to define your own HTML Elements. _Web Components_ can also make use
15+
of [_ShadowDOM_][shadowdom] which is a powerful API that allows you to manage how an element is rendered.
1616

1717
[classes]: /learn/javascript/classes
1818
[events]: /learn/javascript/events

0 commit comments

Comments
 (0)
Please sign in to comment.