Skip to content

Commit b1086ec

Browse files
slusarzsirainen
authored andcommitted
components: SettingsComponent - Semantically improve document structure
Additionally, abstract right alignment to CSS class
1 parent 07f255e commit b1086ec

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

components/SettingsComponent.vue

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ const d = Object.fromEntries(Object.entries(data).filter(([k, v]) =>
4444
.badgePadding :deep(p) {
4545
margin: 4px;
4646
}
47-
.settingsList h3:first-of-type {
47+
.settingsList article:first-of-type {
4848
border-top-width: 0;
49-
padding-top: 0;
5049
}
51-
.settingsList h3 {
50+
.settingsList article {
5251
border-top: 1px solid var(--vp-c-divider);
52+
}
53+
.settingsList h3 {
5354
margin-top: 18px;
54-
padding-top: 18px;
5555
}
56-
.settingsList .rightAlign {
56+
.settingsListTable th {
5757
text-align: right;
5858
}
5959
.settingsListTable :deep(ul) {
@@ -67,7 +67,7 @@ const d = Object.fromEntries(Object.entries(data).filter(([k, v]) =>
6767
6868
<template>
6969
<section class="settingsList">
70-
<template v-for="(v, k) in d">
70+
<article v-for="(v, k) in d">
7171
<component :is="'h' + level" :id="k" tabindex="-1">
7272
<code>{{ k }}</code>
7373
<a class="header-anchor" :href="'#' + k"></a>
@@ -76,38 +76,38 @@ const d = Object.fromEntries(Object.entries(data).filter(([k, v]) =>
7676
<table class="settingsListTable">
7777
<tbody>
7878
<tr>
79-
<th class="rightAlign">Default</th>
79+
<th>Default</th>
8080
<td>
8181
<span v-if="v.default" v-html="v.default" />
8282
<em v-else>[None]</em>
8383
</td>
8484
</tr>
8585
<tr>
86-
<th class="rightAlign">Value</th>
86+
<th>Value</th>
8787
<td>
8888
<span class="comma" v-for="v in v.values" v-html="v.url" />
8989
</td>
9090
</tr>
9191
<tr v-if="v.values_enum.length">
92-
<th class="rightAlign">Allowed Values</th>
92+
<th>Allowed Values</th>
9393
<td>
9494
<span class="comma" v-for="v in v.values_enum.values()"><code>{{ v }}</code></span>
9595
</td>
9696
</tr>
9797
<tr v-if="v.seealso.length">
98-
<th class="rightAlign">See Also</th>
98+
<th>See Also</th>
9999
<td>
100100
<ul>
101101
<li v-for="v in v.seealso" v-html="v" />
102102
</ul>
103103
</td>
104104
</tr>
105105
<tr v-if="props.show_plugin && v.plugin">
106-
<th class="rightAlign">Plugin</th>
106+
<th>Plugin</th>
107107
<td v-html="v.plugin_link" />
108108
</tr>
109109
<tr v-if="v.added || v.changed || v.deprecated || v.removed">
110-
<th class="rightAlign">Changes</th>
110+
<th>Changes</th>
111111
<td>
112112
<ul class="badgePadding">
113113
<li v-if="v.added" v-for="elem in v.added">
@@ -139,6 +139,6 @@ const d = Object.fromEntries(Object.entries(data).filter(([k, v]) =>
139139
140140
<div v-html="v.text" />
141141
142-
</template>
142+
</article>
143143
</section>
144144
</template>

0 commit comments

Comments
 (0)