-
Notifications
You must be signed in to change notification settings - Fork 1
Roadmap
OBSOLETE DOCUMENTATION - DO NOT READ THIS
Clarity styles are very similar to CSS style, but the terminology differs slightly. A set of properties that describe how something should looks is called a look. The set of rules that determine whether a look should be applied to a certain component is called selector. A look combined with a selector is called style. A collection of styles is a stylesheet. The meta-data attached to a component which contributes to selecting the component for applying a look to it is called category. The category is equivalent to the concept of class in HTML/CSS.
Selectors can select the component in the following ways:
- By component type (whether it's a button, text field etc.)
- By component name.
- By component category (like a CSS class).
- By a structural combination of any of the above (either by descendant or direct child relationship).
Colour should be recognisable in different formats:
(make (:label) (:style {:foreground "#ff0000"})) ;;RGB
(make (:label) (:style {:foreground "#ff000020"})) ;;RGBA
(make (:label) (:style {:foreground [255 0 0]})) ;;RGB
(make (:label) (:style {:foreground [255 0 0 32]})) ;;RGBA
Turn on anti-alias easily:
(make (:label) (:style {:anti-alias true}))
You should be able to define the size of text in a relative way:
(make (:label) (:style {:text-size "+10%"}))
or
(make (:label) (:style {:text-size "110%"}))
or
(make (:label) (:style {:text-size "x2"})) ;;times two
Styles:
{:text-style #{:italic :bold :plain :underline}) ;;obviously not all at the same time