Best Practices for Using CSS and Themes
Use the recommended styling standards for creating CSS and themes in your web or hybrid mobile application.
| Standard | Details | Example |
|---|---|---|
|
Use mobile-first design |
Applications should be mobile first, meaning that they should work on a phone and tablet. This means they must be touch friendly, including sizing tap targets appropriately. There is no hover in mobile, so the design should not rely on the use of hover. |
|
|
Follow naming conventions |
Use the For example, if you are writing a branding bar that contains a header element for your company acme, then choose Including a namespace is important in order to minimize the chances of your customer's CSS on the page affecting your CSS and vice-versa. For example, if you and your customer both have a class named Customer CSS: Using |
|
|
Use only Oracle JET public classes |
Use only the public classes documented in the Oracle® JavaScript Extension Toolkit (JET) Styling Reference. All other Oracle JET classes are considered private and subject to change without notice. |
|
|
Do not override Oracle JET classes |
Do not override any Oracle JET class containing the |
|
|
Don’t set the font family in the CSS |
The application should set the font family for text once on the root of the page which allows the application to change the font family as needed. In order to blend in with the font family chosen by the application, do not set the font family in the CSS. |
|
|
Consider using REM for font sizes |
Consider Using REM for font sizes in order to blend in with the base font size the application has chosen. |
|
|
Add bi-directional (BIDI) styling support |
Oracle JET applications are expected to set |
|
|
Use |
When Oracle JET detects high contrast mode, it places the |
|
|
Avoid |
Avoid the use of |
|
|
Optimize image use |
All image systems have advantages and disadvantages. See Working with Images to decide if icon fonts are right for you. Always consider performance when using images. For tips, see Adding Performance Optimization to an Oracle JET Application |