Skip to content

Commit

Permalink
docs(examples): show more example tiles on small screen (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuuji3 authored Aug 2, 2024
1 parent b4afe30 commit 61fc29b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions website/src/components/example/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ export const ExampleHeader = styled.div`
font: bold 20px/28px var(--ifm-font-family-base);
color: var(--ifm-color-content-secondary);
margin: 0 20px;
border-bottom: 1px solid 20px;
display: inline-block;
padding: 20px 20px 4px 0;
${isMobile} {
margin: 0;
}
`;

export const MainExamples = styled.main`
Expand All @@ -18,17 +20,21 @@ export const ExamplesGroup = styled.main`
display: flex;
flex-wrap: wrap;
padding: 16px;
${isMobile} {
padding-inline: 0;
}
`;

export const ExampleCard = styled.a`
cursor: pointer;
text-decoration: none;
width: 50%;
max-width: 240px;
width: 240px;
max-width: 50%;
line-height: 0;
outline: none;
padding: 4px;
position: relative;
img {
transition-property: filter;
transition-duration: var(--ifm-transition-slow);
Expand All @@ -40,11 +46,8 @@ export const ExampleCard = styled.a`
&:hover img {
filter: contrast(0.2);
}
${isMobile} {
width: 33%;
min-width: 200px;
}
@media screen and (max-width: 632px) {
width: 50%;
}
`;
Expand Down

0 comments on commit 61fc29b

Please sign in to comment.