forked from microsoft/fast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
692 additions
and
592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
198 changes: 118 additions & 80 deletions
198
packages/web-components/fast-components/src/anchor/fixtures/anchor.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,136 @@ | ||
<h1>Anchor</h1> | ||
<style> | ||
.grid-row { | ||
display: grid; | ||
grid-template-columns: auto auto; | ||
justify-content: start; | ||
gap: 20px; | ||
} | ||
</style> | ||
|
||
<h2>Default</h2> | ||
<fast-anchor href="#">Anchor</fast-anchor> | ||
<h1>Anchor</h1> | ||
<p>with href / without href</p> | ||
|
||
<h2>Inline</h2> | ||
<fast-anchor href="#">Cancel</fast-anchor> | ||
<fast-anchor href="#" appearance="accent">Submit</fast-anchor> | ||
<h4>Default</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void">Anchor</fast-anchor> | ||
<fast-anchor>Anchor</fast-anchor> | ||
</div> | ||
|
||
<h5>With target</h5> | ||
<fast-anchor href="https://microsoft.com" target="_blank">Anchor</fast-anchor> | ||
<h4>With target</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="https://microsoft.com" target="_blank">Anchor</fast-anchor> | ||
<fast-anchor target="_blank">Anchor</fast-anchor> | ||
</div> | ||
|
||
<h2>Neutral</h2> | ||
<fast-anchor href="#" appearance="neutral">Button</fast-anchor> | ||
<h4>Neutral</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void" appearance="neutral">Anchor</fast-anchor> | ||
<fast-anchor appearance="neutral">Anchor</fast-anchor> | ||
</div> | ||
|
||
<h2>Accent</h2> | ||
<fast-anchor href="#" appearance="accent">Anchor</fast-anchor> | ||
<h4>Accent</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void" appearance="accent">Anchor</fast-anchor> | ||
<fast-anchor appearance="accent">Anchor</fast-anchor> | ||
</div> | ||
|
||
<h2>Hypertext</h2> | ||
<fast-anchor href="#" appearance="hypertext">Anchor</fast-anchor> | ||
<br /> | ||
<br /> | ||
<fast-anchor appearance="hypertext">Anchor (no href)</fast-anchor> | ||
<h4>Hypertext</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void" appearance="hypertext">Anchor</fast-anchor> | ||
<fast-anchor appearance="hypertext">Anchor</fast-anchor> | ||
</div> | ||
|
||
<h4>Inline</h4> | ||
<p> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nesciunt ut aliquam quas quod | ||
ipsam cupiditate, voluptate, corrupti | ||
<fast-anchor appearance="hypertext" href="#">doloremque totam</fast-anchor> | ||
Lorem ipsum dolor sit | ||
<fast-anchor appearance="hypertext">amet (no href)</fast-anchor> | ||
consectetur adipisicing elit. Nesciunt ut aliquam quas quod ipsam cupiditate, | ||
voluptate, corrupti | ||
<fast-anchor appearance="hypertext" href="javascript:void"> | ||
doloremque totam | ||
</fast-anchor> | ||
dicta perspiciatis commodi consequatur reprehenderit laborum aliquid minima. Neque, | ||
recusandae. Adipisci. | ||
</p> | ||
<br /> | ||
<fast-anchor href="https://fast.design" appearance="hypertext"> | ||
The next anchor is intentionally short, and this anchor is intentionally long | ||
</fast-anchor> | ||
|
||
<br /> | ||
<br /> | ||
<fast-anchor href="https://fast.design" appearance="hypertext">Hi</fast-anchor> | ||
|
||
<h2>Lightweight</h2> | ||
<fast-anchor href="#" appearance="lightweight">Anchor</fast-anchor> | ||
<br /> | ||
<fast-anchor href="#" appearance="lightweight"> | ||
The next anchor is intentionally short, and this anchor is intentionally long | ||
</fast-anchor> | ||
<br /> | ||
<fast-anchor href="#" appearance="lightweight">Hi</fast-anchor> | ||
<h4>Lightweight</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void" appearance="lightweight">Anchor</fast-anchor> | ||
<fast-anchor appearance="lightweight">Anchor</fast-anchor> | ||
</div> | ||
|
||
<h2>Outline</h2> | ||
<fast-anchor href="#" appearance="outline">Anchor</fast-anchor> | ||
<h4>Outline</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void" appearance="outline">Anchor</fast-anchor> | ||
<fast-anchor appearance="outline">Anchor</fast-anchor> | ||
</div> | ||
|
||
<h2>Stealth</h2> | ||
<fast-anchor href="#" appearance="stealth">Anchor</fast-anchor> | ||
<h4>Stealth</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void" appearance="stealth">Anchor</fast-anchor> | ||
<fast-anchor appearance="stealth">Anchor</fast-anchor> | ||
</div> | ||
|
||
<h2>With start</h2> | ||
<fast-anchor href="#"> | ||
Anchor | ||
<svg | ||
slot="start" | ||
width="16" | ||
height="16" | ||
viewBox="0 0 16 16" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M6.5,7.7h-1v-1h1V7.7z M10.6,7.7h-1v-1h1V7.7z M14.7,6.7v2.1h-1v2.6c0,0.2,0,0.4-0.1,0.6c-0.1,0.2-0.2,0.4-0.3,0.5c-0.1,0.1-0.3,0.3-0.5,0.3c-0.2,0.1-0.4,0.1-0.6,0.1H10l-3.5,3v-3H3.9c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.2-0.5-0.3c-0.1-0.1-0.3-0.3-0.3-0.5c-0.1-0.2-0.1-0.4-0.1-0.6V8.8h-1V6.7h1V5.2c0-0.2,0-0.4,0.1-0.6c0.1-0.2,0.2-0.4,0.3-0.5c0.1-0.1,0.3-0.3,0.5-0.3c0.2-0.1,0.4-0.1,0.6-0.1h3.6V1.9C7.3,1.8,7.2,1.7,7.1,1.5C7,1.4,7,1.2,7,1C7,0.9,7,0.8,7,0.6c0.1-0.1,0.1-0.2,0.2-0.3c0.1-0.1,0.2-0.2,0.3-0.2C7.7,0,7.9,0,8,0c0.1,0,0.3,0,0.4,0.1c0.1,0.1,0.2,0.1,0.3,0.2C8.8,0.4,8.9,0.5,9,0.6C9,0.8,9,0.9,9,1c0,0.2,0,0.4-0.1,0.5C8.8,1.7,8.7,1.8,8.5,1.9v1.7h3.6c0.2,0,0.4,0,0.6,0.1c0.2,0.1,0.4,0.2,0.5,0.3c0.1,0.1,0.3,0.3,0.3,0.5c0.1,0.2,0.1,0.4,0.1,0.6v1.5H14.7z M12.6,5.2c0-0.1-0.1-0.3-0.2-0.4c-0.1-0.1-0.2-0.2-0.4-0.2H3.9c-0.1,0-0.3,0.1-0.4,0.2C3.4,4.9,3.4,5,3.4,5.2v6.2c0,0.1,0.1,0.3,0.2,0.4c0.1,0.1,0.2,0.2,0.4,0.2h3.6v1.8l2.1-1.8h2.5c0.1,0,0.3-0.1,0.4-0.2c0.1-0.1,0.2-0.2,0.2-0.4V5.2z M5.8,8.9c0.3,0.3,0.6,0.5,1,0.7C7.2,9.7,7.6,9.8,8,9.8s0.8-0.1,1.2-0.2c0.4-0.2,0.7-0.4,1-0.7l0.7,0.7c-0.4,0.4-0.8,0.7-1.4,0.9c-0.5,0.2-1,0.3-1.6,0.3s-1.1-0.1-1.6-0.3c-0.5-0.2-1-0.5-1.3-0.9L5.8,8.9z" | ||
/> | ||
</svg> | ||
</fast-anchor> | ||
<h4>With start</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void"> | ||
Anchor | ||
<svg slot="start" width="20" height="20" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M12 5.5a1 1 0 100 2 1 1 0 000-2zm-5 1a1 1 0 112 0 1 1 0 01-2 0zm3.5-4a.5.5 0 00-1 0V3h-3C5.67 3 5 3.67 5 4.5v4c0 .83.67 1.5 1.5 1.5h7c.83 0 1.5-.67 1.5-1.5v-4c0-.83-.67-1.5-1.5-1.5h-3v-.5zM6.5 4h7c.28 0 .5.22.5.5v4a.5.5 0 01-.5.5h-7a.5.5 0 01-.5-.5v-4c0-.28.22-.5.5-.5zm3.75 14c2.62-.04 4.2-.6 5.12-1.44A3.52 3.52 0 0016.5 14h.01v-.69c0-1-.81-1.8-1.8-1.8h-3.2v-.01H5.3c-.99 0-1.8.81-1.8 1.81v.7c.04.77.25 1.75 1.13 2.55.93.84 2.5 1.4 5.12 1.44h.5zm-4.94-5.5h9.38c.45 0 .81.37.81.81v.44c0 .69-.13 1.46-.8 2.07C14 16.45 12.66 17 10 17s-4.01-.55-4.7-1.18a2.63 2.63 0 01-.8-2.07v-.44c0-.44.36-.8.8-.8z" | ||
/> | ||
</svg> | ||
</fast-anchor> | ||
<fast-anchor> | ||
Anchor | ||
<svg slot="start" width="20" height="20" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M12 5.5a1 1 0 100 2 1 1 0 000-2zm-5 1a1 1 0 112 0 1 1 0 01-2 0zm3.5-4a.5.5 0 00-1 0V3h-3C5.67 3 5 3.67 5 4.5v4c0 .83.67 1.5 1.5 1.5h7c.83 0 1.5-.67 1.5-1.5v-4c0-.83-.67-1.5-1.5-1.5h-3v-.5zM6.5 4h7c.28 0 .5.22.5.5v4a.5.5 0 01-.5.5h-7a.5.5 0 01-.5-.5v-4c0-.28.22-.5.5-.5zm3.75 14c2.62-.04 4.2-.6 5.12-1.44A3.52 3.52 0 0016.5 14h.01v-.69c0-1-.81-1.8-1.8-1.8h-3.2v-.01H5.3c-.99 0-1.8.81-1.8 1.81v.7c.04.77.25 1.75 1.13 2.55.93.84 2.5 1.4 5.12 1.44h.5zm-4.94-5.5h9.38c.45 0 .81.37.81.81v.44c0 .69-.13 1.46-.8 2.07C14 16.45 12.66 17 10 17s-4.01-.55-4.7-1.18a2.63 2.63 0 01-.8-2.07v-.44c0-.44.36-.8.8-.8z" | ||
/> | ||
</svg> | ||
</fast-anchor> | ||
</div> | ||
|
||
<h2>With end</h2> | ||
<fast-anchor href="#"> | ||
Anchor | ||
<svg | ||
slot="end" | ||
width="16" | ||
height="16" | ||
viewBox="0 0 16 16" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M6.5,7.7h-1v-1h1V7.7z M10.6,7.7h-1v-1h1V7.7z M14.7,6.7v2.1h-1v2.6c0,0.2,0,0.4-0.1,0.6c-0.1,0.2-0.2,0.4-0.3,0.5c-0.1,0.1-0.3,0.3-0.5,0.3c-0.2,0.1-0.4,0.1-0.6,0.1H10l-3.5,3v-3H3.9c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.2-0.5-0.3c-0.1-0.1-0.3-0.3-0.3-0.5c-0.1-0.2-0.1-0.4-0.1-0.6V8.8h-1V6.7h1V5.2c0-0.2,0-0.4,0.1-0.6c0.1-0.2,0.2-0.4,0.3-0.5c0.1-0.1,0.3-0.3,0.5-0.3c0.2-0.1,0.4-0.1,0.6-0.1h3.6V1.9C7.3,1.8,7.2,1.7,7.1,1.5C7,1.4,7,1.2,7,1C7,0.9,7,0.8,7,0.6c0.1-0.1,0.1-0.2,0.2-0.3c0.1-0.1,0.2-0.2,0.3-0.2C7.7,0,7.9,0,8,0c0.1,0,0.3,0,0.4,0.1c0.1,0.1,0.2,0.1,0.3,0.2C8.8,0.4,8.9,0.5,9,0.6C9,0.8,9,0.9,9,1c0,0.2,0,0.4-0.1,0.5C8.8,1.7,8.7,1.8,8.5,1.9v1.7h3.6c0.2,0,0.4,0,0.6,0.1c0.2,0.1,0.4,0.2,0.5,0.3c0.1,0.1,0.3,0.3,0.3,0.5c0.1,0.2,0.1,0.4,0.1,0.6v1.5H14.7z M12.6,5.2c0-0.1-0.1-0.3-0.2-0.4c-0.1-0.1-0.2-0.2-0.4-0.2H3.9c-0.1,0-0.3,0.1-0.4,0.2C3.4,4.9,3.4,5,3.4,5.2v6.2c0,0.1,0.1,0.3,0.2,0.4c0.1,0.1,0.2,0.2,0.4,0.2h3.6v1.8l2.1-1.8h2.5c0.1,0,0.3-0.1,0.4-0.2c0.1-0.1,0.2-0.2,0.2-0.4V5.2z M5.8,8.9c0.3,0.3,0.6,0.5,1,0.7C7.2,9.7,7.6,9.8,8,9.8s0.8-0.1,1.2-0.2c0.4-0.2,0.7-0.4,1-0.7l0.7,0.7c-0.4,0.4-0.8,0.7-1.4,0.9c-0.5,0.2-1,0.3-1.6,0.3s-1.1-0.1-1.6-0.3c-0.5-0.2-1-0.5-1.3-0.9L5.8,8.9z" | ||
/> | ||
</svg> | ||
</fast-anchor> | ||
<h4>With end</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void"> | ||
Anchor | ||
<svg slot="end" width="20" height="20" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M12 5.5a1 1 0 100 2 1 1 0 000-2zm-5 1a1 1 0 112 0 1 1 0 01-2 0zm3.5-4a.5.5 0 00-1 0V3h-3C5.67 3 5 3.67 5 4.5v4c0 .83.67 1.5 1.5 1.5h7c.83 0 1.5-.67 1.5-1.5v-4c0-.83-.67-1.5-1.5-1.5h-3v-.5zM6.5 4h7c.28 0 .5.22.5.5v4a.5.5 0 01-.5.5h-7a.5.5 0 01-.5-.5v-4c0-.28.22-.5.5-.5zm3.75 14c2.62-.04 4.2-.6 5.12-1.44A3.52 3.52 0 0016.5 14h.01v-.69c0-1-.81-1.8-1.8-1.8h-3.2v-.01H5.3c-.99 0-1.8.81-1.8 1.81v.7c.04.77.25 1.75 1.13 2.55.93.84 2.5 1.4 5.12 1.44h.5zm-4.94-5.5h9.38c.45 0 .81.37.81.81v.44c0 .69-.13 1.46-.8 2.07C14 16.45 12.66 17 10 17s-4.01-.55-4.7-1.18a2.63 2.63 0 01-.8-2.07v-.44c0-.44.36-.8.8-.8z" | ||
/> | ||
</svg> | ||
</fast-anchor> | ||
<fast-anchor> | ||
Anchor | ||
<svg slot="end" width="20" height="20" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M12 5.5a1 1 0 100 2 1 1 0 000-2zm-5 1a1 1 0 112 0 1 1 0 01-2 0zm3.5-4a.5.5 0 00-1 0V3h-3C5.67 3 5 3.67 5 4.5v4c0 .83.67 1.5 1.5 1.5h7c.83 0 1.5-.67 1.5-1.5v-4c0-.83-.67-1.5-1.5-1.5h-3v-.5zM6.5 4h7c.28 0 .5.22.5.5v4a.5.5 0 01-.5.5h-7a.5.5 0 01-.5-.5v-4c0-.28.22-.5.5-.5zm3.75 14c2.62-.04 4.2-.6 5.12-1.44A3.52 3.52 0 0016.5 14h.01v-.69c0-1-.81-1.8-1.8-1.8h-3.2v-.01H5.3c-.99 0-1.8.81-1.8 1.81v.7c.04.77.25 1.75 1.13 2.55.93.84 2.5 1.4 5.12 1.44h.5zm-4.94-5.5h9.38c.45 0 .81.37.81.81v.44c0 .69-.13 1.46-.8 2.07C14 16.45 12.66 17 10 17s-4.01-.55-4.7-1.18a2.63 2.63 0 01-.8-2.07v-.44c0-.44.36-.8.8-.8z" | ||
/> | ||
</svg> | ||
</fast-anchor> | ||
</div> | ||
|
||
<h2>Icon in default slot</h2> | ||
<fast-anchor href="#"> | ||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M6.5,7.7h-1v-1h1V7.7z M10.6,7.7h-1v-1h1V7.7z M14.7,6.7v2.1h-1v2.6c0,0.2,0,0.4-0.1,0.6c-0.1,0.2-0.2,0.4-0.3,0.5c-0.1,0.1-0.3,0.3-0.5,0.3c-0.2,0.1-0.4,0.1-0.6,0.1H10l-3.5,3v-3H3.9c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.2-0.5-0.3c-0.1-0.1-0.3-0.3-0.3-0.5c-0.1-0.2-0.1-0.4-0.1-0.6V8.8h-1V6.7h1V5.2c0-0.2,0-0.4,0.1-0.6c0.1-0.2,0.2-0.4,0.3-0.5c0.1-0.1,0.3-0.3,0.5-0.3c0.2-0.1,0.4-0.1,0.6-0.1h3.6V1.9C7.3,1.8,7.2,1.7,7.1,1.5C7,1.4,7,1.2,7,1C7,0.9,7,0.8,7,0.6c0.1-0.1,0.1-0.2,0.2-0.3c0.1-0.1,0.2-0.2,0.3-0.2C7.7,0,7.9,0,8,0c0.1,0,0.3,0,0.4,0.1c0.1,0.1,0.2,0.1,0.3,0.2C8.8,0.4,8.9,0.5,9,0.6C9,0.8,9,0.9,9,1c0,0.2,0,0.4-0.1,0.5C8.8,1.7,8.7,1.8,8.5,1.9v1.7h3.6c0.2,0,0.4,0,0.6,0.1c0.2,0.1,0.4,0.2,0.5,0.3c0.1,0.1,0.3,0.3,0.3,0.5c0.1,0.2,0.1,0.4,0.1,0.6v1.5H14.7z M12.6,5.2c0-0.1-0.1-0.3-0.2-0.4c-0.1-0.1-0.2-0.2-0.4-0.2H3.9c-0.1,0-0.3,0.1-0.4,0.2C3.4,4.9,3.4,5,3.4,5.2v6.2c0,0.1,0.1,0.3,0.2,0.4c0.1,0.1,0.2,0.2,0.4,0.2h3.6v1.8l2.1-1.8h2.5c0.1,0,0.3-0.1,0.4-0.2c0.1-0.1,0.2-0.2,0.2-0.4V5.2z M5.8,8.9c0.3,0.3,0.6,0.5,1,0.7C7.2,9.7,7.6,9.8,8,9.8s0.8-0.1,1.2-0.2c0.4-0.2,0.7-0.4,1-0.7l0.7,0.7c-0.4,0.4-0.8,0.7-1.4,0.9c-0.5,0.2-1,0.3-1.6,0.3s-1.1-0.1-1.6-0.3c-0.5-0.2-1-0.5-1.3-0.9L5.8,8.9z" | ||
/> | ||
</svg> | ||
</fast-anchor> | ||
<h4>Icon in default slot</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void"> | ||
<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M12 5.5a1 1 0 100 2 1 1 0 000-2zm-5 1a1 1 0 112 0 1 1 0 01-2 0zm3.5-4a.5.5 0 00-1 0V3h-3C5.67 3 5 3.67 5 4.5v4c0 .83.67 1.5 1.5 1.5h7c.83 0 1.5-.67 1.5-1.5v-4c0-.83-.67-1.5-1.5-1.5h-3v-.5zM6.5 4h7c.28 0 .5.22.5.5v4a.5.5 0 01-.5.5h-7a.5.5 0 01-.5-.5v-4c0-.28.22-.5.5-.5zm3.75 14c2.62-.04 4.2-.6 5.12-1.44A3.52 3.52 0 0016.5 14h.01v-.69c0-1-.81-1.8-1.8-1.8h-3.2v-.01H5.3c-.99 0-1.8.81-1.8 1.81v.7c.04.77.25 1.75 1.13 2.55.93.84 2.5 1.4 5.12 1.44h.5zm-4.94-5.5h9.38c.45 0 .81.37.81.81v.44c0 .69-.13 1.46-.8 2.07C14 16.45 12.66 17 10 17s-4.01-.55-4.7-1.18a2.63 2.63 0 01-.8-2.07v-.44c0-.44.36-.8.8-.8z" | ||
/> | ||
</svg> | ||
</fast-anchor> | ||
<fast-anchor> | ||
<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M12 5.5a1 1 0 100 2 1 1 0 000-2zm-5 1a1 1 0 112 0 1 1 0 01-2 0zm3.5-4a.5.5 0 00-1 0V3h-3C5.67 3 5 3.67 5 4.5v4c0 .83.67 1.5 1.5 1.5h7c.83 0 1.5-.67 1.5-1.5v-4c0-.83-.67-1.5-1.5-1.5h-3v-.5zM6.5 4h7c.28 0 .5.22.5.5v4a.5.5 0 01-.5.5h-7a.5.5 0 01-.5-.5v-4c0-.28.22-.5.5-.5zm3.75 14c2.62-.04 4.2-.6 5.12-1.44A3.52 3.52 0 0016.5 14h.01v-.69c0-1-.81-1.8-1.8-1.8h-3.2v-.01H5.3c-.99 0-1.8.81-1.8 1.81v.7c.04.77.25 1.75 1.13 2.55.93.84 2.5 1.4 5.12 1.44h.5zm-4.94-5.5h9.38c.45 0 .81.37.81.81v.44c0 .69-.13 1.46-.8 2.07C14 16.45 12.66 17 10 17s-4.01-.55-4.7-1.18a2.63 2.63 0 01-.8-2.07v-.44c0-.44.36-.8.8-.8z" | ||
/> | ||
</svg> | ||
</fast-anchor> | ||
</div> | ||
|
||
<h2>With aria-label</h2> | ||
<fast-anchor href="#" aria-label="Anchor with aria-label"></fast-anchor> | ||
<h4>With aria-label</h4> | ||
<div class="grid-row"> | ||
<fast-anchor href="javascript:void" aria-label="Anchor with aria-label"></fast-anchor> | ||
<fast-anchor aria-label="Anchor with aria-label"></fast-anchor> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 21 additions & 11 deletions
32
packages/web-components/fast-components/src/breadcrumb-item/fixtures/base.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,37 @@ | ||
<h1>Breadcrumbs</h1> | ||
|
||
<h2>Default</h2> | ||
<fast-breadcrumb-item href="#">Breadcrumb item</fast-breadcrumb-item> | ||
<h4>Default</h4> | ||
<fast-breadcrumb-item href="javascript:void">Breadcrumb item</fast-breadcrumb-item> | ||
|
||
<h2>Without href</h2> | ||
<h4>No href</h4> | ||
<fast-breadcrumb-item>Breadcrumb item</fast-breadcrumb-item> | ||
|
||
<h2>With start</h2> | ||
<fast-breadcrumb-item href="#"> | ||
<h4>Default with custom separator</h4> | ||
<fast-breadcrumb-item href="javascript:void"> | ||
Breadcrumb item | ||
<svg slot="start" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> | ||
<svg slot="separator" width="28" height="28" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M6.5 7.7h-1v-1h1v1zm4.1 0h-1v-1h1v1zm4.1-1v2.1h-1v2.6l-.1.6-.3.5c-.1.1-.3.3-.5.3l-.6.1H10l-3.5 3v-3H3.9l-.6-.1-.5-.3c-.1-.1-.3-.3-.3-.5l-.1-.6V8.8h-1V6.7h1V5.2l.1-.6.3-.5c.1-.1.3-.3.5-.3l.6-.1h3.6V1.9a.8.8 0 01-.4-.4L7 1V.6l.2-.3.3-.2L8 0l.4.1.3.2.3.3V1l-.1.5-.4.4v1.7h3.6l.6.1.5.3c.1.1.3.3.3.5l.1.6v1.5h1.1zm-2.1-1.5l-.2-.4-.4-.2H3.9l-.4.2-.1.4v6.2l.2.4.4.2h3.6v1.8L9.7 12h2.5l.4-.2.2-.4V5.2zM5.8 8.9l1 .7 1.2.2a5 5 0 001.2-.2l1-.7.7.7c-.4.4-.8.7-1.4.9-.5.2-1 .3-1.6.3s-1.1-.1-1.6-.3A3 3 0 015 9.6l.8-.7z" | ||
d="M15.27 4.2a.75.75 0 00-1.04 1.1l8.27 7.95H3.75a.75.75 0 000 1.5H22.5l-8.27 7.96a.75.75 0 001.04 1.08l9.43-9.07a1 1 0 000-1.44L15.27 4.2z" | ||
/> | ||
</svg> | ||
</fast-breadcrumb-item> | ||
|
||
<h2>With end</h2> | ||
<fast-breadcrumb-item href="#"> | ||
<h4>With start</h4> | ||
<fast-breadcrumb-item href="javascript:void"> | ||
Breadcrumb item | ||
<svg slot="end" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> | ||
<svg slot="start" width="20" height="20" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M6.5 7.7h-1v-1h1v1zm4.1 0h-1v-1h1v1zm4.1-1v2.1h-1v2.6l-.1.6-.3.5c-.1.1-.3.3-.5.3l-.6.1H10l-3.5 3v-3H3.9l-.6-.1-.5-.3c-.1-.1-.3-.3-.3-.5l-.1-.6V8.8h-1V6.7h1V5.2l.1-.6.3-.5c.1-.1.3-.3.5-.3l.6-.1h3.6V1.9a.8.8 0 01-.4-.4L7 1V.6l.2-.3.3-.2L8 0l.4.1.3.2.3.3V1l-.1.5-.4.4v1.7h3.6l.6.1.5.3c.1.1.3.3.3.5l.1.6v1.5h1.1zm-2.1-1.5l-.2-.4-.4-.2H3.9l-.4.2-.1.4v6.2l.2.4.4.2h3.6v1.8L9.7 12h2.5l.4-.2.2-.4V5.2zM5.8 8.9l1 .7 1.2.2a5 5 0 001.2-.2l1-.7.7.7c-.4.4-.8.7-1.4.9-.5.2-1 .3-1.6.3s-1.1-.1-1.6-.3A3 3 0 015 9.6l.8-.7z" | ||
d="M12 5.5a1 1 0 100 2 1 1 0 000-2zm-5 1a1 1 0 112 0 1 1 0 01-2 0zm3.5-4a.5.5 0 00-1 0V3h-3C5.67 3 5 3.67 5 4.5v4c0 .83.67 1.5 1.5 1.5h7c.83 0 1.5-.67 1.5-1.5v-4c0-.83-.67-1.5-1.5-1.5h-3v-.5zM6.5 4h7c.28 0 .5.22.5.5v4a.5.5 0 01-.5.5h-7a.5.5 0 01-.5-.5v-4c0-.28.22-.5.5-.5zm3.75 14c2.62-.04 4.2-.6 5.12-1.44A3.52 3.52 0 0016.5 14h.01v-.69c0-1-.81-1.8-1.8-1.8h-3.2v-.01H5.3c-.99 0-1.8.81-1.8 1.81v.7c.04.77.25 1.75 1.13 2.55.93.84 2.5 1.4 5.12 1.44h.5zm-4.94-5.5h9.38c.45 0 .81.37.81.81v.44c0 .69-.13 1.46-.8 2.07C14 16.45 12.66 17 10 17s-4.01-.55-4.7-1.18a2.63 2.63 0 01-.8-2.07v-.44c0-.44.36-.8.8-.8z" | ||
/> | ||
</svg> | ||
</fast-breadcrumb-item> | ||
|
||
<h4>With end</h4> | ||
<fast-breadcrumb-item href="javascript:void"> | ||
Breadcrumb item | ||
<svg slot="end" width="20" height="20" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M12 5.5a1 1 0 100 2 1 1 0 000-2zm-5 1a1 1 0 112 0 1 1 0 01-2 0zm3.5-4a.5.5 0 00-1 0V3h-3C5.67 3 5 3.67 5 4.5v4c0 .83.67 1.5 1.5 1.5h7c.83 0 1.5-.67 1.5-1.5v-4c0-.83-.67-1.5-1.5-1.5h-3v-.5zM6.5 4h7c.28 0 .5.22.5.5v4a.5.5 0 01-.5.5h-7a.5.5 0 01-.5-.5v-4c0-.28.22-.5.5-.5zm3.75 14c2.62-.04 4.2-.6 5.12-1.44A3.52 3.52 0 0016.5 14h.01v-.69c0-1-.81-1.8-1.8-1.8h-3.2v-.01H5.3c-.99 0-1.8.81-1.8 1.81v.7c.04.77.25 1.75 1.13 2.55.93.84 2.5 1.4 5.12 1.44h.5zm-4.94-5.5h9.38c.45 0 .81.37.81.81v.44c0 .69-.13 1.46-.8 2.07C14 16.45 12.66 17 10 17s-4.01-.55-4.7-1.18a2.63 2.63 0 01-.8-2.07v-.44c0-.44.36-.8.8-.8z" | ||
/> | ||
</svg> | ||
</fast-breadcrumb-item> |
Oops, something went wrong.