diff --git a/src/docs/components/SnippetCard.js b/src/docs/components/SnippetCard.js
index 63039a542..beb993de8 100644
--- a/src/docs/components/SnippetCard.js
+++ b/src/docs/components/SnippetCard.js
@@ -96,18 +96,12 @@ const FullCard = ({ snippetData, difficulty, isDarkMode }) => {
>
{examplesOpen ?
These snippets, while useful and interesting, didn't quite make it into the repository due to either having very specific use-cases or being outdated. However we felt like they might still be useful to some readers, so here they are.
-Click on a snippet's name to view its code.
+Click on a snippet card to view the snippet.
{posts && posts.map(({ node }) => (- Click on a snippet's name to view its code. + Click on a snippet card to view the snippet.
- Click on a snippet’s name to view its code or a tag name to view all + Click on a snippet card to view the snippet or a tag name to view all snippets in that category.
{tags.sort((a,b) => a.localeCompare(b)).map(tag => ( diff --git a/src/docs/pages/search.js b/src/docs/pages/search.js index dac028f95..7e582ce60 100644 --- a/src/docs/pages/search.js +++ b/src/docs/pages/search.js @@ -49,7 +49,7 @@ const SearchPage = props => { setSearchQuery={setSearchQuery} defaultValue={props.searchQuery} /> -Click on a snippet's name to view its code.
+Click on a snippet card to view the snippet.
{/* Display page background or results depending on state */} {searchQuery.length === 0 ? ( <> diff --git a/src/docs/styles/_card.scss b/src/docs/styles/_card.scss index b260a4e55..4dab5ee71 100644 --- a/src/docs/styles/_card.scss +++ b/src/docs/styles/_card.scss @@ -2,6 +2,8 @@ // Cards // =================================================== .card { + backface-visibility: hidden; + will-change: transform; position: relative; transition: all 0.3s ease; margin: 1rem 1.25rem; @@ -143,3 +145,14 @@ margin-top: 0.375rem; } } + +.clickable-card-wrapper { + &:link, &:visited { + &:hover, &:focus { + text-decoration: none; + .card { + transform: scale(1.025); + } + } + } +} diff --git a/src/docs/templates/TagPage.js b/src/docs/templates/TagPage.js index 492bba162..101605ad2 100644 --- a/src/docs/templates/TagPage.js +++ b/src/docs/templates/TagPage.js @@ -25,7 +25,7 @@ const TagRoute = props => {Click on a snippet's name to view its code.
+Click on a snippet card to view the snippet.
{posts && posts.map(({ node }) => (