Overriding the Default Font

You can modify the appearance of the text in specific content item fields by adding ui:style elements to the field definitions in a publication's content-type resource. For example:

<field mime-type="text/plain" type="basic" name="title">
  <ui:style>body { font-size: 20px; font-weight: bold; }</ui:style>
</field>

You can use this technique to change the appearance of any content item field that displays text or numbers: basic, number, schedule, date, URI and so on.

The ui:style element accepts CSS content, but for any field type other than a rich text field the CSS that is recognized is limited as follows:

  • You must use the selector body. A CSS rule with any other selector will be ignored

  • The only properties that are used are font-size and font-weight

  • font-size must be specified using either pixel (px) or percentage (%) units. Any other units will be ignored

  • The only font-weight values that are recognized are normal and bold