@natachah/vanilla-frontend 0.4.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitlab-ci.yml +22 -13
- package/LICENSE.md +1 -1
- package/docs/.vitepress/config.mts +101 -0
- package/docs/base/layout.md +77 -0
- package/docs/base/media.md +146 -0
- package/docs/base/reset.md +33 -0
- package/docs/base/typography.md +296 -0
- package/docs/classes/badge.md +146 -0
- package/docs/classes/breadcrumb.md +54 -0
- package/docs/classes/card.md +171 -0
- package/docs/classes/dropdown.md +180 -0
- package/docs/classes/grid.md +230 -0
- package/docs/classes/list.md +90 -0
- package/docs/components/button.md +254 -0
- package/docs/components/dialog.md +223 -0
- package/docs/components/disclosure.md +169 -0
- package/docs/components/form.md +514 -0
- package/docs/components/loading.md +53 -0
- package/docs/components/popover.md +270 -0
- package/docs/components/progress.md +33 -0
- package/docs/components/table.md +175 -0
- package/docs/index.md +27 -0
- package/docs/javascript/autofill.md +155 -0
- package/docs/javascript/check.md +53 -0
- package/docs/javascript/comfort.md +125 -0
- package/docs/javascript/consent.md +89 -0
- package/docs/javascript/cookie.md +33 -0
- package/docs/javascript/drawer.md +99 -0
- package/docs/javascript/form.md +130 -0
- package/docs/javascript/scroll.md +104 -0
- package/docs/javascript/slider.md +130 -0
- package/docs/javascript/sortable.md +127 -0
- package/docs/javascript/tabpanel.md +72 -0
- package/docs/javascript/toggle.md +182 -0
- package/docs/javascript/trap.md +33 -0
- package/docs/javascript/tree.md +220 -0
- package/docs/prologue/conventions.md +92 -0
- package/docs/prologue/release.md +44 -0
- package/docs/prologue/upgrade.md +21 -0
- package/docs/{pages/demo/layout.html → public/demo/demo.html} +1 -2
- package/docs/start/customization.md +184 -0
- package/docs/start/install.md +80 -0
- package/docs/start/mixin.md +203 -0
- package/docs/vuejs/ComponentPreview.vue +99 -0
- package/js/_slider.js +17 -1
- package/js/vanilla-frontend-doc.js +105 -0
- package/natachah-vanilla-frontend-1.0.0.tgz +0 -0
- package/package.json +11 -14
- package/public/404.html +22 -0
- package/public/assets/app.DsgDPRSA.js +1 -0
- package/public/assets/base_layout.md.CTGv6rTn.js +13 -0
- package/public/assets/base_layout.md.CTGv6rTn.lean.js +1 -0
- package/public/assets/base_media.md.CcuDUcF-.js +24 -0
- package/public/assets/base_media.md.CcuDUcF-.lean.js +1 -0
- package/public/assets/base_reset.md.DqIdqFRJ.js +3 -0
- package/public/assets/base_reset.md.DqIdqFRJ.lean.js +1 -0
- package/public/assets/base_typography.md.DV-ikqGZ.js +87 -0
- package/public/assets/base_typography.md.DV-ikqGZ.lean.js +1 -0
- package/public/assets/chunks/ComponentPreview.BW2s4ay5.js +27 -0
- package/public/assets/chunks/framework.CaiDwmc7.js +4 -0
- package/public/assets/chunks/theme.DL_11MHV.js +1 -0
- package/public/assets/classes_badge.md.BCGzPr6f.js +24 -0
- package/public/assets/classes_badge.md.BCGzPr6f.lean.js +1 -0
- package/public/assets/classes_breadcrumb.md.vU6jlo36.js +15 -0
- package/public/assets/classes_breadcrumb.md.vU6jlo36.lean.js +1 -0
- package/public/assets/classes_card.md.BZEh2l_B.js +41 -0
- package/public/assets/classes_card.md.BZEh2l_B.lean.js +1 -0
- package/public/assets/classes_dropdown.md.BLVw_xQY.js +70 -0
- package/public/assets/classes_dropdown.md.BLVw_xQY.lean.js +1 -0
- package/public/assets/classes_grid.md.47v-Ybqe.js +45 -0
- package/public/assets/classes_grid.md.47v-Ybqe.lean.js +1 -0
- package/public/assets/classes_list.md.BW9PWZV1.js +36 -0
- package/public/assets/classes_list.md.BW9PWZV1.lean.js +1 -0
- package/public/assets/components_button.md.vx3HzdpN.js +45 -0
- package/public/assets/components_button.md.vx3HzdpN.lean.js +1 -0
- package/public/assets/components_dialog.md.C-0gJGus.js +76 -0
- package/public/assets/components_dialog.md.C-0gJGus.lean.js +1 -0
- package/public/assets/components_disclosure.md.DeSRu9_P.js +53 -0
- package/public/assets/components_disclosure.md.DeSRu9_P.lean.js +1 -0
- package/public/assets/components_form.md.Be8d5WFv.js +122 -0
- package/public/assets/components_form.md.Be8d5WFv.lean.js +1 -0
- package/public/assets/components_loading.md.CKDG7z5x.js +4 -0
- package/public/assets/components_loading.md.CKDG7z5x.lean.js +1 -0
- package/public/assets/components_popover.md.CwgNttNc.js +102 -0
- package/public/assets/components_popover.md.CwgNttNc.lean.js +1 -0
- package/public/assets/components_progress.md.CNC7rJiC.js +6 -0
- package/public/assets/components_progress.md.CNC7rJiC.lean.js +1 -0
- package/public/assets/components_table.md.LyBkIDkF.js +75 -0
- package/public/assets/components_table.md.LyBkIDkF.lean.js +1 -0
- package/public/assets/index.md.CJiHmjB7.js +1 -0
- package/public/assets/index.md.CJiHmjB7.lean.js +1 -0
- package/public/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
- package/public/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
- package/public/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
- package/public/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
- package/public/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
- package/public/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
- package/public/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
- package/public/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
- package/public/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
- package/public/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
- package/public/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
- package/public/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
- package/public/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
- package/public/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
- package/public/assets/javascript_autofill.md.BewVUo4H.js +49 -0
- package/public/assets/javascript_autofill.md.BewVUo4H.lean.js +1 -0
- package/public/assets/javascript_check.md.B6ajE66i.js +13 -0
- package/public/assets/javascript_check.md.B6ajE66i.lean.js +1 -0
- package/public/assets/javascript_comfort.md.BRci3j7V.js +20 -0
- package/public/assets/javascript_comfort.md.BRci3j7V.lean.js +1 -0
- package/public/assets/javascript_consent.md.Bjv8ZDS6.js +29 -0
- package/public/assets/javascript_consent.md.Bjv8ZDS6.lean.js +1 -0
- package/public/assets/javascript_cookie.md.Dlhyk4Ha.js +2 -0
- package/public/assets/javascript_cookie.md.Dlhyk4Ha.lean.js +1 -0
- package/public/assets/javascript_drawer.md.BCJX3fL-.js +32 -0
- package/public/assets/javascript_drawer.md.BCJX3fL-.lean.js +1 -0
- package/public/assets/javascript_form.md.Cwf_gxLI.js +40 -0
- package/public/assets/javascript_form.md.Cwf_gxLI.lean.js +2 -0
- package/public/assets/javascript_scroll.md.BrJijWbF.js +30 -0
- package/public/assets/javascript_scroll.md.BrJijWbF.lean.js +1 -0
- package/public/assets/javascript_slider.md.DDO8wC4u.js +27 -0
- package/public/assets/javascript_slider.md.DDO8wC4u.lean.js +1 -0
- package/public/assets/javascript_sortable.md.BKyem7yw.js +35 -0
- package/public/assets/javascript_sortable.md.BKyem7yw.lean.js +1 -0
- package/public/assets/javascript_tabpanel.md.D9M-_xE0.js +19 -0
- package/public/assets/javascript_tabpanel.md.D9M-_xE0.lean.js +1 -0
- package/public/assets/javascript_toggle.md.C8582WNC.js +46 -0
- package/public/assets/javascript_toggle.md.C8582WNC.lean.js +1 -0
- package/public/assets/javascript_trap.md.Bc59YUng.js +2 -0
- package/public/assets/javascript_trap.md.Bc59YUng.lean.js +1 -0
- package/public/assets/javascript_tree.md.uc1UUsFV.js +72 -0
- package/public/assets/javascript_tree.md.uc1UUsFV.lean.js +1 -0
- package/public/assets/prologue_conventions.md.D8nVwlRS.js +34 -0
- package/public/assets/prologue_conventions.md.D8nVwlRS.lean.js +1 -0
- package/public/assets/prologue_release.md.CG6nuFnt.js +1 -0
- package/public/assets/prologue_release.md.CG6nuFnt.lean.js +1 -0
- package/public/assets/prologue_upgrade.md.CFxokaBG.js +1 -0
- package/public/assets/prologue_upgrade.md.CFxokaBG.lean.js +1 -0
- package/public/assets/start_customization.md.t-ze_NoQ.js +141 -0
- package/public/assets/start_customization.md.t-ze_NoQ.lean.js +1 -0
- package/public/assets/start_install.md.OluH7l11.js +46 -0
- package/public/assets/start_install.md.OluH7l11.lean.js +1 -0
- package/public/assets/start_mixin.md.D76cLRSX.js +85 -0
- package/public/assets/start_mixin.md.D76cLRSX.lean.js +1 -0
- package/public/assets/style.zIeGMibA.css +1 -0
- package/public/base/layout.html +37 -0
- package/public/base/media.html +179 -0
- package/public/base/reset.html +27 -0
- package/public/base/typography.html +320 -0
- package/public/bundles/vanilla-frontend-doc.css +1 -0
- package/public/bundles/vanilla-frontend-doc.js +1 -0
- package/public/bundles/vanilla-frontend.css +1 -0
- package/public/classes/badge.html +205 -0
- package/public/classes/breadcrumb.html +66 -0
- package/public/classes/card.html +222 -0
- package/public/classes/dropdown.html +147 -0
- package/public/classes/grid.html +278 -0
- package/public/classes/list.html +113 -0
- package/public/components/button.html +304 -0
- package/public/components/dialog.html +205 -0
- package/public/components/disclosure.html +130 -0
- package/public/components/form.html +589 -0
- package/public/components/loading.html +107 -0
- package/public/components/popover.html +257 -0
- package/public/components/progress.html +57 -0
- package/public/components/table.html +152 -0
- package/public/demo/demo.html +84 -0
- package/public/hashmap.json +1 -0
- package/public/index.html +25 -0
- package/public/javascript/autofill.html +152 -0
- package/public/javascript/check.html +64 -0
- package/public/javascript/comfort.html +123 -0
- package/public/javascript/consent.html +80 -0
- package/public/javascript/cookie.html +26 -0
- package/public/javascript/drawer.html +83 -0
- package/public/javascript/form.html +117 -0
- package/public/javascript/scroll.html +81 -0
- package/public/javascript/slider.html +78 -0
- package/public/javascript/sortable.html +112 -0
- package/public/javascript/tabpanel.html +70 -0
- package/public/javascript/toggle.html +201 -0
- package/public/javascript/trap.html +26 -0
- package/public/javascript/tree.html +175 -0
- package/public/prologue/conventions.html +58 -0
- package/public/prologue/release.html +25 -0
- package/public/prologue/upgrade.html +25 -0
- package/public/start/customization.html +165 -0
- package/public/start/install.html +70 -0
- package/public/start/mixin.html +109 -0
- package/public/vp-icons.css +0 -0
- package/sandbox/index.html +27 -0
- package/sandbox/js/sandbox-header.js +57 -0
- package/sandbox/js/sandbox-test.js +91 -0
- package/sandbox/pages/base/layout.html +80 -0
- package/sandbox/pages/base/media.html +52 -0
- package/sandbox/pages/base/typography.html +132 -0
- package/sandbox/pages/components/button.html +70 -0
- package/sandbox/pages/components/dialog.html +72 -0
- package/sandbox/pages/components/disclosure.html +77 -0
- package/sandbox/pages/components/form.html +164 -0
- package/sandbox/pages/components/loading.html +32 -0
- package/sandbox/pages/components/popover.html +119 -0
- package/sandbox/pages/components/progress.html +28 -0
- package/sandbox/pages/components/table.html +80 -0
- package/sandbox/pages/customs/badge.html +59 -0
- package/sandbox/pages/customs/breadcrumb.html +34 -0
- package/sandbox/pages/customs/card.html +71 -0
- package/sandbox/pages/customs/dropdown.html +70 -0
- package/sandbox/pages/customs/grid.html +109 -0
- package/sandbox/pages/customs/list.html +43 -0
- package/sandbox/pages/javascript/autofill.html +39 -0
- package/sandbox/pages/javascript/checkall.html +37 -0
- package/sandbox/pages/javascript/comfort.html +41 -0
- package/sandbox/pages/javascript/consent.html +45 -0
- package/sandbox/pages/javascript/form.html +50 -0
- package/sandbox/pages/javascript/scroll.html +44 -0
- package/sandbox/pages/javascript/slider.html +44 -0
- package/sandbox/pages/javascript/sortable.html +56 -0
- package/sandbox/pages/javascript/tabpanel.html +39 -0
- package/sandbox/pages/javascript/toggle.html +72 -0
- package/sandbox/pages/javascript/tree.html +96 -0
- package/sandbox/sandbox.js +26 -0
- package/sandbox/scss/sandbox-header.scss +93 -0
- package/scss/base/_reset.scss +2 -0
- package/scss/components/_badge.scss +2 -1
- package/scss/components/_dropdown.scss +2 -2
- package/scss/components/_group.scss +8 -4
- package/scss/components/_popover.scss +74 -0
- package/scss/components/index.scss +1 -0
- package/scss/themes/_root.scss +3 -0
- package/scss/vanilla-frontend-doc.scss +46 -1
- package/scss/vanilla-frontend-sandbox.scss +34 -0
- package/vite.config.js +30 -0
- package/docs/index.html +0 -36
- package/docs/main-demo.js +0 -2
- package/docs/main.js +0 -34
- package/docs/pages/base/layout.html +0 -131
- package/docs/pages/base/media.html +0 -142
- package/docs/pages/base/reset.html +0 -53
- package/docs/pages/base/typography.html +0 -334
- package/docs/pages/components/button.html +0 -202
- package/docs/pages/components/dialog.html +0 -336
- package/docs/pages/components/disclosure.html +0 -174
- package/docs/pages/components/form.html +0 -427
- package/docs/pages/components/loading.html +0 -58
- package/docs/pages/components/progress.html +0 -47
- package/docs/pages/components/table.html +0 -168
- package/docs/pages/customs/badge.html +0 -150
- package/docs/pages/customs/breadcrumb.html +0 -67
- package/docs/pages/customs/card.html +0 -185
- package/docs/pages/customs/drawer.html +0 -149
- package/docs/pages/customs/dropdown.html +0 -270
- package/docs/pages/customs/grid.html +0 -185
- package/docs/pages/customs/list.html +0 -112
- package/docs/pages/customs/slider.html +0 -273
- package/docs/pages/javascript/autofill.html +0 -170
- package/docs/pages/javascript/checkall.html +0 -59
- package/docs/pages/javascript/comfort.html +0 -146
- package/docs/pages/javascript/consent.html +0 -112
- package/docs/pages/javascript/cookie.html +0 -81
- package/docs/pages/javascript/form.html +0 -199
- package/docs/pages/javascript/scroll.html +0 -209
- package/docs/pages/javascript/sortable.html +0 -167
- package/docs/pages/javascript/tabpanel.html +0 -89
- package/docs/pages/javascript/toggle.html +0 -193
- package/docs/pages/javascript/trap.html +0 -89
- package/docs/pages/javascript/tree.html +0 -256
- package/docs/pages/quick-start/conventions.html +0 -112
- package/docs/pages/quick-start/customization.html +0 -184
- package/docs/pages/quick-start/installation.html +0 -97
- package/docs/pages/quick-start/mixins.html +0 -214
- package/docs/src/js/demo.js +0 -110
- package/docs/src/js/doc-code.js +0 -102
- package/docs/src/js/doc-demo.js +0 -14
- package/docs/src/js/doc-layout.js +0 -117
- package/docs/src/scss/demo.scss +0 -77
- package/docs/src/scss/layout.scss +0 -83
- package/docs/src/scss/style.scss +0 -278
- package/docs/vite.config.mjs +0 -23
- package/esbuild.mjs +0 -25
- package/natachah-vanilla-frontend-0.4.0.tgz +0 -0
- package/vitest.config.js +0 -8
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ComponentPreview from '../vuejs/ComponentPreview.vue'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
# Typography
|
|
6
|
+
|
|
7
|
+
All website have some typographic elements, here some basic styling.
|
|
8
|
+
|
|
9
|
+
```scss
|
|
10
|
+
@use '@natachah/vanilla-frontend/scss/base/typography'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Headings
|
|
14
|
+
|
|
15
|
+
The headings use the default `<h*>` tags.
|
|
16
|
+
|
|
17
|
+
<ComponentPreview>
|
|
18
|
+
<h1>Heading 1</h1>
|
|
19
|
+
<h2>Heading 2</h2>
|
|
20
|
+
<h3>Heading 3</h3>
|
|
21
|
+
<h4>Heading 4</h4>
|
|
22
|
+
<h5>Heading 5</h5>
|
|
23
|
+
<h6>Heading 6</h6>
|
|
24
|
+
</ComponentPreview>
|
|
25
|
+
|
|
26
|
+
::: code-group
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<h1>Heading 1</h1>
|
|
30
|
+
<h2>Heading 2</h2>
|
|
31
|
+
<h3>Heading 3</h3>
|
|
32
|
+
<h4>Heading 4</h4>
|
|
33
|
+
<h5>Heading 5</h5>
|
|
34
|
+
<h6>Heading 6</h6>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```css [css properties]
|
|
38
|
+
--font-size-h*
|
|
39
|
+
--heading-font-weight
|
|
40
|
+
--heading-line-height
|
|
41
|
+
--heading-color
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
:::
|
|
45
|
+
|
|
46
|
+
## Paragraph
|
|
47
|
+
|
|
48
|
+
The paragraph use the default `<h*>` tags.
|
|
49
|
+
|
|
50
|
+
As each website is uniq, there is no default margin-block for the paragraph.
|
|
51
|
+
|
|
52
|
+
<ComponentPreview>
|
|
53
|
+
<p>
|
|
54
|
+
Lorem ipsum sit amet consectetur adipisicing elit. Quos consequatur omnis velit saepe suscipit? Ab ut assumenda nesciunt, veritatis beatae temporibus facilis quis earum vero officia explicabo veniam tempore voluptatibus?
|
|
55
|
+
</p>
|
|
56
|
+
<p>
|
|
57
|
+
Velit saepe suscipit? Ab ut assumenda nesciunt, veritatis beatae temporibus facilis quis earum vero officia explicabo veniam tempore voluptatibus? Lorem ipsum sit amet consectetur adipisicing elit.
|
|
58
|
+
</p>
|
|
59
|
+
<p>
|
|
60
|
+
Ab ut assumenda nesciunt, veritatis beatae temporibus facilis quis earum vero.
|
|
61
|
+
</p>
|
|
62
|
+
</ComponentPreview>
|
|
63
|
+
|
|
64
|
+
## Anchor
|
|
65
|
+
|
|
66
|
+
Use the default `<a>` tag to create links.
|
|
67
|
+
|
|
68
|
+
You can add the `aria-current` or `aria-selected` attribute to make the link with an active state.
|
|
69
|
+
|
|
70
|
+
By default if there is no `href` attribute, it will render as disabled state. And if it's an external link with `target="_blank"` attribute, the anchor will have an icon for accessibility.
|
|
71
|
+
|
|
72
|
+
<ComponentPreview>
|
|
73
|
+
<a href="#">Anchor</a> <a href="#" aria-current="page">Active</a> <a>Disabled</a> <a href="#" target="_blank" title="This link opens in a new window" aria-label="This link opens in a new window">Anchor</a>
|
|
74
|
+
</ComponentPreview>
|
|
75
|
+
|
|
76
|
+
::: code-group
|
|
77
|
+
|
|
78
|
+
```html
|
|
79
|
+
<a href="#">Anchor</a>
|
|
80
|
+
<a href="#" aria-current="page">Active</a>
|
|
81
|
+
<a>Disabled</a>
|
|
82
|
+
<a href="#" target="_blank" title="This link opens in a new window" aria-label="This link opens in a new window">Anchor</a>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```css [css properties]
|
|
86
|
+
--anchor-decoration
|
|
87
|
+
--anchor-color
|
|
88
|
+
--anchor-hover-color
|
|
89
|
+
--anchor-focus-color
|
|
90
|
+
--anchor-active-color
|
|
91
|
+
--anchor-disabled-opacity
|
|
92
|
+
--anchor-outline-size
|
|
93
|
+
--anchor-outline-style
|
|
94
|
+
--anchor-outline-color
|
|
95
|
+
--anchor-outline-offset
|
|
96
|
+
|
|
97
|
+
--icon-external
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
:::
|
|
101
|
+
|
|
102
|
+
## Inline
|
|
103
|
+
|
|
104
|
+
<ComponentPreview>
|
|
105
|
+
<div class="grid" style="--grid-columns:3">
|
|
106
|
+
<p><abbr title="Abbreviation">Abbr.</abbr></p>
|
|
107
|
+
<p><small>Small</small></p>
|
|
108
|
+
<p><q>An inline quote</q></p>
|
|
109
|
+
<p><b>Bold</b></p>
|
|
110
|
+
<p><b>b</b></p>
|
|
111
|
+
<p><em>Emphasis</em></p>
|
|
112
|
+
<p><i>Idiomatic</i></p>
|
|
113
|
+
<p><s>Strikethrough</s></p>
|
|
114
|
+
<p><u>Underline</u></p>
|
|
115
|
+
<p><span>Text <sub>Sub</sub></span></p>
|
|
116
|
+
<p><span>Text <sup>Sup</sup></span></p>
|
|
117
|
+
<p><cite>Citation</cite></p>
|
|
118
|
+
<p><mark>Highlight</mark></p>
|
|
119
|
+
<p><kbd>Ctrl + S</kbd></p>
|
|
120
|
+
<p><code><Code></code></p>
|
|
121
|
+
<p><ins>Inserted</ins></p>
|
|
122
|
+
<p><del>Deleted</del></p>
|
|
123
|
+
</div>
|
|
124
|
+
</ComponentPreview>
|
|
125
|
+
|
|
126
|
+
::: code-group
|
|
127
|
+
|
|
128
|
+
```html
|
|
129
|
+
<p><abbr title="Abbreviation">Abbr.</abbr></p>
|
|
130
|
+
<p><small>Small</small></p>
|
|
131
|
+
<p><q>An inline quote</q></p>
|
|
132
|
+
<p><b>Bold</b></p>
|
|
133
|
+
<p><b>b</b></p>
|
|
134
|
+
<p><em>Emphasis</em></p>
|
|
135
|
+
<p><i>Idiomatic</i></p>
|
|
136
|
+
<p><s>Strikethrough</s></p>
|
|
137
|
+
<p><u>Underline</u></p>
|
|
138
|
+
<p><span>Text <sub>Sub</sub></span></p>
|
|
139
|
+
<p><span>Text <sup>Sup</sup></span></p>
|
|
140
|
+
<p><cite>Citation</cite></p>
|
|
141
|
+
<p><mark>Highlight</mark></p>
|
|
142
|
+
<p><kbd>Ctrl + S</kbd></p>
|
|
143
|
+
<p><code><Code></code></p>
|
|
144
|
+
<p><ins>Inserted</ins></p>
|
|
145
|
+
<p><del>Deleted</del></p>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
```css [css properties]
|
|
149
|
+
--mark-padding-block
|
|
150
|
+
--mark-padding-inline
|
|
151
|
+
--mark-background
|
|
152
|
+
--kbd-padding-block
|
|
153
|
+
--kbd-padding-inline
|
|
154
|
+
--kbd-font-family
|
|
155
|
+
--kbd-color
|
|
156
|
+
--kbd-background
|
|
157
|
+
--kbd-border-radius
|
|
158
|
+
--code-padding-block
|
|
159
|
+
--code-padding-inline
|
|
160
|
+
--code-font-family
|
|
161
|
+
--code-color
|
|
162
|
+
--code-background
|
|
163
|
+
--code-border-radius
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
:::
|
|
167
|
+
|
|
168
|
+
## Blockquote
|
|
169
|
+
|
|
170
|
+
The quotes use the default `<blockquote>` tags. Because the blockquote is usully design per website, their is no custom properties for them.
|
|
171
|
+
|
|
172
|
+
<ComponentPreview>
|
|
173
|
+
<blockquote>
|
|
174
|
+
<p>
|
|
175
|
+
“It's only after we've lost everything that we're free to do anything.”
|
|
176
|
+
</p>
|
|
177
|
+
<footer>
|
|
178
|
+
- Chuck Palahniuk, <cite>Fight Club</cite>
|
|
179
|
+
</footer>
|
|
180
|
+
</blockquote>
|
|
181
|
+
</ComponentPreview>
|
|
182
|
+
|
|
183
|
+
```html
|
|
184
|
+
<blockquote>
|
|
185
|
+
<p>
|
|
186
|
+
“It's only after we've lost everything that we're free to do anything.”
|
|
187
|
+
</p>
|
|
188
|
+
<footer>
|
|
189
|
+
- Chuck Palahniuk, <cite>Fight Club</cite>
|
|
190
|
+
</footer>
|
|
191
|
+
</blockquote>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Code
|
|
195
|
+
|
|
196
|
+
Use the `<pre>` tag with a `<code>` tag inside. The design of a block of code is not the same as the inline element.
|
|
197
|
+
|
|
198
|
+
<ComponentPreview>
|
|
199
|
+
<pre><code><!--
|
|
200
|
+
--><p>Sample text here...</p><br><!--
|
|
201
|
+
--><p>And another line of sample text here...</p></code></pre>
|
|
202
|
+
</ComponentPreview>
|
|
203
|
+
|
|
204
|
+
::: code-group
|
|
205
|
+
|
|
206
|
+
```html
|
|
207
|
+
<pre><code><!--
|
|
208
|
+
--><p>Sample text here...</p><br><!--
|
|
209
|
+
--><p>And another line of sample text here...</p></code></pre>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
```css [css properties]
|
|
213
|
+
--pre-padding-block
|
|
214
|
+
--pre-padding-inline
|
|
215
|
+
--pre-font-family
|
|
216
|
+
--pre-color
|
|
217
|
+
--pre-background
|
|
218
|
+
--pre-border-radius
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
:::
|
|
222
|
+
|
|
223
|
+
## List
|
|
224
|
+
|
|
225
|
+
The lists use the default `<ul>`, `<ol>` and `<dl>` tags. Because the lists are usully design per website/situation, their is not too much custom properties for them.
|
|
226
|
+
|
|
227
|
+
<ComponentPreview>
|
|
228
|
+
<ul>
|
|
229
|
+
<li><p>Coffee</p></li>
|
|
230
|
+
<li><p>Milk</p></li>
|
|
231
|
+
<li><p>...</p></li>
|
|
232
|
+
</ul>
|
|
233
|
+
<ol>
|
|
234
|
+
<li><p>Make coffee</p></li>
|
|
235
|
+
<li><p>Add the milk</p></li>
|
|
236
|
+
<li><p>Drink it !</p></li>
|
|
237
|
+
</ol>
|
|
238
|
+
<dl>
|
|
239
|
+
<dt>Coffee</dt>
|
|
240
|
+
<dd>Black hot drink</dd>
|
|
241
|
+
<dt>Milk</dt>
|
|
242
|
+
<dd>White cold drink</dd>
|
|
243
|
+
</dl>
|
|
244
|
+
</ComponentPreview>
|
|
245
|
+
|
|
246
|
+
::: code-group
|
|
247
|
+
|
|
248
|
+
```html
|
|
249
|
+
<ul>
|
|
250
|
+
<li><p>Coffee</p></li>
|
|
251
|
+
<li><p>Milk</p></li>
|
|
252
|
+
<li><p>...</p></li>
|
|
253
|
+
</ul>
|
|
254
|
+
|
|
255
|
+
<ol>
|
|
256
|
+
<li><p>Make coffee</p></li>
|
|
257
|
+
<li><p>Add the milk</p></li>
|
|
258
|
+
<li><p>Drink it !</p></li>
|
|
259
|
+
</ol>
|
|
260
|
+
|
|
261
|
+
<dl>
|
|
262
|
+
<dt>Coffee</dt>
|
|
263
|
+
<dd>Black hot drink</dd>
|
|
264
|
+
<dt>Milk</dt>
|
|
265
|
+
<dd>White cold drink</dd>
|
|
266
|
+
</dl>
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
```css [css properties]
|
|
270
|
+
--list-bullet
|
|
271
|
+
--list-offset
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
:::
|
|
275
|
+
|
|
276
|
+
## Break line
|
|
277
|
+
|
|
278
|
+
Use the default `<hr>` tag render a horizontal line.
|
|
279
|
+
|
|
280
|
+
<ComponentPreview>
|
|
281
|
+
<hr>
|
|
282
|
+
</ComponentPreview>
|
|
283
|
+
|
|
284
|
+
::: code-group
|
|
285
|
+
|
|
286
|
+
```html
|
|
287
|
+
<hr>
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
```css [css properties]
|
|
291
|
+
--hr-border-size
|
|
292
|
+
--hr-border-style
|
|
293
|
+
--hr-border-color
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
:::
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ComponentPreview from '../vuejs/ComponentPreview.vue'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
# Badge
|
|
6
|
+
|
|
7
|
+
```scss
|
|
8
|
+
@use '@natachah/vanilla-frontend/scss/components/badge'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Syntax
|
|
12
|
+
|
|
13
|
+
The badge is using a `<span>` tag with the class `.badge`.
|
|
14
|
+
|
|
15
|
+
<ComponentPreview>
|
|
16
|
+
<span class="badge">Badge</span>
|
|
17
|
+
</ComponentPreview>
|
|
18
|
+
|
|
19
|
+
::: code-group
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<span class="badge">Badge</span>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```css [css properties]
|
|
26
|
+
--badge-color
|
|
27
|
+
--badge-background
|
|
28
|
+
--badge-border-size
|
|
29
|
+
--badge-border-style
|
|
30
|
+
--badge-border-color
|
|
31
|
+
--badge-border-radius
|
|
32
|
+
--badge-padding-inline
|
|
33
|
+
--badge-padding-block
|
|
34
|
+
--badge-font-size
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
:::
|
|
38
|
+
|
|
39
|
+
## Variants
|
|
40
|
+
|
|
41
|
+
The badges have multiple variations to play with.
|
|
42
|
+
|
|
43
|
+
### Icon
|
|
44
|
+
|
|
45
|
+
You can add an `<svg>` icon inside the button.
|
|
46
|
+
|
|
47
|
+
<ComponentPreview>
|
|
48
|
+
<span class="badge">
|
|
49
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M8 8c.828 0 1.5-.895 1.5-2S8.828 4 8 4s-1.5.895-1.5 2S7.172 8 8 8Z" /><path d="M11.953 8.81c-.195-3.388-.968-5.507-1.777-6.819C9.707 1.233 9.23.751 8.857.454a3.495 3.495 0 0 0-.463-.315A2.19 2.19 0 0 0 8.25.064.546.546 0 0 0 8 0a.549.549 0 0 0-.266.073 2.312 2.312 0 0 0-.142.08 3.67 3.67 0 0 0-.459.33c-.37.308-.844.803-1.31 1.57-.805 1.322-1.577 3.433-1.774 6.756l-1.497 1.826-.004.005A2.5 2.5 0 0 0 2 12.202V15.5a.5.5 0 0 0 .9.3l1.125-1.5c.166-.222.42-.4.752-.57.214-.108.414-.192.625-.281l.198-.084c.7.428 1.55.635 2.4.635.85 0 1.7-.207 2.4-.635.067.03.132.056.196.083.213.09.413.174.627.282.332.17.586.348.752.57l1.125 1.5a.5.5 0 0 0 .9-.3v-3.298a2.5 2.5 0 0 0-.548-1.562l-1.499-1.83ZM12 10.445v.055c0 .866-.284 1.585-.75 2.14.146.064.292.13.425.199.39.197.8.46 1.1.86L13 14v-1.798a1.5 1.5 0 0 0-.327-.935L12 10.445ZM4.75 12.64C4.284 12.085 4 11.366 4 10.5v-.054l-.673.82a1.5 1.5 0 0 0-.327.936V14l.225-.3c.3-.4.71-.664 1.1-.861.133-.068.279-.135.425-.199ZM8.009 1.073c.063.04.14.094.226.163.284.226.683.621 1.09 1.28C10.137 3.836 11 6.237 11 10.5c0 .858-.374 1.48-.943 1.893C9.517 12.786 8.781 13 8 13c-.781 0-1.517-.214-2.057-.607C5.373 11.979 5 11.358 5 10.5c0-4.182.86-6.586 1.677-7.928.409-.67.81-1.082 1.096-1.32.09-.076.17-.135.236-.18Z" /><path d="M9.479 14.361c-.48.093-.98.139-1.479.139-.5 0-.999-.046-1.479-.139L7.6 15.8a.5.5 0 0 0 .8 0l1.079-1.439Z" /></svg>
|
|
50
|
+
Badge
|
|
51
|
+
</span>
|
|
52
|
+
</ComponentPreview>
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<span class="badge">
|
|
56
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M8 8c.828 0 1.5-.895 1.5-2S8.828 4 8 4s-1.5.895-1.5 2S7.172 8 8 8Z" /><path d="M11.953 8.81c-.195-3.388-.968-5.507-1.777-6.819C9.707 1.233 9.23.751 8.857.454a3.495 3.495 0 0 0-.463-.315A2.19 2.19 0 0 0 8.25.064.546.546 0 0 0 8 0a.549.549 0 0 0-.266.073 2.312 2.312 0 0 0-.142.08 3.67 3.67 0 0 0-.459.33c-.37.308-.844.803-1.31 1.57-.805 1.322-1.577 3.433-1.774 6.756l-1.497 1.826-.004.005A2.5 2.5 0 0 0 2 12.202V15.5a.5.5 0 0 0 .9.3l1.125-1.5c.166-.222.42-.4.752-.57.214-.108.414-.192.625-.281l.198-.084c.7.428 1.55.635 2.4.635.85 0 1.7-.207 2.4-.635.067.03.132.056.196.083.213.09.413.174.627.282.332.17.586.348.752.57l1.125 1.5a.5.5 0 0 0 .9-.3v-3.298a2.5 2.5 0 0 0-.548-1.562l-1.499-1.83ZM12 10.445v.055c0 .866-.284 1.585-.75 2.14.146.064.292.13.425.199.39.197.8.46 1.1.86L13 14v-1.798a1.5 1.5 0 0 0-.327-.935L12 10.445ZM4.75 12.64C4.284 12.085 4 11.366 4 10.5v-.054l-.673.82a1.5 1.5 0 0 0-.327.936V14l.225-.3c.3-.4.71-.664 1.1-.861.133-.068.279-.135.425-.199ZM8.009 1.073c.063.04.14.094.226.163.284.226.683.621 1.09 1.28C10.137 3.836 11 6.237 11 10.5c0 .858-.374 1.48-.943 1.893C9.517 12.786 8.781 13 8 13c-.781 0-1.517-.214-2.057-.607C5.373 11.979 5 11.358 5 10.5c0-4.182.86-6.586 1.677-7.928.409-.67.81-1.082 1.096-1.32.09-.076.17-.135.236-.18Z" /><path d="M9.479 14.361c-.48.093-.98.139-1.479.139-.5 0-.999-.046-1.479-.139L7.6 15.8a.5.5 0 0 0 .8 0l1.079-1.439Z" /></svg>
|
|
57
|
+
Badge
|
|
58
|
+
</span>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Size
|
|
62
|
+
|
|
63
|
+
You can adapte the size of the badges by changing their `font-size`.
|
|
64
|
+
|
|
65
|
+
By default the badge have a font-size set at **.875em**.
|
|
66
|
+
|
|
67
|
+
<ComponentPreview>
|
|
68
|
+
<span class="badge" style="font-size: .75em">Small</span>
|
|
69
|
+
<span class="badge">Normal</span>
|
|
70
|
+
<span class="badge" style="font-size: var(--font-size-large)">Large</span>
|
|
71
|
+
</ComponentPreview>
|
|
72
|
+
|
|
73
|
+
```html
|
|
74
|
+
<span class="badge" style="font-size: .75em">Small</span>
|
|
75
|
+
<span class="badge">Normal</span>
|
|
76
|
+
<span class="badge" style="font-size: var(--font-size-large)">Large</span>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Outline
|
|
80
|
+
|
|
81
|
+
You can create an outline variation by enable the option and adding the class `.outline`.
|
|
82
|
+
|
|
83
|
+
<ComponentPreview>
|
|
84
|
+
<span class="badge outline">Badge</span>
|
|
85
|
+
</ComponentPreview>
|
|
86
|
+
|
|
87
|
+
::: code-group
|
|
88
|
+
```html
|
|
89
|
+
<span class="badge outline">Badge</span>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```scss {2}
|
|
93
|
+
@use "@natachah/vanilla-frontend/scss/components/badge" with (
|
|
94
|
+
$outline: true
|
|
95
|
+
);
|
|
96
|
+
```
|
|
97
|
+
:::
|
|
98
|
+
|
|
99
|
+
### Color
|
|
100
|
+
|
|
101
|
+
You can create some color variation by including the colors classes name into the import and then by adding the class as `.{COLOR}`.
|
|
102
|
+
|
|
103
|
+
<ComponentPreview>
|
|
104
|
+
<span class="badge primary">Primary</span>
|
|
105
|
+
<span class="badge outline primary">Outline</span>
|
|
106
|
+
</ComponentPreview>
|
|
107
|
+
|
|
108
|
+
::: code-group
|
|
109
|
+
```html
|
|
110
|
+
<span class="badge primary">Primary</span>
|
|
111
|
+
<span class="badge outline primary">Outline</span>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```scss {2}
|
|
115
|
+
@use "@natachah/vanilla-frontend/scss/components/badge" with (
|
|
116
|
+
$colors: ('primary'),
|
|
117
|
+
$outline: true
|
|
118
|
+
);
|
|
119
|
+
```
|
|
120
|
+
:::
|
|
121
|
+
|
|
122
|
+
### Group
|
|
123
|
+
|
|
124
|
+
You can group some badges by putting them in a `<div>` with the class `.group`.
|
|
125
|
+
|
|
126
|
+
<ComponentPreview>
|
|
127
|
+
<div class="group">
|
|
128
|
+
<span class="badge">Badge A</span>
|
|
129
|
+
<span class="badge">Badge B</span>
|
|
130
|
+
<span class="badge">Badge C</span>
|
|
131
|
+
</div>
|
|
132
|
+
</ComponentPreview>
|
|
133
|
+
|
|
134
|
+
::: code-group
|
|
135
|
+
```html
|
|
136
|
+
<div class="group">
|
|
137
|
+
<span class="badge">Badge A</span>
|
|
138
|
+
<span class="badge">Badge B</span>
|
|
139
|
+
<span class="badge">Badge C</span>
|
|
140
|
+
</div>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
```scss
|
|
144
|
+
@use '@natachah/vanilla-frontend/scss/components/group';
|
|
145
|
+
```
|
|
146
|
+
:::
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ComponentPreview from '../vuejs/ComponentPreview.vue'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
# Breadcrumb
|
|
6
|
+
|
|
7
|
+
```scss
|
|
8
|
+
@use '@natachah/vanilla-frontend/scss/components/breadcrumb'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Syntax
|
|
12
|
+
|
|
13
|
+
To create a breadcrumb navigation, always use `<ol>` with a class `.breadcrumb` inside a `<nav>` tag.
|
|
14
|
+
|
|
15
|
+
<ComponentPreview>
|
|
16
|
+
<nav aria-label="Breadcrumb navigaton">
|
|
17
|
+
<ol class="breadcrumb">
|
|
18
|
+
<li><a href="#">One</a></li>
|
|
19
|
+
<li><a href="#">Two</a></li>
|
|
20
|
+
<li><a href="#">Three</a></li>
|
|
21
|
+
<li aria-current="location">Four</li>
|
|
22
|
+
</ol>
|
|
23
|
+
</nav>
|
|
24
|
+
</ComponentPreview>
|
|
25
|
+
|
|
26
|
+
::: code-group
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<nav aria-label="Breadcrumb navigaton">
|
|
30
|
+
<ol class="breadcrumb">
|
|
31
|
+
<li><a href="#">One</a></li>
|
|
32
|
+
<li><a href="#">Two</a></li>
|
|
33
|
+
<li><a href="#">Three</a></li>
|
|
34
|
+
<li aria-current="location">Four</li>
|
|
35
|
+
</ol>
|
|
36
|
+
</nav>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```css [css properties]
|
|
40
|
+
--breadcrumb-divider
|
|
41
|
+
--breadcrumb-divider-color
|
|
42
|
+
--breadcrumb-gap
|
|
43
|
+
--breadcrumb-decoration
|
|
44
|
+
--breadcrumb-color
|
|
45
|
+
--breadcrumb-hover-color
|
|
46
|
+
--breadcrumb-active-color
|
|
47
|
+
--breadcrumb-disabled-opacity
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
:::
|
|
51
|
+
|
|
52
|
+
::: warning
|
|
53
|
+
The custom properties for the breadcrumb is overriding the default ones in the typography setting.
|
|
54
|
+
:::
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ComponentPreview from '../vuejs/ComponentPreview.vue'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
# Card
|
|
6
|
+
|
|
7
|
+
```scss
|
|
8
|
+
@use '@natachah/vanilla-frontend/scss/components/card'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Syntax
|
|
12
|
+
|
|
13
|
+
The card is using a `<div>` or an `<article>` tag with the class `.card`.
|
|
14
|
+
|
|
15
|
+
<ComponentPreview>
|
|
16
|
+
<div class="card">Hello there !</div>
|
|
17
|
+
</ComponentPreview>
|
|
18
|
+
|
|
19
|
+
::: code-group
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<div class="card">Hello there !</div>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```css [css properties]
|
|
26
|
+
--card-color
|
|
27
|
+
--card-background
|
|
28
|
+
--card-border-size
|
|
29
|
+
--card-border-style
|
|
30
|
+
--card-border-color
|
|
31
|
+
--card-border-radius
|
|
32
|
+
--card-padding-inline
|
|
33
|
+
--card-padding-block
|
|
34
|
+
--card-divider-size
|
|
35
|
+
--card-divider-style
|
|
36
|
+
--card-divider-color
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
:::
|
|
40
|
+
|
|
41
|
+
### Layout
|
|
42
|
+
|
|
43
|
+
The card can have a `<header>` and/or `<footer>` inside to create a more complexe layout.
|
|
44
|
+
|
|
45
|
+
<ComponentPreview>
|
|
46
|
+
<article class="card">
|
|
47
|
+
<header>Header</header>
|
|
48
|
+
<p>Content</p>
|
|
49
|
+
<footer>Footer</footer>
|
|
50
|
+
</article>
|
|
51
|
+
</ComponentPreview>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<article class="card">
|
|
56
|
+
<header>Header</header>
|
|
57
|
+
<p>Content</p>
|
|
58
|
+
<footer>Footer</footer>
|
|
59
|
+
</article>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
You also can add a `<picture>` on the top, center or bottom of a card.
|
|
63
|
+
|
|
64
|
+
To make the picture full width add the class `.flush``
|
|
65
|
+
|
|
66
|
+
<ComponentPreview>
|
|
67
|
+
<div class="card">
|
|
68
|
+
<picture class="flush">
|
|
69
|
+
<img src="https://picsum.photos/400/200" srcset="https://picsum.photos/800/400 2x" alt="My random image from lorem picsum">
|
|
70
|
+
</picture>
|
|
71
|
+
<h3>Title of the card</h3>
|
|
72
|
+
<p>Content of the card</p>
|
|
73
|
+
</div>
|
|
74
|
+
</ComponentPreview>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<div class="card">
|
|
79
|
+
<picture class="flush">
|
|
80
|
+
<img src="https://picsum.photos/400/200" srcset="https://picsum.photos/800/400 2x" alt="My random image from lorem picsum">
|
|
81
|
+
</picture>
|
|
82
|
+
<h3>Title of the card</h3>
|
|
83
|
+
<p>Content of the card</p>
|
|
84
|
+
</div>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The card is compatible with the components group and list.
|
|
88
|
+
|
|
89
|
+
To make them full width add the class `.flush`.
|
|
90
|
+
|
|
91
|
+
<ComponentPreview>
|
|
92
|
+
<div class="card" style="--card-border-color:#000">
|
|
93
|
+
<h3>Mycard</h3>
|
|
94
|
+
<p>Content of the card</p>
|
|
95
|
+
<div class="group flush">
|
|
96
|
+
<button>Button A</button>
|
|
97
|
+
<button>Button B</button>
|
|
98
|
+
</div>
|
|
99
|
+
<p>Content of the card</p>
|
|
100
|
+
<ul class="list flush">
|
|
101
|
+
<li>List D</li>
|
|
102
|
+
<li><a>List E</a></li>
|
|
103
|
+
<li><span>List F</span><button>Button</button></li>
|
|
104
|
+
<li><a href="#" role="button">List F</a></li>
|
|
105
|
+
</ul>
|
|
106
|
+
</div>
|
|
107
|
+
</ComponentPreview>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
```html
|
|
111
|
+
<div class="card" style="--card-border-color:#000">
|
|
112
|
+
<h3>Mycard</h3>
|
|
113
|
+
<p>Content of the card</p>
|
|
114
|
+
<div class="group flush">
|
|
115
|
+
<button>Button A</button>
|
|
116
|
+
<button>Button B</button>
|
|
117
|
+
</div>
|
|
118
|
+
<p>Content of the card</p>
|
|
119
|
+
<ul class="list flush">
|
|
120
|
+
<li>List D</li>
|
|
121
|
+
<li><a>List E</a></li>
|
|
122
|
+
<li><span>List F</span><button>Button</button></li>
|
|
123
|
+
<li><a href="#" role="button">List F</a></li>
|
|
124
|
+
</ul>
|
|
125
|
+
</div>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Variants
|
|
129
|
+
|
|
130
|
+
### Outline
|
|
131
|
+
|
|
132
|
+
You can create an outline variation by enable the option and adding the class `.outline`.
|
|
133
|
+
|
|
134
|
+
<ComponentPreview>
|
|
135
|
+
<div class="card outline">Hello there !</div>
|
|
136
|
+
</ComponentPreview>
|
|
137
|
+
|
|
138
|
+
::: code-group
|
|
139
|
+
```html
|
|
140
|
+
<div class="card outline">Hello there !</div>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
```scss {2}
|
|
144
|
+
@use "@natachah/vanilla-frontend/scss/components/card" with (
|
|
145
|
+
$outline: true
|
|
146
|
+
);
|
|
147
|
+
```
|
|
148
|
+
:::
|
|
149
|
+
|
|
150
|
+
### Color
|
|
151
|
+
|
|
152
|
+
You can create some color variation by including the colors classes name into the import and then by adding the class as `.{COLOR}`.
|
|
153
|
+
|
|
154
|
+
<ComponentPreview>
|
|
155
|
+
<div class="card primary">Hello there !</div><br>
|
|
156
|
+
<div class="card outline primary">Hello there !</div>
|
|
157
|
+
</ComponentPreview>
|
|
158
|
+
|
|
159
|
+
::: code-group
|
|
160
|
+
```html
|
|
161
|
+
<div class="card primary">Hello there !</div><br>
|
|
162
|
+
<div class="card outline primary">Hello there !</div>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
```scss {2}
|
|
166
|
+
@use "@natachah/vanilla-frontend/scss/components/card" with (
|
|
167
|
+
$colors: ('primary'),
|
|
168
|
+
$outline: true
|
|
169
|
+
);
|
|
170
|
+
```
|
|
171
|
+
:::
|