Skip to content

Commit 117547d

Browse files
committed
feat: New Typography
1 parent 997e6df commit 117547d

File tree

7 files changed

+975
-651
lines changed

7 files changed

+975
-651
lines changed

dev/components/css/typography.vue

Lines changed: 46 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,37 @@
55
<q-card-title>
66
Headings
77
</q-card-title>
8+
<q-card-separator />
89
<q-card-main>
9-
<h1>Header 1</h1>
10-
<p>Text</p>
11-
12-
<h2>Header 2</h2>
13-
<p>Text</p>
14-
15-
<h3>Header 3</h3>
16-
<p>Text</p>
17-
18-
<h4>Header 4</h4>
19-
<p>Text</p>
20-
21-
<h5>Header 5</h5>
22-
<p>Text</p>
23-
24-
<h6>Header 6</h6>
25-
<p>Text</p>
10+
<div v-for="heading in headings" class="row items-center q-mb-bigger">
11+
<div class="col-sm-3 col-12">
12+
<q-chip color="primary" square>.{{ heading.class }}</q-chip>
13+
<q-chip color="secondary" square v-if="heading.equivalent">{{ heading.equivalent }}</q-chip>
14+
</div>
15+
<div class="col-sm-9 col-12 q-pl-regular q-pt-regular">
16+
<div class="q-mb-regular" :class="[heading.class, `${heading.class}-opacity`]">{{ heading.label }}</div>
17+
<div class="text-weight-light">
18+
black <strong>{{ heading.color }}%</strong>, font weight <strong>{{ heading.weight }}</strong>
19+
</div>
20+
</div>
21+
</div>
2622
</q-card-main>
2723
</q-card>
2824

2925
<q-card>
3026
<q-card-title>
31-
Text & Paragraphs
27+
Weights
3228
</q-card-title>
29+
<q-card-separator />
3330
<q-card-main>
34-
<div>
35-
<small>Small Text</small>
36-
Normal Text
37-
<big>Big Text</big>
38-
</div>
39-
<div>
40-
<sub>Subtext</sub>
41-
Text
42-
<sup>Supertext</sup>
31+
<div v-for="weight in weights" class="row items-center q-mb-regular">
32+
<div class="col-sm-3 col-12">
33+
<q-chip color="primary" square>.text-weight-{{ weight }}</q-chip>
34+
</div>
35+
<div class="col-sm-9 col-12 q-mb-none q-pl-regular q-pt-small q-pb-small">
36+
<div :class="`text-weight-${weight}`"> Lorem Ipsum is simply dummy text of the printing and typesetting industry.</div>
37+
</div>
4338
</div>
44-
<br>
45-
<p><strong>Default Paragraph</strong>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
46-
<p class="caption"><strong>Caption Paragraph</strong>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
47-
<p class="light-paragraph"><strong>Light Paragraph</strong>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
48-
<p class="thin-paragraph"><strong>Thin Paragraph</strong>: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
49-
50-
<p class="text-bold">Bold text</p>
51-
<p class="text-italic">Italic text</p>
52-
53-
<p class="caption">Tokens</p>
54-
Some <span class="token">token</span> and <span class="token">other token</span>
5539
</q-card-main>
5640
</q-card>
5741

@@ -113,3 +97,27 @@
11397
</div>
11498
</div>
11599
</template>
100+
101+
<script>
102+
export default {
103+
data () {
104+
return {
105+
headings: [
106+
{label: 'Light 112sp', 'class': 'q-display-4', equivalent: 'h1', color: 54, weight: 300},
107+
{label: 'Regular 56sp', 'class': 'q-display-3', equivalent: 'h2', color: 54, weight: 400},
108+
{label: 'Regular 45sp', 'class': 'q-display-2', equivalent: 'h3', color: 54, weight: 400},
109+
{label: 'Regular 34sp', 'class': 'q-display-1', equivalent: 'h4', color: 54, weight: 400},
110+
{label: 'Regular 24sp', 'class': 'q-headline', equivalent: 'h5', color: 87, weight: 400},
111+
{label: 'Medium 20sp', 'class': 'q-title', equivalent: 'h6', color: 87, weight: 500},
112+
{label: 'Regular 16sp', 'class': 'q-subheading', color: 87, weight: 400},
113+
{label: 'Medium 14sp', 'class': 'q-body-2', color: 87, weight: 500},
114+
{label: 'Regular 14sp', 'class': 'q-body-1', color: 87, weight: 400},
115+
{label: 'Regular 12sp', 'class': 'q-caption', color: 54, weight: 400}
116+
],
117+
weights: [
118+
'thin', 'light', 'regular', 'medium', 'bold', 'bolder'
119+
]
120+
}
121+
}
122+
}
123+
</script>

dev/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ Quasar.start(() => {
3232
new Vue({
3333
el: '#q-app',
3434
router,
35-
render: h => h(require('./App'))
35+
render: h => h(require('./App').default)
3636
})
3737
})

0 commit comments

Comments
 (0)