This is a reference guide meant to show you all of the available styles in your site and how to use them.
There are many CSS classes you can add to a layout block or even directly to content to affect the way it looks. You should not need most of these most of the time, but they can let you add some visual flair to a page.
You can apply any of the CSS classes that begin with bg- to change the background color of the element. Typically, the color of most elements will change automatically when they are on a background color that is darker (like the primary dark blue will have white text), but sometimes you may need to apply something manually as well.
Typically, if you add a background color, you will also want to add padding as well (see Spacing below), otherwise the content will run up right against the edges of the background.
CSS Class | Color |
---|---|
bg-paper | This is sample text. This is the default background. |
bg-primary | This is sample text. |
bg-secondary | This is sample text. |
bg-tertiary | This is sample text. |
bg-accent | This is sample text. |
bg-muted | This is sample text. |
bg-light | This is sample text. |
bg-dark | This is sample text. |
bg-success | This is sample text. |
Text color is not as frequently useful as background color, because the background color should set most text colors for you, and you typically don't want to change the color of text much. However, the below CSS classes should allow you to override the text color. Note that not all elements will override (like buttons).
CSS Class | Color |
---|---|
text-dark | This is sample text. This is the default text color. |
text-primary | This is sample text. |
text-secondary | This is sample text. |
text-tertiary | This is sample text. |
text-accent | This is sample text. |
text-light | This is sample text. |
text-success | This is sample text. |
We use a service named Icomoon to create a custom icon set, which is loaded onto the site. You can see the available icons here:
https://prod.gabar.org/ResourcePackages/GABar/assets/fonts/icomoon/demo.html
If you want to use an icon, copy the icon class, so "icon-directory" for example from that demo, and then apply it to an HTML element, usually a <span>, like this:
<span class="icon-directory"></span>
Which will look like this:
You can also apply any CSS you'd apply to text, so this has text-secondary fs-2:
Buttons can be created by adding the button class to an <a> element. The easiest way to create these is to use Sitefinity's link tool to create your link, then simply find the element that looks like
<a href="https://prod.gabar.org/"> and adding class="btn" and "btn-<color> just before the >.
Examples are shown below:
There are two types of spacing: margin and padding.
Margin is space between elements, and padding is space inside of an element. Typically, you will use padding to add space when you use a background color (because you want the space you're creating to maintain that background color to create a box), and margin at other times.
The format for the spacing CSS classes is as follows: [type of spacing][direction, optional]-[amount].
For example, my-4 would add 24px of margin to the top and bottom of an element. p-6 would add 48px of padding to all sides of an element.
You will rarely want to use anything but my- and p- classes: usually you only want to create vertical space between elements, and when adding padding you want it to be uniform on all sides.
Sometimes you will want different horizontal and vertical padding on an element, so you could add both separately: py-2 (8px of vertical padding) px-4 (24px of horizontal padding). But if you're not sure, stick with uniform padding.
Direction Code | Meaning |
---|---|
m | Margin |
p | Padding |
Side Code | Meaning |
---|---|
s | Left (s for Start) |
t | Top |
e | Right (e for End) |
b | Bottom |
x | Horizontal (x-axis, left/right) |
y | Vertical (y-axis, top/bottom) |
Omitting the direction code applies the spacing to all sides |
Size Code | Meaning |
---|---|
1 | 4px (0.25rem) |
2 | 8px (0.5rem) |
3 | 16px (1rem) |
4 | 24px (1.5rem) |
5 | 32px (2rem) |
6 | 48px (3rem) |
7 | 80px (5rem) |
Hero Image | 525px x 276px | Used for the top banners in landing pages. Image is shown on the left, while the page title/breadcrumbs appears on the right. Example: Young lawyers division |
Nav Promo Image | 150px x 100px | Used for small images showing in the main navigation. Example: vLex Fastcase image under the For Lawyers menu |
News List Image | 584px x 329px | Used for news images in lists and in news detail page Example: News article |
Featured Event Image | 540px x 305px | Used for featured events. Example: Homepage (shown under the Header Feature Event) |
CTA Overlap Image | 271px x 362px | These are images used for templates OverlapImageRight and OverlapImageLeft on CallToAction widgets. Example: Homepage (Check "From the President" CTA above the Benefits of Membership) |
CTA Container Image | 603px x 339px | Used in CTA templates ContainedImageLeft/Right and PaddedImageLeft/Right Example: Lawyer Well-Being section in For lawyers overview page |
Member Benefit Featured Image | 584px x 329px | Used in Featured Item template for Member Benefit widget Example: The Member Benefits Insurance section in Member benefits and resources page |
Journal Cover Image | 236px x 306px | Used for the Latest Issue template for Journal page. |
Vendor Logo Image | 360px x 148px | Used for the Vendor Directory page and shown on the Vendor detail page |
Grid Four Images | 273px x 155px | This layout is used for grids with four columns, such as in the Benefits of Membership section. It is also applied to news images in carousels. |
Homepage banners | 960px x 507px | This is used for images used in the Home page carousel |