... | ... | @@ -219,11 +219,9 @@ Developers should avoid using the `any` type because it disables type checking a |
|
|
|
|
|
The use of inline `styles` SHOULD be avoided. The UI developers should rather use the existing classes (e.g., PrimeFlex), or define their own classes within the style files. Using inline styles usually causes code duplication and makes it awkward to adjust styles because all occurrences must be located and updated.
|
|
|
|
|
|
## Naming
|
|
|
|
|
|
ID of HTML elements and CSS class names should obey English grammar. Words should be separated by dash (-). At the end of the name of ID there should be object. We do not need any specific prefix in the names.
|
|
|
## Naming Conventions in Style Files
|
|
|
|
|
|
Examples:
|
|
|
There are many conventions for CSS naming to reduce the footprint and improve the styles clarity. We recommend using the `[BEM](https://getbem.com/introduction/)` naming conventions in the new Stork code. However, using it is not imposed by our coding guidelines. An alternative is to use the class names including the hyphens as word separators, with the object names at the end. For example:
|
|
|
|
|
|
- `served-scopes-help-box` - ID of a help box for server scopes
|
|
|
- `stork-version-tooltip` - ID of a tooltip for stork version element
|
... | ... | @@ -233,6 +231,7 @@ Examples: |
|
|
- `green-colored-panel` - class name for green panel
|
|
|
|
|
|
Examples from PrimeNG:
|
|
|
|
|
|
- `ui-tooltip-arrow` - class name for an arrow in tooltip
|
|
|
- `ui-panel-titlebar` - class name for a titlebar in a panel
|
|
|
- `ui-widget-content` - class name of widget content
|
... | ... | |