Class Helpers

Our Page Builder allows you to do a whole bunch of cool things. However, it does have its limitations and you may find that you need to do something a bit fancier than what you can do in the builder.

To help you out, we've built a bunch of class helpers that you can use to take your campaigns to the next level. Just copy them from the tables below and paste them into the relevant settings and you're away!

💡

You can also create your own custom class helpers as well 👀

Row Helpers

These classes can be applied to any row.

When editing a page choose the ⚙️Settings on the far right of the editor (not to be confused with the ⚙️ for a particular block). Then add the class in Advanced under Attributes > Custom Class

ClassDescription
row--full-widthThe row content will no longer be contained to the default max width (1200px), and will instead be the full width of the viewport
row--fill-viewportThe row will fill at least 100% (100vh) of the available viewport height
row--three-quarters-viewportThe row will fill at least 75% (75vh) of the available viewport height
row--half-viewportThe row will fill at least 50% (50vh) of the available viewport height
row--quarter-viewportThe row will fill at least 25% (25vh) of the available viewport height
row--borderAdd a subtle border (default width 1px) to the top and bottom of the row
row--border-top/bottomAdd a subtle border (default width 1px) to either the top or bottom of the row e.g. row--border-top to add a border to the top of the row
row--bg-halfMake the background image fill up only half of the row. This defaults to the left half of the row.

Note: the image will not display on screens less than 736px wide.
row--bg-rightCombine with row--bg-half to place the background image in the right instead of left.

Block Helpers

These classes can be applied to any block.

When editing a page choose the block ⚙️Settings, then add the class in Advanced under Attributes > Custom Class

ClassDescription
block--fill-viewportThe block will fill at least 100% (100vh) of the available viewport height
block--three-quarters-viewportThe block will fill at least 75% (75vh) of the available viewport height
block--half-viewportThe block will fill at least 50% (50vh) of the available viewport height
block--quarter-viewportThe block will fill at least 25% (25vh) of the available viewport height

Display Helpers

These can be added to both blocks and rows to show / hide content under certain conditions.

ClassDescription
show/hide--logged-outThe content will shown/hidden when the user is logged out
show/hide--logged-inThe content will shown/hidden when the user is logged in
show/hide--ownedCan be used on a profile page to show/hide content if the user owns the current profile (individual or team owner)
show--is-clientShow content only on the client (live website). Will not display in the editor. Can be helpful when building custom components.
show--is-editorShow content only in the editor/page builder. Will not display in the client (live site). Can be helpful when building empty states and custom components.
show/hide--[fundraiser-theme-path]Show/content content dependent on a specific Fundraiser Theme. For example, if you wanted to display a resource specific to Birthday Fundraisers (path could be: challenge-birthday), then you would add show--challenge-birthday and it would only display when the fundraiser has chosen that fundraiser theme.

Typographic Helpers

These classes can be applied to any heading or paragraph block.

When editing a page choose the block ⚙️Settings, then add the class in Advanced under Attributes > Custom Class

ClassDescription
align-center--tb/mbAlign the text on tablet/mobile when otherwise set to a different alignment e.g. you want the text to be aligned left on large screens, but centered on smaller screens
links--color-inheritBy default, links use the color set in Design > Fonts. This class ensures that any links will instead use the default text color of their container.
smallestThis class is to be used with a paragraph set the text to be 65% of the default text size
smallerThis class is to be used with a paragraph set the text to be 75% of the default text size
smallThis class is to be used with a paragraph set the text to be 85% of the default text size
largeThis class is to be used with a paragraph set the text to be 115% of the default text size
largerThis class is to be used with a paragraph set the text to be 125% of the default text size
largestThis class is to be used with a paragraph set the text to be 135% of the default text size

Button Helpers

These classes can be applied to any button row block, or to an individual button within that block.

For the button row, go to the block ⚙️Settings, then add the class in Advanced under Attributes > Custom Class.

For an individual button, you can add a class (or multiple classes) to the [Button Number] Custom Classes field.

ClassDescription
buttons--fullThis will make all the buttons contained within this element full width (100%)
buttons--halfThis will make all the buttons contained within this element at least 50%
buttons--smallThis will make reduce the size of buttons contained within this element
button--fullThis will make the button full width (100%). This needs to be added to an individual button's Custom Class.
button--halfThis will make the button width at least 50%. This needs to be added to an individual button's Custom Class.
button--smallThis will reduce the size of the button. This needs to be added to an individual button's Custom Class.

Custom Class Helpers

Although we've done our best to bake-in helpers that we think you might need, this is definitely not an exhaustive list and you might find that you need to add your own class helpers. Luckily, this is super straightforward.

You can simply add a custom class to any Row, Column, or Block, and write some styles to get everything looking just right 👌

Here are a couple of CSS starters to help you style your elements:

// Row Helper Example

.row {
  
  &--[class-helper-suffix] {
    // target row
    
    .row__bg {
      // target row background
    }
    
    .row__container {
      // target element that contains the columns
    }
    
    .col {
      // target all columns
      
      &:nth-of-type([X]n) {
        // target a specific ([X]) column
      }
    }
  }
  
  &--[another-class-helper-suffix] {
    // ...
  }
}
// Column Helper Example

.col {
  
  &--[class-helper-suffix] {
    // target column
    
    .col__container {
      // target element that contains all the blocks
      // this is also the element that padding, borders,
      // and colors are applied to
    }
    
    .page--is-editor & .col__container [class*="BlockWrapperContainer"] > * [data-test-id],
    .page--is-editor & .col__container .raisely-blockwrapper,
    .page--is-client & .col__container > * {
      // target all blocks inside this column
      // we need to add some extra specificity for the editor
      // because the DOM structure is slightly different
    }
  }
}
// Block Helper Example

.block {
  
  &--[class-helper-suffix] {
    // target block
    
    .foo {
      // target child element with class .foo
    }
  }
}

🚧

What's the deal with all the classes in the DOM that start withcss-?

If you've been poking around in inspector, you'll have noticed that the DOM is dotted with a number of classes that start with css- and are followed by a random collection of letters and numbers. These are used to apply a collection of dynamic styles that you can adjust in the page builder (e.g. padding, margins, colours etc.). The randomised naming convention comes from Emotion and is used to avoid any interference with other classes on the page.

The most important thing to note about these classes are that they dynamically generated and might change when any of those values are updated, or if any adjustments are made behind the scenes on our end.

This makes them a lot more volatile when compared to our base logical classes used for our elements (e.g. donation-form), class helpers, or any other custom classes that you add, as these are static and won't change.

With this in mind, please avoid writing custom styles that rely on these dynamic classes and instead add your own custom classes, which we can guarantee won't change.

For example, instead of writing styles this like:

.css-12b4da7 .element {
      // ... awesome styles that might stop working 🥲
}

Add a custom class to the row, block, or column that you want to target and do something like this:

.my-amazing-class .element {
      // ... awesome styles that will always get applied 💪
}