Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page is for application designers who want to know how style settings are applied.

Insert excerpt
_Banners
_Banners
namescreen
nopaneltrue

Overview

Layout

The components on a screen have properties for

adding

applying styles

that

which affect their

format

look and feel. For example,

example

you can add a background

colours or borders to components. You can apply styles:

colour or set how a button reacts when the mouse passes over it. Styles can be applied using a shared style

that lots of layout components use. This is global-level styling, and it gives your application

which is reusable and provides a consistent look and feel

.
If you change your mind about an aspect of styling, you only need to change the style in one place, in the shared style. All layout components that use the style are automatically updated.
If you make a change to a shared style, remember to test that it looks correct for all components.on individual layout components. This is object-level styling. It is useful to use this when you are experimenting with styles, or

across your application, or it can be applied to a single component if you want to apply a one-off style

to layout component

.


If you want to use an object-level styles on multiple components, you have to remember to set the style properties for each component.
If you want to change the style, you must change it on each component.You can use both global and object

You can combine both shared styles and object-level styling on the same

layout

component.

PhixFlow applies styles in a specific order, with the values set at the object-level overriding those set

globally. This is explained in the following video

in a shared style. 

Style Order 
Anchor
order
order

PhixFlow applies styles using the principle of cascading style sheets (CSS). A component can have styles from one, some or all of the following settings:

  1. Shared Styles - global
  2. CSS Properties - object

  3. Style Settings - object
  4. Conditional Formatting - global
  5. Position Settings - object

PhixFlow applies styles in order, starting with 1, and ending with 5.

If a different style is applied to the same aspect of a component, the later settings override the earlier settings:

Info

For example, the style for a button border is set to:

  • 10px and black in a shared style
  • 2px and red in the component's style settings,

the button has a 2 pixel, red border.

You can configure a shared style to have a condition that must be true for the style to be applied using a formatting rule; see Applying Formatting Rules and Formatting Rule properties. For example, you can hide an "Update" button until the user had made a change to the data.

Formatting rules require an expression for the condition logic, which must be true for the style to be applied; see Expressions and PhixScripts.

Iframe
srchttps://www.youtube.com/embed/0_9-GCSywvU?rel=0
width560px
height315px

Summary of the order in which styles are applied

Image Added



Where

to Apply

Styles are Applied

Every

layout

component has a

property

Style Properties tab with the sections:

  • Styles Settings - a set common formatting options for the component. This is object-level styling. It is useful to use this when you are experimenting with styles or you want to apply a one-off style to a component. 
  • Shared Styles (Recommended) -
lists any
  • a global-level shared
styles that apply to the component
  • Styles - apply common formatting settings to the component
  • CSS Properties - specify advanced formatting, for Styles section, set up a CSS tag and its value. To share a CSS property, simply open the shared style and drag the CSS Property to it.
  • See Layout for details.
    • style that can be applied to multiple components to give your application a consistent look and feel. To change an aspect of styling, you only need to change the style in one place, the shared style. All components that use the style are automatically updated when the style is updated. It is recommended that all styles be applied using a shared style where possible.
    • Formatting Rules - apply a shared style when the conditions of a rule are satisfied. Formatting Rules are applied at the object-level.
    • CSS Properties - a set of specific styles, defined using a CSS tags and their associated values. This is object-level styling.
    • Position Setting - fixes where a component should appear and what size it should be. This is applied at the object-level.

    Image Added

    Creating Shared Styles

    1. In the PhixFlow repository,

    right-click Styles and add a new style
  • Go to the repository.
  • Expand your style.
  • Right-click CSS Properties and click 
    1. navigate to Styles and click 

      Insert excerpt
      _new
      _new
      nopaneltrue
      .

    2. In the Basic Settings section, set the style options you require; see Style
    If you want your shared style to include advanced styles:
    1. Save your style. 

    Apply a Shared Style

    To use the style in a component:

    1. Open the properties of the component you wish to apply the style to.
    2. Click on the
      Insert excerpt
      _
    add
    1. property_tabs
    _add
    1. _property_tabs
      namestyle
      nopaneltrue
      .
     
  • Set the tag and value and save;  see CSS Properties
  • When you return to the style property tabe, the CSS Properties section is automatically populated. 
  • Save your style. 
  • To use the style in a layout component:

  • Open the layout component to which you want to apply a style.
  • Drag the repository tab so that it is beside the layout component property tab.
  • Drag your style
    1. Scroll down to the Shared Style section.
    2. Click
      Insert excerpt
      _style_list
      _style_list
      nopaneltrue
      .
    3. Drag a style from the repository and drop it into the Shared Styles section of the
    layout component

    Image Removed

    Summary of the order in which styles are applied
    1. properties.

    Style Order

    It is possible to set different information for the same style, in a shared styles and directly on a layout component. PhixFlow applies styles in the following order:

    1. Shared Styles - global
    2. CSS Properties - object

    3. Style Settings - object
    4. Conditional Formatting - global - shared style
    5. Position Settings - object level

    Conditional formatting rules determine which formatting applies, for example you can hide an "Update" button until the user had made a change to the data.

    Later applied overrides earlyer

    Expressions

    Scripting Regular Expressions

    1. PhixFlow adds the style to the list of shared styles that apply to the component.