Skip to content

Commit

Permalink
docs(landingpage): fix the section width (#7695)
Browse files Browse the repository at this point in the history
docs: section width
  • Loading branch information
SoonIter authored Aug 27, 2024
1 parent 0665cbc commit d91d3e7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

.featureCard {
display: flex;
flex: 1 0 25%;
flex: 1 1 25%;
align-items: flex-start;
gap: 16px;
min-height: 110px;
Expand Down
31 changes: 1 addition & 30 deletions website/theme/components/Landingpage/WhyRspack/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
// ---------- responsive layout
// XXL
@media screen and (min-width: 1441px) {
.container {
padding: 32px 80px !important;
}
.featureCard {
flex: 1 0 30% !important;
}
}

// XL
@media screen and (min-width: 1281px) and (max-width: 1440px) {
.container {
padding: 32px 80px !important;
}
.featureCard {
flex: 1 0 30% !important;
}
}

// L
@media screen and (min-width: 835px) and (max-width: 1280px) {
.container {
padding: 32px 80px !important;
}
.featureCard {
min-width: 40% !important;
max-width: 50% !important;
Expand All @@ -32,9 +23,6 @@

// M
@media screen and (min-width: 601px) and (max-width: 834px) {
.container {
padding: 24px !important;
}
.whyRspack {
padding: 16px !important;
.whyRspackTitle {
Expand Down Expand Up @@ -64,9 +52,6 @@

// S
@media screen and (max-width: 600px) {
.container {
padding: 24px !important;
}
.whyRspack {
min-width: 100% !important;
padding: 16px !important;
Expand Down Expand Up @@ -97,21 +82,7 @@
// extra
.whyRspackBg {
max-width: 50% !important;
}
}

.container {
display: flex;
padding: 32px 144px;
justify-content: center;
align-items: center;

.innerContainer {
width: 100%;
max-width: 1440px;
display: flex;
flex-wrap: wrap;
gap: 16px;
max-height: 50% !important;
}
}

Expand Down
5 changes: 3 additions & 2 deletions website/theme/components/Landingpage/WhyRspack/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { memo } from 'react';
import { Link } from 'rspress/theme';
import { useI18n, useI18nUrl } from '../../../i18n';
import sharedStyles from '../shared.module.scss';
import Compatible from './assets/Compatible.svg';
import FrameCheck from './assets/FrameCheck.svg';
import Lightning from './assets/Lightning.svg';
Expand Down Expand Up @@ -203,8 +204,8 @@ const WhyRspack = memo(() => {
];

return (
<section className={styles.container}>
<div className={styles.innerContainer}>
<section className={sharedStyles.container}>
<div className={sharedStyles.innerContainer}>
<div className={styles.features}>
{/* Why Rspack? */}
<WhyRspackCard />
Expand Down
3 changes: 2 additions & 1 deletion website/theme/components/Landingpage/shared.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
gap: 32px;
flex-direction: column;
width: 100%;
max-width: 1280px;

max-width: 1440px;
}
}

Expand Down

0 comments on commit d91d3e7

Please sign in to comment.