Skip to content

Commit

Permalink
Merge pull request #21 from ramangupta44/feature/changes
Browse files Browse the repository at this point in the history
fix() : Promo RV Responsive CSS
  • Loading branch information
ramangupta44 authored Aug 1, 2023
2 parents c219c95 + 4e2fc07 commit 458e880
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
.image-left {

.card-wrapper {
flex-direction: row-reverse;
}
@include respond-to(mobile-to-tablet) {
.text-section {
.card-wrapper {
flex-direction: column-reverse;
}
}
.text-section {
flex-direction: row-reverse;

&.rounded-image {
@include respond-to(tablet-and-above){
.image-section {
margin-right: 3rem;
margin-left: 0;
}
.text-section {
padding-left: 3rem;
padding-right: 0;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@
align-items: center;
justify-content: center;
padding: 2rem;
margin-left: 3rem;
img {
border-radius: 50%;
object-fit: unset;
}
@include respond-to(mobile-to-tablet) {
max-width: 250px !important;
min-width: 250px;
max-height: 250px;
min-height: 250px;
margin: 0 auto 2rem auto;
}
}



@include respond-to(tablet-and-above) {
.row-cols-1 > * {
flex: 1;
Expand All @@ -34,7 +40,7 @@
}
}

.text-section {
.card-wrapper {
margin: 0;

.card-details {
Expand All @@ -45,4 +51,8 @@
.section-inner-space {
padding: 0;
}

.text-section {
padding-right: 3rem;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

.container {
margin: 0 0 0 2rem;
@include respond-to(laptop-and-above){
@include respond-to(laptop-and-above){
max-width: 720px;
}
}
Expand Down
14 changes: 8 additions & 6 deletions src/sxastarter/src/assets/sass/variants/promo/BasicCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
}

img {
width: 100%;
object-fit: contain;
max-width: 100%;
}
.ps-md-5 {
@include respond-to(tablet-and-above) {
padding-left: 0 !important;
padding-right: 3rem !important ;

.card-wrapper {
margin: 0;
}
.card-details {
@include respond-to(mobile-to-tablet) {
padding-bottom: 10px;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const Banner = (props: BannerTemplateProps): JSX.Element => {
return (
<div className={`banner ${props.params.styles}`}>
<section className={`banner-default`}>
<JssImage field={props?.fields?.Image} />
<JssImage field={props?.fields?.Image} width={''} height={''} />
<div className="container">
<div className="banner-content">
<Text tag="h1" field={props?.fields?.Title} />
Expand Down
6 changes: 3 additions & 3 deletions src/sxastarter/src/components/Promo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ export const BasicCard = (props: PromoProps): JSX.Element => {
id={id ? id : undefined}
>
<section className="section-inner-space">
<div className="row align-items-center row-cols-1 row-cols-md-2 gx-5 text-center text-md-start text-section">
<div className="col">
<div className="row align-items-center row-cols-1 row-cols-md-2 gx-5 text-center text-md-start card-wrapper">
<div className="col text-section">
<RichText className="mb-4" field={props?.fields?.PromoText} tag="h2" />
<RichText
className="text-align-justify card-details"
field={props?.fields?.PromoText2}
/>
</div>
<div className="col ps-md-5 image-section">
<JssImage field={props.fields.PromoIcon} />
<JssImage field={props.fields.PromoIcon} height={' '} width={' '} />
</div>
</div>
</section>
Expand Down

0 comments on commit 458e880

Please sign in to comment.