You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/style-guide/README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -292,7 +292,7 @@ Alternatively, we can use a `<template>` tag with `v-for` to wrap the `<li>` ele
292
292
293
293
**For applications, styles in a top-level `App` component and in layout components may be global, but all other components should always be scoped.**
294
294
295
-
This is only relevant for [single-file components](../guide/single-file-components.html). It does _not_ require that the [`scoped` attribute](https://vue-loader.vuejs.org/en/features/scoped-css.html) be used. Scoping could be through [CSS modules](https://vue-loader.vuejs.org/en/features/css-modules.html), a class-based strategy such as [BEM](http://getbem.com/), or another library/convention.
295
+
This is only relevant for [single-file components](../guide/single-file-component.html). It does _not_ require that the [`scoped` attribute](https://vue-loader.vuejs.org/en/features/scoped-css.html) be used. Scoping could be through [CSS modules](https://vue-loader.vuejs.org/en/features/css-modules.html), a class-based strategy such as [BEM](http://getbem.com/), or another library/convention.
296
296
297
297
**Component libraries, however, should prefer a class-based strategy instead of using the `scoped` attribute.**
**Filenames of [single-file components](../guide/single-file-components.html) should either be always PascalCase or always kebab-case.**
516
+
**Filenames of [single-file components](../guide/single-file-component.html) should either be always PascalCase or always kebab-case.**
517
517
518
518
PascalCase works best with autocompletion in code editors, as it's consistent with how we reference components in JS(X) and templates, wherever possible. However, mixed case filenames can sometimes create issues on case-insensitive file systems, which is why kebab-case is also perfectly acceptable.
**Components with no content should be self-closing in [single-file components](../guide/single-file-components.html), string templates, and [JSX](../guide/render-function.html#JSX) - but never in DOM templates.**
797
+
**Components with no content should be self-closing in [single-file components](../guide/single-file-component.html), string templates, and [JSX](../guide/render-function.html#JSX) - but never in DOM templates.**
798
798
799
799
Components that self-close communicate that they not only have no content, but are **meant** to have no content. It's the difference between a blank page in a book and one labeled "This page intentionally left blank." Your code is also cleaner without the unnecessary closing tag.
800
800
@@ -830,7 +830,7 @@ Unfortunately, HTML doesn't allow custom elements to be self-closing - only [off
830
830
831
831
### Component name casing in templates <supdata-p="b">strongly recommended</sup>
832
832
833
-
**In most projects, component names should always be PascalCase in [single-file components](../guide/single-file-components.html) and string templates - but kebab-case in DOM templates.**
833
+
**In most projects, component names should always be PascalCase in [single-file components](../guide/single-file-component.html) and string templates - but kebab-case in DOM templates.**
834
834
835
835
PascalCase has a few advantages over kebab-case:
836
836
@@ -1422,7 +1422,7 @@ computed: {
1422
1422
1423
1423
### Single-file component top-level element order <supdata-p="c">recommended</sup>
1424
1424
1425
-
**[Single-file components](../guide/single-file-components.html) should always order `<script>`, `<template>`, and `<style>` tags consistently, with `<style>` last, because at least one of the other two is always necessary.**
1425
+
**[Single-file components](../guide/single-file-component.html) should always order `<script>`, `<template>`, and `<style>` tags consistently, with `<style>` last, because at least one of the other two is always necessary.**
0 commit comments