extends ../../layouts/LayoutComponent
include ../../mixins/utilities/StretchedLink
append variables
-
var pageHeader = {
title: 'Stretched Link',
description: 'Make any HTML element or Bootstrap component clickable by “stretching” a nested link via CSS.',
url: `https://getbootstrap.com/docs/${bootstrapVersion}/helpers/stretched-link/`,
linkText: 'Stretched-link on Bootstrap'
}
append content
+PageHeader(pageHeader)
+ComponentCard({
title: "Example",
description: `Add .stretched-link to a link to make its containing block clickable via a ::after pseudo element. In most cases, this means that an element with position: relative; that contains a link with the .stretched-link class is clickable.
Cards have position: relative by default in Bootstrap, so in this case you can safely add the .stretched-link class to a link in the card without any other HTML changes.
Multiple links and tap targets are not recommended with stretched links. However, someposition and z-index styles can help should this be required.`,
anchor: true
}).mb-3
+StretchedLinkExampleDemo
.card
.card-header
+StretchedLinkContainingBlockHeader.mt-2
.card-body.py-0
+ComponentCard({
title: false,
anchor: true,
}).mx-nx1.shadow-none.rounded-top-0
+StretchedLinkContainingBlockDemo