Skip to content

Commit

Permalink
Fix: Layout issue on documentation homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
nmn committed Nov 22, 2023
1 parent 228d145 commit 312c7ed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ of the project/

### License

stylex is [MIT licensed](./LICENSE).
StyleX is [MIT licensed](./LICENSE).
20 changes: 19 additions & 1 deletion apps/docs/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ export default function Home() {
);
}

const CTA_BREAK = '@media (max-width: 360px)';

const styles = stylex.create({
main: {
flexGrow: 1,
Expand Down Expand Up @@ -181,11 +183,23 @@ const styles = stylex.create({
opacity: 0.7,
},
ctaSection: {
alignItems: 'center',
display: 'flex',
gap: '1rem',
margin: '4rem',
justifyContent: 'center',
marginBlock: {
default: '4rem',
[CTA_BREAK]: '2rem',
},
flexDirection: {
default: 'row',
[CTA_BREAK]: 'column',
},
},
cta: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
borderRadius: 8,
color: {
default: 'var(--fg1)',
Expand All @@ -195,6 +209,10 @@ const styles = stylex.create({
default: 'none',
':hover': 'none',
},
width: {
default: 'null',
[CTA_BREAK]: '100%',
},
backgroundColor: 'hsl(var(--pink-h), var(--pink-s), var(--pink-l))',
paddingBlock: '0.75rem',
paddingInline: '2rem',
Expand Down

0 comments on commit 312c7ed

Please sign in to comment.