Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanjfshaw/8016ecb175fd2af26d9f7b529cb0f0ac to your computer and use it in GitHub Desktop.
Save jonathanjfshaw/8016ecb175fd2af26d9f7b529cb0f0ac to your computer and use it in GitHub Desktop.
Refactor paragraphs behavior style widths
/**
.paragraphs-behavior-style--side and .paragraphs-behavior-style--widths are
are only used on screens larger than mobile.
**/
@media #{screen and (min-width: #{$screen-sm-min})} {
.paragraphs-behavior-style--side-right {
.field--name-field-content,
.paragraph--type--two-column-with-expandable-pane .field--name-field-content-3 .panel-heading .panel-title {
padding-right: 15px;
}
.field--name-field-content-2 {
padding-left: 15px;
}
}
.paragraphs-behavior-style--side-left {
flex-direction: row-reverse;
.field--name-field-content,
.paragraph--type--two-column-with-expandable-pane .field--name-field-content-3 .panel-heading .panel-title {
padding-left: 15px;
}
.field--name-field-content-2 {
padding-right: 15px;
}
}
.paragraphs-behavior-style--widths--4-3 {
.field--name-field-content,
.paragraph--type--two-column-with-expandable-pane .field--name-field-content-3 .panel-heading .panel-title {
flex-basis: 42.8%;
}
.field--name-field-content-2 {
flex-basis: 57.2%;
}
}
.paragraphs-behavior-style--widths--1-1 {
.field--name-field-content,
.paragraph--type--two-column-with-expandable-pane .field--name-field-content-3 .panel-heading .panel-title {
flex-basis: 50%;
}
.field--name-field-content-2 {
flex-basis: 50%;
}
}
.paragraphs-behavior-style--widths--2-1 {
.field--name-field-content,
.paragraph--type--two-column-with-expandable-pane .field--name-field-content-3 .panel-heading .panel-title {
flex-basis: 67.1%;
}
.field--name-field-content-2 {
flex-basis: 32.9%;
}
}
.paragraphs-behavior-style--widths--3-1 {
.field--name-field-content,
.paragraph--type--two-column-with-expandable-pane .field--name-field-content-3 .panel-heading .panel-title {
flex-basis: 75.6%;
}
.field--name-field-content-2 {
flex-basis: 24.4%;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment