Here are some examples of various things you can do with custom CSS.
To ensure changes are made we recommend including !important to your code to override global styling set by Bento.
Padding in tooltips (extend to other elements)
Make H1 different in different guide types (tooltip vs. checklist)
Changing border color of outline buttons
You can change the border color of call-to-action buttons to be different from text. Add the following code and adjust the hex to your desired value
.bento-step-cta-button.border {
border-color:#E2E8F0 !important;
}
Moving the sidebar toggle
You can move the toggle up or down on your page with custom CSS. The following code will move the toggle to the bottom corner of the page.
.bento-sidebar-toggle {
top: calc(90% - 24px) !important;
}
Adding custom icons in headers
If you want to include icons in your titles, upload the SVG (recommended size is 24px by 24px), and then use the asset URL when targeting specific headers. Use the title of the header in the id class.
.h1-text[id='Tutorials'] {
background-image: url("https://uploads.trybento.co/media/xxx.svg");
}
Padding in tooltips
Change the padding in different elements with this code. Make sure you place the styles under the element of your choice, they should all be exposed via custom CSS.
.bento-tooltip
/*
* Change the padding of individual sides
*/
padding-left: 24px !important;
padding-left: 24px !important;
padding-left: 10px 24px !important;
/*
* Change the padding of vertical gaps and horizontal together
*/
padding: 10px 24p !important;
Checkbox corner radius
This will turn the circle checkboxes into squares in checklist guides
.bento-onboarding-checklist-checkbox {
border-radius:0px;
}
Floating sidebar corner radius
The floating sidebar has obvious round edges, if you want to square those off you can with this CSS class
.bento-floating-app {
border-radius:0px;
}
Make H1 different in different guide types
.bento-step-component-nested .h1-text {
color: red;
}
.bento-tooltip .h1-text {
color: red;
font-size: 20px !important;
font-weight: normal !important;
}
Modify styles at narrow breakpoints
When using Bento's inline elements, their styles will automatically adapt to a mobile responsive layout when the container where you've injected the Bento element is less than 700px.
These classes are for changes you want to make to the inline experience at narrow breakpoints.
.bento-inline-sm-header { }
.bento-inline-sm-header-content { }
.bento-inline-sm-header-subtitle { }
.bento-inline-sm-header-title { }
.bento-sidebar-header-title { }
Changing your font
Bento will inherit your default fonts from your web page. If that doesn't work the way you expect you can specify the font using CSS.
Identify the class you want to adjust. For example, the guide title. Then include the font family and any additional formatting to achieve your desired result.
.bento-guide-title {
font-family: 'Roboto';
font-weight:700;
font-size:28px;
line-height:120%;
color:#5d6769;
}