Skip to content

Commit

Permalink
alternating background color on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
Ida Klemmetsrud Isaksen committed Sep 1, 2023
1 parent 6df446b commit 9b96c77
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/varianttur/guildford23/bliKjent/bliKjent.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ h4 {
}

.variantContainer {
margin-bottom: 5rem;
padding-top: 2rem;
padding-bottom: 2rem;
}

.reverseVariantContainer {
composes: variantContainer;
background-color: var(--color-primary__shade2);
}

.personContainer,
Expand Down Expand Up @@ -95,6 +101,10 @@ h4 {
margin-bottom: 8rem;
}

.reverseVariantContainer {
background-color: var(--color-primary__shade1);
}

.personContainer,
.reversePersonContainer {
margin-bottom: 3rem;
Expand Down
2 changes: 1 addition & 1 deletion src/varianttur/guildford23/bliKjent/variantPlusOne.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { VariantPlusOneModel } from './getToKnow';

const VariantPlusOne = ({variant, variantIndex}: {variant: VariantPlusOneModel, variantIndex: number}) => {
return (
<div className={style.variantContainer}>
<div className={variantIndex % 2 !== 0 ? style.variantContainer : style.reverseVariantContainer}>
{variant.people.map((person, index) => <div key={index}><Person person={person} variantIndex={variantIndex} /></div>)}
</div>
);
Expand Down

0 comments on commit 9b96c77

Please sign in to comment.