Some content on this site is available only to logged-in subscribers. Contact Us for information on becoming a subscriber.

InSource.Solutions | InSource Training | InSource Client Portal
InSource Solutions Logo
Log In Sign Up
InSource.Solutions InSource Training InSource Client Portal Log In Sign Up
  • Home
  • j5
  • j5 Tech Notes

TN 1304 How to Configure Cascading Style Sheets in j5

Last updated: March 5th, 2025

Description

  • Author: Ron Tanner
  • Published: March 5th, 2025

Details:

Description

This article from InSource shows how to configure cascading style sheets in j5

  • Author: Ron Tanner
  • Published: 12/13/2022
  • Applies to: J5 2019

Details

How to configure cascading style sheets in j5

Cascading style sheets can be added in different locations to style various levels of a j5 system. The location determines the scope the style sheet rules will be applied. 

To style all field labels in an entire site for a particular color as an example, site.css file should be added to the project root with the following contents: 

Label { 

color:#ff9900; 

} 

You can use css classes in the site.css to apply css at a more granular level. 

Keep in mind more specific selectors will override more general selectors.

Example: 

  • Selector at a module level will be more specific than a matching one at a site level
  • Selector with a CSS class component (e.g. Label.important) will be more specific than one without (e.g.Label) 

For example, adding a module.css file to the Organization module. 

 Field { 

 background-color:#00FF00; 

color:#ff9900; 

} 

Label { 

 background-color:#a0a0a0; 

color:#4F4F4F; 

} 

Result: 

When adding a CSS file on a logbook, the logbook.css file should be located on the same level as the logbook.yml file.

Example: 

Adding the tag to the specific field(s):

 Adding the logbook.css file at the same level as the logbook.yml file: 

The logbook.css example file: 

Label.asset_type { 

 background-color:#FF0000; 

 font-weight: bold; 

} 

Result: 

Adding colors to field options: 

There is an option to apply colors to the field options in the grid view (small view), like Operations logbook status field options. 

For example, you can add colors to a select type field and this will then be applied and displayed in the grid view. 

Another example: 

You can also use a SELECT field to set the color of another field using the Styled Fields attribute. 

For example, if the fields type and subsystem both need to be styled according to option selected for field subsystem, then both the
fields need to be added in the Styled Fields attribute (see below screenshot of IDE). 

This will then result in the field being styled accordingly. 

 

css configuration j5 cascading
Give feedback about this article

Recommended articles

TN IT212 Display Rich Text Format (RTF) Inside Intouch

Read More

TN IT190 Default username and password for InTouch

Read More

TN IT198 Automatic logout (Inactivity Warning and Timeout)

Read More
Support Icon

CONTACT SUPPORT

How to reach us

10800 Midlothian Turnpike Tpke, Suite 209, Richmond, VA 23235

1.877.INSOURCE

Technical Support - 1.888.691.3858

Contact Us

  • InSource Solutions
  • InSource Training
  • InSource Client Portal
  • Log In
InSource Solutions Logo

© 2025 InSource Solutions. All Rights Reserved.

Knowledge Base Software powered by Helpjuice

Expand