Skip to content

Commit

Permalink
docs(logo-wall): use container queries, fix overflow (#1800)
Browse files Browse the repository at this point in the history
Co-authored-by: Steven Spriggs <[email protected]>
Co-authored-by: Benny Powers - עם ישראל חי! <[email protected]>
  • Loading branch information
3 people authored Sep 8, 2024
1 parent 18bc59f commit 90ab2dd
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 113 deletions.
39 changes: 21 additions & 18 deletions docs/patterns/logo-wall/logo-wall-lightdom.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
:root {
--logo-wall-container-max-width: 1070px;
--logo-wall-logo-max-height: 40px;
--logo-wall-logo-min-height: 40px;
--logo-wall-logo-max-width: 190px;
--logo-wall-logo-min-width: 130px;
}

.logo-wall-container {
container: logo-wall-container / inline-size;
}

.logo-wall {
display: flex;
flex-wrap: wrap;
gap: var(--rh-space-2xl, 32px);
justify-content: center;
}
Expand Down Expand Up @@ -80,36 +86,33 @@
outline-offset: 0;
}

.logo-wall--two-columns {
display: grid;
grid-template-columns: 1fr 1fr;
}

.logo-wall--two-columns,
.logo-wall--three-columns {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 1199px) {
.logo-wall {
flex-wrap: wrap;
@container logo-wall-container (min-width: 300px) {
.logo-wall--two-columns,
.logo-wall--three-columns {
grid-template-columns: repeat(2, 1fr);
}
}

@container host (max-width: 992px) {
.logo-wall {
flex-wrap: wrap;
@container logo-wall-container (min-width: 450px) {
.logo-wall--three-columns {
grid-template-columns: repeat(3, 1fr);
}
}

@media (max-width: 768px) {
.logo-wall--three-columns {
grid-template-columns: repeat(auto-fill, minmax(var(--logo-wall-logo-min-width), 1fr)) !important;
@container logo-wall-container (min-width: 992px) {
.logo-wall {
flex-wrap: nowrap;
max-width: var(--logo-wall-container-max-width, 1070px);
}
}

@container host (max-width: 768px) {
.logo-wall--three-columns {
grid-template-columns: repeat(auto-fill, minmax(var(--logo-wall-logo-min-width), 1fr)) !important;
@container logo-wall-container (min-width: 1200px) {
.logo-wall {
max-width: none;
}
}
56 changes: 29 additions & 27 deletions docs/patterns/logo-wall/patterns/1x1-grid-flat.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
<div class="example-1x1-grid-flat">
<h6>Organizations succeeding with Red Hat</h6>
<div class="logo-wall logo-wall--borderless">
<a href="#">
<img src="../google-cloud.svg" class="logo-wall--light" alt="Logo for Red Hat partner Google Cloud">
<img src="../google-cloud-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Google Cloud">
</a>
<a href="#">
<img src="../capgemini.svg" class="logo-wall--light" alt="Logo for Red Hat partner Capgemini">
<img src="../capgemini.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Capgemini">
</a>
<a href="#">
<img src="../cisco.svg" class="logo-wall--light" alt="Logo for Red Hat partner Cisco">
<img src="../cisco.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Cisco">
</a>
<a href="#">
<img src="../gitlab.svg" class="logo-wall--light" alt="Logo for Red Hat partner Gitlab">
<img src="../gitlab-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Gitlab">
</a>
<a href="#">
<img src="../aws.svg" class="logo-wall--light" alt="Logo for Red Hat partner Amazon web services">
<img src="../aws-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Amazon web services">
</a>
<a href="#">
<img src="../microsoft.svg" class="logo-wall--light" alt="Logo for Red Hat partner Microsoft">
<img src="../microsoft-azure-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Microsoft">
</a>
<div class="logo-wall-container">
<div class="logo-wall logo-wall--borderless">
<a href="#">
<img src="../google-cloud.svg" class="logo-wall--light" alt="Logo for Red Hat partner Google Cloud">
<img src="../google-cloud-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Google Cloud">
</a>
<a href="#">
<img src="../capgemini.svg" class="logo-wall--light" alt="Logo for Red Hat partner Capgemini">
<img src="../capgemini.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Capgemini">
</a>
<a href="#">
<img src="../cisco.svg" class="logo-wall--light" alt="Logo for Red Hat partner Cisco">
<img src="../cisco.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Cisco">
</a>
<a href="#">
<img src="../gitlab.svg" class="logo-wall--light" alt="Logo for Red Hat partner Gitlab">
<img src="../gitlab-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Gitlab">
</a>
<a href="#">
<img src="../aws.svg" class="logo-wall--light" alt="Logo for Red Hat partner Amazon web services">
<img src="../aws-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Amazon web services">
</a>
<a href="#">
<img src="../microsoft.svg" class="logo-wall--light" alt="Logo for Red Hat partner Microsoft">
<img src="../microsoft-azure-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Microsoft">
</a>
</div>
<rh-cta href="#">See all customer stories</rh-cta>
</div>
</div>
<rh-cta href="#">See all customer stories</rh-cta>
</div>

<link rel="stylesheet" href="../logo-wall-lightdom.css">

Expand Down
54 changes: 28 additions & 26 deletions docs/patterns/logo-wall/patterns/1x1-grid.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
<div class="example-1x1-grid">
<h6>Organizations succeeding with Red Hat</h6>
<div class="logo-wall logo-wall--bordered">
<a href="#">
<img src="../google-cloud.svg" class="logo-wall--light" alt="Logo for Red Hat partner Google Cloud">
<img src="../google-cloud-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Google Cloud">
</a>
<a href="#">
<img src="../capgemini.svg" class="logo-wall--light" alt="Logo for Red Hat partner Capgemini">
<img src="../capgemini.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Capgemini">
</a>
<a href="#">
<img src="../cisco.svg" class="logo-wall--light" alt="Logo for Red Hat partner Cisco">
<img src="../cisco.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Cisco">
</a>
<a href="#">
<img src="../gitlab.svg" class="logo-wall--light" alt="Logo for Red Hat partner Gitlab">
<img src="../gitlab-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Gitlab">
</a>
<a href="#">
<img src="../aws.svg" class="logo-wall--light" alt="Logo for Red Hat partner Amazon web services">
<img src="../aws-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Amazon web services">
</a>
<a href="#">
<img src="../microsoft.svg" class="logo-wall--light" alt="Logo for Red Hat partner Microsoft">
<img src="../microsoft-azure-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Microsoft">
</a>
<div class="logo-wall-container">
<div class="logo-wall logo-wall--bordered">
<a href="#">
<img src="../google-cloud.svg" class="logo-wall--light" alt="Logo for Red Hat partner Google Cloud">
<img src="../google-cloud-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Google Cloud">
</a>
<a href="#">
<img src="../capgemini.svg" class="logo-wall--light" alt="Logo for Red Hat partner Capgemini">
<img src="../capgemini.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Capgemini">
</a>
<a href="#">
<img src="../cisco.svg" class="logo-wall--light" alt="Logo for Red Hat partner Cisco">
<img src="../cisco.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Cisco">
</a>
<a href="#">
<img src="../gitlab.svg" class="logo-wall--light" alt="Logo for Red Hat partner Gitlab">
<img src="../gitlab-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Gitlab">
</a>
<a href="#">
<img src="../aws.svg" class="logo-wall--light" alt="Logo for Red Hat partner Amazon web services">
<img src="../aws-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Amazon web services">
</a>
<a href="#">
<img src="../microsoft.svg" class="logo-wall--light" alt="Logo for Red Hat partner Microsoft">
<img src="../microsoft-azure-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Microsoft">
</a>
</div>
<rh-cta href="#">See all customer stories</rh-cta>
</div>
<rh-cta href="#">See all customer stories</rh-cta>
</div>

<link rel="stylesheet" href="../logo-wall-lightdom.css">
Expand Down
36 changes: 19 additions & 17 deletions docs/patterns/logo-wall/patterns/2x2-grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@ <h4>Need a business partner?</h4>
<p>In the digital transformation journey we’re on, there’s a lot of change. There’s a need to reach markets quickly. And to do that we need productive developers who are able to get ideas into production safely, in a day, every day. </p>
<rh-cta variant="primary" href="#">Find a business partner</rh-cta>
</div>
<div class="logo-wall logo-wall--two-columns logo-wall--bordered">
<a href="#">
<img src="../google-cloud.svg" class="logo-wall--light" alt="Logo for Red Hat partner Google Cloud">
<img src="../google-cloud-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Google Cloud">
</a>
<a href="#">
<img src="../capgemini.svg" class="logo-wall--light" alt="Logo for Red Hat partner Capgemini">
<img src="../capgemini.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Capgemini">
</a>
<a href="#">
<img src="../cisco.svg" class="logo-wall--light" alt="Logo for Red Hat partner Cisco">
<img src="../cisco.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Cisco">
</a>
<a href="#">
<img src="../gitlab.svg" class="logo-wall--light" alt="Logo for Red Hat partner Gitlab">
<img src="../gitlab-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Gitlab">
</a>
<div class="logo-wall-container">
<div class="logo-wall logo-wall--two-columns logo-wall--bordered">
<a href="#">
<img src="../google-cloud.svg" class="logo-wall--light" alt="Logo for Red Hat partner Google Cloud">
<img src="../google-cloud-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Google Cloud">
</a>
<a href="#">
<img src="../capgemini.svg" class="logo-wall--light" alt="Logo for Red Hat partner Capgemini">
<img src="../capgemini.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Capgemini">
</a>
<a href="#">
<img src="../cisco.svg" class="logo-wall--light" alt="Logo for Red Hat partner Cisco">
<img src="../cisco.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Cisco">
</a>
<a href="#">
<img src="../gitlab.svg" class="logo-wall--light" alt="Logo for Red Hat partner Gitlab">
<img src="../gitlab-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Gitlab">
</a>
</div>
</div>
</div>

Expand Down
52 changes: 27 additions & 25 deletions docs/patterns/logo-wall/patterns/2x3-grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,33 @@ <h4>Need a business partner?</h4>
<p>In the digital transformation journey we’re on, there’s a lot of change. There’s a need to reach markets quickly. And to do that we need productive developers who are able to get ideas into production safely, in a day, every day. </p>
<rh-cta variant="primary" href="#">Find a business partner</rh-cta>
</div>
<div class="logo-wall logo-wall--three-columns logo-wall--bordered">
<a href="#">
<img src="../google-cloud.svg" class="logo-wall--light" alt="Logo for Red Hat partner Google Cloud">
<img src="../google-cloud-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Google Cloud">
</a>
<a href="#">
<img src="../capgemini.svg" class="logo-wall--light" alt="Logo for Red Hat partner Capgemini">
<img src="../capgemini.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Capgemini">
</a>
<a href="#">
<img src="../cisco.svg" class="logo-wall--light" alt="Logo for Red Hat partner Cisco">
<img src="../cisco.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Cisco">
</a>
<a href="#">
<img src="../gitlab.svg" class="logo-wall--light" alt="Logo for Red Hat partner Gitlab">
<img src="../gitlab-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Gitlab">
</a>
<a href="#">
<img src="../aws.svg" class="logo-wall--light" alt="Logo for Red Hat partner Amazon web services">
<img src="../aws-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Amazon web services">
</a>
<a href="#">
<img src="../microsoft.svg" class="logo-wall--light" alt="Logo for Red Hat partner Microsoft">
<img src="../microsoft-azure-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Microsoft">
</a>
<div class="logo-wall-container">
<div class="logo-wall logo-wall--three-columns logo-wall--bordered">
<a href="#">
<img src="../google-cloud.svg" class="logo-wall--light" alt="Logo for Red Hat partner Google Cloud">
<img src="../google-cloud-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Google Cloud">
</a>
<a href="#">
<img src="../capgemini.svg" class="logo-wall--light" alt="Logo for Red Hat partner Capgemini">
<img src="../capgemini.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Capgemini">
</a>
<a href="#">
<img src="../cisco.svg" class="logo-wall--light" alt="Logo for Red Hat partner Cisco">
<img src="../cisco.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Cisco">
</a>
<a href="#">
<img src="../gitlab.svg" class="logo-wall--light" alt="Logo for Red Hat partner Gitlab">
<img src="../gitlab-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Gitlab">
</a>
<a href="#">
<img src="../aws.svg" class="logo-wall--light" alt="Logo for Red Hat partner Amazon web services">
<img src="../aws-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Amazon web services">
</a>
<a href="#">
<img src="../microsoft.svg" class="logo-wall--light" alt="Logo for Red Hat partner Microsoft">
<img src="../microsoft-azure-dark.svg" class="logo-wall--dark" alt="Logo for Red Hat partner Microsoft">
</a>
</div>
</div>
</div>

Expand Down

0 comments on commit 90ab2dd

Please sign in to comment.