Skip to content

[Doc EN]: remove Single-file component top-level element order from style-guide/index.md #1275

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

Merged
merged 10 commits into from
Nov 13, 2017
12 changes: 6 additions & 6 deletions src/v2/style-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1476,15 +1476,15 @@ computed: {

### Single-file component top-level element order <sup data-p="c">recommended</sup>

**[Single-file components](../guide/single-file-components.html) should always order `<template>`, `<script>`, and `<style>` tags consistently, with `<style>` last, because at least one of the other two is always necessary.**
**[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.**

{% raw %}<div class="style-example example-bad">{% endraw %}
#### Bad

``` html
<style>/* ... */</style>
<template>...</template>
<script>/* ... */</script>
<template>...</template>
```

``` html
Expand All @@ -1505,25 +1505,25 @@ computed: {

``` html
<!-- ComponentA.vue -->
<template>...</template>
<script>/* ... */</script>
<template>...</template>
<style>/* ... */</style>

<!-- ComponentB.vue -->
<template>...</template>
<script>/* ... */</script>
<template>...</template>
<style>/* ... */</style>
```

``` html
<!-- ComponentA.vue -->
<script>/* ... */</script>
<template>...</template>
<script>/* ... */</script>
<style>/* ... */</style>

<!-- ComponentB.vue -->
<script>/* ... */</script>
<template>...</template>
<script>/* ... */</script>
<style>/* ... */</style>
```
{% raw %}</div>{% endraw %}
Expand Down